Ejemplo n.º 1
0
    def _CreateMsgObj(self, obj):
        self.msgNode.append(PCCObject(obj))

        msgformat = obj.getChildren()

        msgtype = ""
        for ind in range(0, len(msgformat)):
            if ind == 0:
                msgtype = msgformat[ind].getText()
            else:
                if msgformat[ind].getText() == self.Data:
                    self.dataMsgTypes.append(msgtype)
Ejemplo n.º 2
0
    def checkAllStatesReachableArchs(self, node: PCCObject) -> bool:
        # First loop over all caches and check for their state reachability
        start_state_name = None

        for key, val in node.getvariables().items():
            if val == "INITSTATE_":
                start_state_name = key
                self.initStateNodes[str(node)] = key
                break

        if not start_state_name:
            self.pwarning("Unable to locate the name of the initial state of " + "\"" + node + "\".")
            return False

        # Explore the state space via depth-first search
        if not self._dfsExplore(node, start_state_name):
            return False

        # If not return false yet must have found that all states are reachable
        return True
Ejemplo n.º 3
0
 def _createObj(self, obj):
     return {self._getName(obj.getChild(0)): PCCObject(obj)}