public final class EfsmUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ru.ispras.fortress.expression.Node |
eventsToNode(java.util.Collection<Event> events)
Transforms the specified events container to the node.
|
static java.util.Map<ru.ispras.fortress.expression.NodeVariable,java.util.Set<ru.ispras.fortress.expression.NodeVariable>> |
getResultingDependencies(Action action)
Returns mapping between modified variables and affecting variables.
|
static java.util.Map<ru.ispras.fortress.expression.NodeVariable,ru.ispras.fortress.expression.Node> |
getResultingSubstitutions(Action action)
Returns mapping between variables and corresponding substitutions.
|
static boolean |
hasDeclaringAncestor(Efsm efsm,
ru.ispras.fortress.expression.NodeVariable variable)
Checks whether the specified EFSM (or it's ancestor) declares the specified variable.
|
static Efsm |
product(Efsm... efsmList)
Constructs a synchronous composition from a list of EFSMs.
|
public static java.util.Map<ru.ispras.fortress.expression.NodeVariable,java.util.Set<ru.ispras.fortress.expression.NodeVariable>> getResultingDependencies(Action action)
Returns mappings between modified variables and variables which affects corresponding modifications.
For example, if this action consists of two subsequent assignments x = y
and
z = x + i
, the resulting map contains mappings from x
to y
and from
z
to y
and i
.
public static java.util.Map<ru.ispras.fortress.expression.NodeVariable,ru.ispras.fortress.expression.Node> getResultingSubstitutions(Action action)
Returns mappings between variables and corresponding substitutions representing total variable modifications during execution of this action. That is, execution of this action is equal to parallel evaluation of the substitutions and subsequent assignment of derived values to the corresponding variables.
public static Efsm product(Efsm... efsmList)
efsmList
- the list of EFSMsjava.lang.IllegalArgumentException
- if the specified list of EFSMs is null
or contains less than two modelspublic static boolean hasDeclaringAncestor(Efsm efsm, ru.ispras.fortress.expression.NodeVariable variable)
efsm
- EFSM to be checked if it (or it's ancestor) declares variablevariable
- variable to be checked for declarationtrue
if the specified EFSM (or some it's ancestor) declares the specified
variable, false
otherwisepublic static ru.ispras.fortress.expression.Node eventsToNode(java.util.Collection<Event> events)
events
- Container of events.