working on smt encoding for NA
This commit is contained in:
@@ -50,6 +50,14 @@ class ExtendedContextAutomaton(ContextAutomaton):
|
||||
else:
|
||||
return set()
|
||||
|
||||
def can_produce_entity(self, entity):
|
||||
"""Check if the automaton can produce an entity"""
|
||||
|
||||
if entity in self._actions_for_products:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def add_transition(self, src, actions, ctx_reaction, dst):
|
||||
"""Adds a transition
|
||||
|
||||
|
||||
@@ -33,6 +33,10 @@ class NetworkOfContextAutomata(object):
|
||||
"""Returns the set of entities that can potentially be produced by the automata in the network"""
|
||||
return self._prod_entities
|
||||
|
||||
@property
|
||||
def automata_ids(self):
|
||||
return set(range(len(self.automata)))
|
||||
|
||||
def sanity_check(self):
|
||||
"""Performs a sanity check of the network of automata"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user