public final class EfsmUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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(EfsmModule module,
Efsm... efsms)
Constructs a synchronous composition from the specified 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
.
action
- The object to be analyzed.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.
action
- The object to be analyzed.public static Efsm product(EfsmModule module, Efsm... efsms)
module
- - the specified EFSM containerefsms
- - the specified 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
otherwise