hwt/serializer/utils.py
def getMaxStmIdForStm(stm):
    """
    Get maximum _instId from all assigments in statement
    """
    maxId = 0
    if isinstance(stm, Assignment):
        return stm._instId
    elif isinstance(stm, WaitStm):
        return maxId
    else:
        for _stm in stm._iter_stms():
            maxId = max(maxId, getMaxStmIdForStm(_stm))
        return maxId
def getMaxStmIdForStm(stm):
    maxId = 0
    if isinstance(stm, Assignment):
        return stm._instId
    elif isinstance(stm, WaitStm):
        return maxId
    else:
        for _stm in stm._iter_stms():
            maxId = max(maxId, getMaxStmIdForStm(_stm))
        return maxId
def getMaxStmIdForStm ( stm ) : maxId = 0 if isinstance ( stm , Assignment ) : return stm . _instId elif isinstance ( stm , WaitStm ) : return maxId else : for _stm in stm . _iter_stms ( ) : maxId = max ( maxId , getMaxStmIdForStm ( _stm ) ) return maxId
Get maximum _instId from all assigments in statement
Get maximum _instId from all assigments in statement