Class FOFormulaFactory
java.lang.Object
fr.inria.rules.integraal.model.formula.factory.FOFormulaFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a deep copy of the supplied formula.Creates a deep copy of an atom.copyConjunction(FOFormulaConjunction formula) Creates a deep copy of a conjunction formula.copyDisjunction(FOFormulaDisjunction formula) Creates a deep copy of a disjunction formula.copyNegation(FOFormulaNegation formula) Creates a deep copy of a negation formula.final FOFormulaConjunctioncreateOrGetConjunction(FOFormula... sub_formulas) Creates a conjunction from the supplied formulas.final FOFormulaConjunctioncreateOrGetConjunction(FactBase fact_base) Wraps a fact base as a conjunction formula.final FOFormulaConjunctioncreateOrGetConjunction(Collection<? extends FOFormula> sub_formulas) Creates a conjunction from the supplied collection of formulas.final FOFormulaDisjunctioncreateOrGetDisjunction(FOFormula... sub_formulas) Creates a disjunction from the supplied formulas.final FOFormulaDisjunctioncreateOrGetDisjunction(Collection<? extends FOFormula> sub_formulas) Creates a disjunction from the supplied collection of formulas.final FOFormulaNegationcreateOrGetNegation(FOFormula sub_formula) Creates a negation wrapping the supplied formula.static FOFormulaFactoryinstance()Returns the shared formula factory instance.
-
Constructor Details
-
FOFormulaFactory
public FOFormulaFactory()Creates a formula factory instance.
-
-
Method Details
-
instance
Returns the shared formula factory instance.- Returns:
- the default instance of this factory
-
createOrGetNegation
Creates a negation wrapping the supplied formula.- Parameters:
sub_formula- the sub formulas- Returns:
- the negation of the given formula
-
createOrGetConjunction
public final FOFormulaConjunction createOrGetConjunction(Collection<? extends FOFormula> sub_formulas) Creates a conjunction from the supplied collection of formulas.- Parameters:
sub_formulas- the sub formulas- Returns:
- a conjunction of the given formulas
-
createOrGetConjunction
Creates a conjunction from the supplied formulas.- Parameters:
sub_formulas- the sub formulas- Returns:
- a conjunction of the given formulas
-
createOrGetConjunction
Wraps a fact base as a conjunction formula.- Parameters:
fact_base- the fact base to convert- Returns:
- the conjunction of all the atoms in the fact base
-
createOrGetDisjunction
public final FOFormulaDisjunction createOrGetDisjunction(Collection<? extends FOFormula> sub_formulas) Creates a disjunction from the supplied collection of formulas.- Parameters:
sub_formulas- the sub formulas- Returns:
- a disjunction of the given formulas
-
createOrGetDisjunction
Creates a disjunction from the supplied formulas.- Parameters:
sub_formulas- the sub formulas- Returns:
- a disjunction of the given formulas
-
copy
-
copyConjunction
Creates a deep copy of a conjunction formula.- Parameters:
formula- the formula to copy- Returns:
- a deep copy of the given conjunction
-
copyDisjunction
Creates a deep copy of a disjunction formula.- Parameters:
formula- the formula to copy- Returns:
- a deep copy of the given disjunction
-
copyNegation
Creates a deep copy of a negation formula.- Parameters:
formula- the formula to copy- Returns:
- a deep copy of the given negation
-
copyAtom
-