uk.ac.man.cs.rainbow.rapa.gcl
Class Rule
java.lang.Object
|
+--uk.ac.man.cs.rainbow.rapa.gcl.Rule
- All Implemented Interfaces:
- LatexGenerator, Serializable, VariableContainer
- public class Rule
- extends Object
- implements Serializable, VariableContainer, LatexGenerator
A single GCL rule.
- See Also:
- Serialized Form
Constructor Summary |
Rule(ArrayList guards,
ArrayList actions,
ArrayList updates)
|
Rule(Value[] guards,
Action[] actions)
|
Rule(Value[] guards,
Action[] actions,
Assignment update)
|
Rule(Value[] guards,
Action[] actions,
Assignment[] updates)
|
Rule(Value[] guards,
Assignment[] updates)
|
Rule(Value guard,
Value[] context,
Action[] actions,
Assignment update)
|
Rule(Value guard,
Value[] context,
Assignment update)
|
Rule
public Rule(Value[] guards,
Action[] actions,
Assignment[] updates)
Rule
public Rule(Value[] guards,
Action[] actions,
Assignment update)
Rule
public Rule(Value[] guards,
Assignment[] updates)
Rule
public Rule(Value guard,
Value[] context,
Assignment update)
Rule
public Rule(Value guard,
Value[] context,
Action[] actions,
Assignment update)
Rule
public Rule(Value[] guards,
Action[] actions)
Rule
public Rule(ArrayList guards,
ArrayList actions,
ArrayList updates)
getGuards
public Value[] getGuards()
getGuards
public Value getGuards(int i)
numGuards
public int numGuards()
getActions
public Action[] getActions()
getActions
public Action getActions(int i)
numActions
public int numActions()
getUpdates
public Assignment[] getUpdates()
getUpdates
public Assignment getUpdates(int i)
numUpdates
public int numUpdates()
subst
public Rule subst(GeneralSubstitution s)
apply
public Rule apply(Unifier u)
subst
public Rule subst(ProgramCounterFactory factory,
int i,
int n1,
int n2)
subst
public Rule subst(Assignment.StateVar.Subst s)
contains
public boolean contains(Value guard)
contains
public boolean contains(Assignment update)
append
protected void append(StringBuffer s)
appendLaTeX
public void appendLaTeX(StringBuffer s)
- Description copied from interface:
LatexGenerator
- Append a LATEX representation of this
object to the given buffer.
- Specified by:
appendLaTeX
in interface LatexGenerator
toString
public String toString()
- Overrides:
toString
in class Object
getGuardDescriptor
public char[] getGuardDescriptor()
getUpdateDescriptor
public char[] getUpdateDescriptor()
isCompatibleDescriptor
public static boolean isCompatibleDescriptor(char[] desc1,
char[] desc2)
isCompatibleActions
public static boolean isCompatibleActions(Action[] act1,
Action[] act2)
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
hasVariable
public boolean hasVariable()
- Specified by:
hasVariable
in interface VariableContainer