Home | Trees | Indices | Help |
|
---|
|
Interface to library of synthesis tools, e.g., JTLV, gr1c
Functions | |||
|
|||
|
|||
dict , list
|
|
||
GRSpec |
|
||
|
|||
{'p': '((loc = "s1") | (loc = "s2") |
...)', ...} where:
|
|
||
{'p': s, ...} where 'p' a proposition and
s a set of states in fts .
|
|
||
|
|||
|
|||
|
|||
MealyMachine |
|
||
|
|||
MealyMachine |
|
Variables | |
logger = logging.getLogger(__name__)
|
|
__package__ = None hash(x) |
Function Details |
N-ary xor. Contrast with pure mutual exclusion. |
Represent finite domain in GR(1). An integer or string variable can be used, or multiple Boolean variables. If the possible values are:
then an integer or string variable represents the variable in GR(1). If all values are integers, then an integer is used. If all values are strings, then a string variable is used. Otherwise an exception is raised, unless Booleans have been requested. If the values are not mutually exclusive, then only Boolean variables can represent them. Suppose N possible values are defined. The int variable is allowed to take N+1 values. The additional value corresponds to all, e.g., actions, being False. If FTS values are integers, then the additional action is an int value. If FTS values are strings (e.g., 'park', 'wait'), then the additional
action is 'none'. They are treated by An option Combined with a mutex constraint, it yields an n-ary xor constraint.
|
Convert transition system to GR(1) fragment of LTL. The attribute The following are represented by variables controlled by
The following are represented by variables controlled by the other player:
Multiple types of environment and system actions can be defined. Make
sure that, depending on the player, CautionThere are aspects of FTS that need to be separately specified in a logic formula. An example are the initial conditions constraining the values of environment and system actions. See also
|
Convert env transition system to GR(1) representation. The following are represented by environment variables:
The following are represented by system variables:
Multiple types of environment and system actions can be defined. For more details see sys_to_spec. See also
|
Return a The dependent variables in a transition system are the atomic propositions that are used to label states. They are "dependent" because their values are completely determined by knowledge of the current state in the transition system. The returned substitutions can be used
|
For each proposition find the states labeled with it.
|
Synthesize from logic specs and multiple transition systems. The transition systems are composed synchronously, i.e., they all have to take a transition at each time step. The synchronous composition is obtained by taking the conjunction of the formulas describing each transition system. The states of each transition system can be either:
In either case the transition system state will be represented in logic with a single variable, that ranges over a finite set of integers or strings, respectively. The keys of Who controls this state variable is determined from the attribute
For example: >>> ts.states.add_from(xrange(4)) >>> ts['door'].owner = 'env' will result in a logic formula with an integer variable
The example: >>> ts.states.add_from(['a', 'b', 'c']) >>> ts['door'].owner = 'sys' will instead result in a string variable
|
Function to call the appropriate synthesis tool on the specification. There are three attributes of C{specs} that define what kind of controller you are looking for: 1. C{moore}: What information the controller knows when deciding the next values of controlled variables: - Moore: can read current state, but not next environment variable values, or - Mealy: can read current state and next environment variable values. 2. C{qinit}: Quantification of initial variable values: Whether all states that satisfy a predicate should be winning, or the initial values of some (or all) the variables is subject to the synthesizer's choice. 3. C{plus_one}: The form of assume-guarantee specification, i.e., how the system guarantees relate to assumptions about the environment. For more details about these attributes, see L{GRSpec}. The states of the transition system can be either: - all integers, or - all strings For more details of how the transition system is represented in logic look at L{synthesize_many}. Beware! ======= This function provides a generic interface to a variety of routines. Being under active development, the types of arguments supported and types of objects returned may change without notice. @param option: Magic string that declares what tool to invoke, what method to use, etc. Currently recognized forms: For GR(1) synthesis: - C{"gr1c"}: use gr1c via L{interfaces.gr1c}. written in C using CUDD, symbolic - C{"gr1py"}: use gr1py via L{interfaces.gr1py}. Python, enumerative - C{"omega"}: use omega via L{interfaces.omega}. Python using C{dd} or Cython using CUDD, symbolic - C{"slugs"}: use slugs via L{interfaces.slugs}. C++ using CUDD, symbolic - C{"jtlv"}: use JTLV via L{interfaces.jtlv}. Java, symbolic (deprecated) @type specs: L{spec.GRSpec} @param env: A transition system describing the environment: - states controlled by environment - input: sys_actions - output: env_actions - initial states constrain the environment This constrains the transitions available to the environment, given the outputs from the system. @type env: L{FTS} @param sys: A transition system describing the system: - states controlled by the system - input: env_actions - output: sys_actions - initial states constrain the system @type sys: L{FTS} @param ignore_env_init: Ignore any initial state information contained in env. @type ignore_env_init: bool @param ignore_sys_init: Ignore any initial state information contained in sys. @type ignore_sys_init: bool @param rm_deadends: return a strategy that contains no terminal states. @type rm_deadends: bool @return: If spec is realizable, then return a Mealy machine implementing the strategy. Otherwise return None. @rtype: L{MealyMachine} or None |
Check realizability. For details see synthesize. |
Convert strategy to Mealy transducer. Note that the strategy is a deterministic game graph, but the input
|
Return a determinized copy of The transducers produced by synthesis can have multiple initial output valuations as possible reactions to a given input valuation. Possible reasons for this are:
Case 1Requires an initial condition to be specified for each run of the transducer, because the transducer does not have full freedom to pick the initial output values. Note that solver options like "ALL_INIT" assume that the system has no control initially. Any output valuation that satisfies the initial conditions can occur. However, this may be too restrictive. The system may have control over the initial values of some outputs, but not others. For the outputs it can initially control, the non-determinism resulting from synthesis is redundancy and can be removed arbitrarily, as in Case 2. Case 2The function strategy2mealy returns a transducer that for each initial input valuation, for each initial output valuation, reacts with a unique transition. But this can yield multile reactions to a single input, even for
solver options like "ALL_ENV_EXIST_SYS_INIT" for
These redundant initial reactions can be removed, and because the system has full control over their values, they can be removed in an arbitrary manner, keeping only a single reaction, for each input valuation. AlgorithmReturns a deterministic transducer. This means that at each transducer vertex, for each input valuation, there is only a single reaction (output valuation) available. The non-determinism is resolved for the initial reaction by ensuring
the outputs given in See also
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Nov 19 00:11:17 2016 | http://epydoc.sourceforge.net |