Class AtomType
java.lang.Object
fr.lirmm.graphik.integraal.core.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 intMarker used for positions holding a constant or a frozen variable.static final intMarker used for positions holding a regular variable. -
Constructor Summary
ConstructorsConstructorDescriptionComputes the type signature of an atom without frozen variables.AtomType(Atom atom, Substitution s) Computes the type signature of an atom under a substitution. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the analysed atom contains at least one constant or frozen variable.booleanReturns whether the analysed atom contains repeated variables.
-
Field Details
-
VARIABLE
public static final int VARIABLEMarker used for positions holding a regular variable.- See Also:
-
CONSTANT_OR_FROZEN_VAR
public static final int CONSTANT_OR_FROZEN_VARMarker used for positions holding a constant or a frozen variable.- See Also:
-
-
Constructor Details
-
AtomType
Computes the type signature of an atom under a substitution.- Parameters:
atom- the atom to analyses- the substitution used to freeze variables
-
AtomType
Computes the type signature of an atom without frozen variables.- Parameters:
atom- the atom to analyse
-
-
Method Details
-
isThereConstant
public boolean isThereConstant()Returns whether the analysed atom contains at least one constant or frozen variable.- Returns:
- true if a constant or frozen variable occurs in the atom
-
isThereConstraint
public boolean isThereConstraint()Returns whether the analysed atom contains repeated variables.- Returns:
- true if the atom contains a variable occurring more than once
-