Interface FOFormula
- All Superinterfaces:
fr.inria.rules.dlgpemodel.api.formulas.IFormula, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, Substitutable<FOFormula>, TermCompound
- All Known Subinterfaces:
Atom, ComputedAtom, FOFormulaConjunction, FOFormulaDisjunction, FOFormulaNegation
- All Known Implementing Classes:
AtomImpl, CompoundFOFormula, ComputedAtomImpl, FOConjunctionFactBaseWrapper, FOConjunctionImpl, FODisjunctionImpl, FONegationImpl
public sealed interface FOFormula
extends Substitutable<FOFormula>, TermCompound, fr.inria.rules.dlgpemodel.api.formulas.IFormula
permits Atom, FOFormulaConjunction, FOFormulaDisjunction, FOFormulaNegation, CompoundFOFormula
This interface represents a first order formula of atoms.
- Author:
- Florent Tornil
-
Field Summary
Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
WRITER -
Method Summary
Modifier and TypeMethodDescriptionapplySubstitution(Substitution substitution) Applies a substitution without evaluating nested functions.applySubstitution(Substitution substitution, boolean evaluate) Applies a substitution to this formula.The given set does not represent any meaning on the formula as conjunctions, disjunctions and negations will be merged together.Makes a boolean query out of the given formula.copy()Creates a deep copy of this formula.Streams the predicates used by this formula.default booleanisAtomic()Indicates whether this formula node is atomic.default booleanIndicates whether this formula node is a conjunction.default booleanIndicates whether this formula node is a disjunction.default booleanIndicates whether this formula node is a negation.Methods inherited from interface fr.inria.rules.dlgpemodel.api.formulas.IFormula
exportsMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods inherited from interface TermCompound
getAllNestedTerms, getConstants, getLiterals, getNestedTerms, getTerms, getVariables
-
Method Details
-
isConjunction
default boolean isConjunction()Indicates whether this formula node is a conjunction.- Returns:
- true iff this node of the formula is a conjunction
-
isDisjunction
default boolean isDisjunction()Indicates whether this formula node is a disjunction.- Returns:
- true iff this node of the formula is a disjunction
-
isNegation
default boolean isNegation()Indicates whether this formula node is a negation.- Returns:
- true iff this node of the formula is a negation
-
isAtomic
default boolean isAtomic()Indicates whether this formula node is atomic.- Returns:
- true iff this node of the formula is a leaf
-
asAtomSet
-
asBooleanQuery
-
getPredicates
-
applySubstitution
Applies a substitution without evaluating nested functions.- Specified by:
applySubstitutionin interfaceSubstitutable<FOFormula>- Parameters:
substitution- the substitution to apply- Returns:
- the substituted formula
-
applySubstitution
Applies a substitution to this formula.- Specified by:
applySubstitutionin interfaceSubstitutable<FOFormula>- Parameters:
substitution- the substitution to applyevaluate- whether evaluable functions should be evaluated- Returns:
- the substituted formula
-
copy
-