コード例 #1
0
    def add_immed_request_access(self, state: State) -> None:
        for transition in state.gettransitions():
            # If an access can be performed without awaiting a response, important not request,
            # it can still make a request
            if transition.getaccess() in state.get_access_str():
                if transition.getoutmsg():
                    self.request_access.append(transition.getaccess())
                else:
                    self.immed_access.append(transition.getaccess())

            elif transition.getaccess() in state.get_evict_str():
                if transition.getoutmsg():
                    self.request_evict.append(transition.getaccess())
                else:
                    self.immed_evict.append(transition.getaccess())
            else:
                assert "Unrecognized access"
コード例 #2
0
    def add_enter_access(self, state: State, traces: TraceSet) -> None:
        if state not in traces.final_state_dict:
            return

        enter_traces = traces.final_state_dict[state]

        for entry in enter_traces:
            for access in entry.access:
                if access:
                    if access in state.get_access_str(
                    ) and access not in self.enter_access:
                        self.enter_access.append(access)
                    elif access in state.get_evict_str(
                    ) and access not in self.enter_evict:
                        self.enter_evict.append(access)
                    else:
                        assert "Unrecognized access"