Class FOConjunctionFactBaseWrapper
java.lang.Object
fr.inria.rules.integraal.model.formula.impl.FOConjunctionFactBaseWrapper
- All Implemented Interfaces:
fr.inria.rules.dlgpemodel.api.formulas.IConjunction, fr.inria.rules.dlgpemodel.api.formulas.IFormula, fr.inria.rules.dlgpemodel.api.sentences.IPrintable, FOFormula, FOFormulaConjunction, Substitutable<FOFormula>, TermCompound
Class that allows to wrap a fact base into a FOConjunction
- Author:
- Guillaume Pérution-Kihli
-
Field Summary
Fields inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
WRITER -
Constructor Summary
ConstructorsConstructorDescriptionFOConjunctionFactBaseWrapper(FactBase factBase) Creates an FOConjunction over the supplied fact base. -
Method Summary
Modifier and TypeMethodDescriptionapplySubstitution(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.copy()Creates a deep copy of this formula.Streams the predicates used by this formula.Collection<? extends FOFormula> Returns an unmodifiable collection containing the direct sub‑formulas of this conjunction, in their original order.getTerms()Streams the first-level terms contained in this object.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FOFormula
asBooleanQuery, isAtomic, isDisjunction, isNegationMethods inherited from interface FOFormulaConjunction
applySubstitution, flattenedSubFormulas, isConjunctionMethods inherited from interface fr.inria.rules.dlgpemodel.api.formulas.IConjunction
exportsMethods inherited from interface fr.inria.rules.dlgpemodel.api.sentences.IPrintable
toDLGPEMethods inherited from interface TermCompound
getAllNestedTerms, getConstants, getLiterals, getNestedTerms, getVariables
-
Constructor Details
-
FOConjunctionFactBaseWrapper
Creates an FOConjunction over the supplied fact base.- Parameters:
factBase- the fact base to wrap
-
-
Method Details
-
getSubElements
Description copied from interface:FOFormulaConjunctionReturns an unmodifiable collection containing the direct sub‑formulas of this conjunction, in their original order.- Specified by:
getSubElementsin interfaceFOFormulaConjunction- Specified by:
getSubElementsin interfacefr.inria.rules.dlgpemodel.api.formulas.IConjunction- Returns:
- the direct sub‑formulas of this conjunction
-
asAtomSet
Description copied from interface:FOFormulaThe given set does not represent any meaning on the formula as conjunctions, disjunctions and negations will be merged together.
This should only be used to prepare some indexes -
getPredicates
Description copied from interface:FOFormulaStreams the predicates used by this formula.- Specified by:
getPredicatesin interfaceFOFormula- Returns:
- the set of all the predicates of the atoms of this formula
-
getTerms
Description copied from interface:TermCompoundStreams the first-level terms contained in this object.- Specified by:
getTermsin interfaceTermCompound- Returns:
- a stream over all the non-nested terms (i.e., all terms that are not themselves in a compound term) For instance, for p(a,g(b)), it returns a and g(b) but not b.
-
toString
-
applySubstitution
Description copied from interface:FOFormulaApplies a substitution to this formula.- Specified by:
applySubstitutionin interfaceFOFormula- Specified by:
applySubstitutionin interfaceFOFormulaConjunction- Specified by:
applySubstitutionin interfaceSubstitutable<FOFormula>- Parameters:
substitution- the substitution to applyevaluate- whether evaluable functions should be evaluated- Returns:
- the substituted formula
-
copy
Description copied from interface:FOFormulaCreates a deep copy of this formula.
-