Package tulip :: Package interfaces :: Module lily
[frames] | no frames]

Module lily

Interface to Lily that solves LTL games.

Requires pydot for networkx to load the Moore strategy graph.

Relevant links:

Functions
MooreMachine
synthesize(formula, env_vars=None, sys_vars=None)
Return Moore transducer if formula is realizable.
MooreMachine
lily_strategy2moore(g, env_vars, sys_vars)
Return Moore transducer from Lily strategy graph g.
Variables
  logger = logging.getLogger(__name__)
  LILY = 'lily.pl'
  IO_PARTITION_FILE = 'io_partition.txt'
  DOTFILE = 'ltl2vl-synthesis.dot'
  __package__ = 'tulip.interfaces'
Function Details

synthesize(formula, env_vars=None, sys_vars=None)

 

Return Moore transducer if formula is realizable.

Variable dicts have variable names as keys and their type as value. The types should be 'boolean'. These parameters are only used if formula is of type str. Else, the variable dictionaries associated with the LTL or GRSpec object are used.

Parameters:
  • formula (str, LTL, or GRSpec) - linear temporal logic formula
  • env_vars (dict or None) - uncontrolled variables (inputs); used only if formula is of type str
  • sys_vars (dict or None) - controlled variables (outputs); used only if formula is of type str
Returns: MooreMachine
symbolic Moore transducer (guards are conjunctions, not sets)

lily_strategy2moore(g, env_vars, sys_vars)

 

Return Moore transducer from Lily strategy graph g.

Caution

The resulting transducer is symboic, in that the guards denote conjunctions, *not* subsets of ports.

Parameters:
  • g (networkx.MultiDiGraph) - Moore strategy game graph as output by Lily
Returns: MooreMachine