Class Substitution
java.lang.Object
es.ucm.maude.bindings.Substitution
Substitution (mapping from variables to terms).
-
Constructor Summary
ConstructorsConstructorDescriptionSubstitution(TermVector vars, TermVector values) Create a substitution with the given variables and values.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Find the value of a given variable by name.
Find the value of a given variable by name.
instantiate(Term term) Instantiate a term with this substitution.
iterator()Get an iterator to the substitution assignments.Get the matched portion when matching with extension.
intsize()Get the number of variables in the substitution.toString()Get the value of a given variable.
-
Constructor Details
-
Substitution
Create a substitution with the given variables and values.
- Parameters:
vars- Variables in the substitution.values- values Values for these variables in the substitution.
-
-
Method Details
-
delete
public void delete() -
size
public int size()Get the number of variables in the substitution. -
value
-
matchedPortion
Get the matched portion when matching with extension.
- Returns:
- The matched portion or null if the
whole term matched.
-
find
Find the value of a given variable by name.
- Parameters:
name- Variable name (without sort).sort- Sort of the variable (optional).
- Returns:
- The value of the variable or null if not found.
If the sort of the variable is not given, multiple results
are possible.
-
find
-
instantiate
-
iterator
Get an iterator to the substitution assignments. -
toString
-