Class AtomType
java.lang.Object
fr.inria.rules.integraal.util.AtomType
Computes the signature (or type) of an atom. More precisely, for each
position i of atom p(x1,..,xn), it is determined whether
(1) x_i is a constant or a variable and
(2) there are multiple occurrences of the same variable.
(1) x_i is a constant or a variable and
(2) there are multiple occurrences of the same variable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMask for a constantstatic final intMask for a functional term that still contains variables.static final intMask for a Variable -
Constructor Summary
ConstructorsConstructorDescriptionCreates the mask of the atomAtomType(Atom atom, Substitution s) Creates the mask of the atom -
Method Summary
Modifier and TypeMethodDescriptionintgetType(int index) Returns the mask value computed for the term at the supplied position.booleanIndicates whether the atom contains at least one constant-like term.booleanIndicates whether the atom contains a repeated variable constraint.booleanIndicates whether the atom contains a functional term with variables.
-
Field Details
-
VARIABLE
public static final int VARIABLEMask for a Variable- See Also:
-
CONSTANT_OR_FROZEN_VAR_OR_GROUND_FUNCTIONAL_TERM
public static final int CONSTANT_OR_FROZEN_VAR_OR_GROUND_FUNCTIONAL_TERMMask for a constant- See Also:
-
FUNCTIONAL_TERM_WITH_VARS
public static final int FUNCTIONAL_TERM_WITH_VARSMask for a functional term that still contains variables.- See Also:
-
-
Constructor Details
-
AtomType
-
AtomType
Creates the mask of the atom- Parameters:
atom- atom to masks- substitution
-
-
Method Details
-
getType
public int getType(int index) Returns the mask value computed for the term at the supplied position.- Parameters:
index- position in the atom- Returns:
- the type of the term at the given position
-
isThereConstant
public boolean isThereConstant()Indicates whether the atom contains at least one constant-like term.- Returns:
- true iff there is a constant in the atom
-
isThereFunctionalTermWithVars
public boolean isThereFunctionalTermWithVars()Indicates whether the atom contains a functional term with variables.- Returns:
- true iff there is a functional term with variables in the atom
-
isThereConstraint
public boolean isThereConstraint()Indicates whether the atom contains a repeated variable constraint.- Returns:
- true iff there is a constraint in the atom
-