Class FOLPropTranslator
- java.lang.Object
-
- net.sf.tweety.logics.translators.Translator
-
- net.sf.tweety.logics.translators.folprop.FOLPropTranslator
-
public class FOLPropTranslator extends Translator
A Translator between the FOL and propositonal logic and vice versa.- Author:
- Tim Janus, Anna Gessler
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.logics.translators.Translator
TT_ASSOC, TT_ATOM, TT_PREDICATE, TT_RULE
-
-
Constructor Summary
Constructors Constructor Description FOLPropTranslator()
Default-Ctor
-
Method Summary
Modifier and Type Method Description Conjunction
toFOL(Conjunction conjunction)
Translates the given propositional Conjunction to a FOL ConjunctionDisjunction
toFOL(Disjunction disjunction)
Translates the given propositional Disjunction to a FOL DisjunctionFolFormula
toFOL(PlFormula propFormula)
FolAtom
toFOL(Proposition proposition)
Translates the given proposition into a FOL-AtomConjunction
toPropositional(Conjunction conjunction)
Translates the given FOL Conjunction to a propositional ConjunctionDisjunction
toPropositional(Disjunction disjunction)
Translates the given FOL Disjunction to a propositional DisjunctionExclusiveDisjunction
toPropositional(ExclusiveDisjunction xor)
Translates the given FOL Exclusive Disjunction to a propositional Exclusive DisjunctionProposition
toPropositional(FolAtom atom)
Translates the given FOL-Atom into a PropositionPlFormula
toPropositional(FolFormula folFormula)
-
Methods inherited from class net.sf.tweety.logics.translators.Translator
translateAssociative, translateAtom, translatePredicate, translateRule, translateUsingMap
-
-
-
-
Method Detail
-
toPropositional
public Proposition toPropositional(FolAtom atom)
Translates the given FOL-Atom into a Proposition- Parameters:
atom
- FOL-Atom, if the given Atom has arguments an exception is thrown.- Returns:
- Propositional form of the given Atom
-
toFOL
public FolAtom toFOL(Proposition proposition)
Translates the given proposition into a FOL-Atom- Parameters:
proposition
- The Proposition- Returns:
- A FOL-Atom representing the given Proposition in first order logic.
-
toFOL
public Disjunction toFOL(Disjunction disjunction)
Translates the given propositional Disjunction to a FOL Disjunction- Parameters:
disjunction
- a PL disjunction- Returns:
- The FOL Disjunction
-
toPropositional
public Disjunction toPropositional(Disjunction disjunction)
Translates the given FOL Disjunction to a propositional Disjunction- Parameters:
disjunction
- The FOL-Disjunction, if it contains formulas which are not expressible in propositional logic an exception is thrown.- Returns:
- The propositional Disjunction
-
toPropositional
public ExclusiveDisjunction toPropositional(ExclusiveDisjunction xor)
Translates the given FOL Exclusive Disjunction to a propositional Exclusive Disjunction- Parameters:
xor
- The FOL-Exclusive Disjunction, if it contains formulas which are not expressible in propositional logic an exception is thrown.- Returns:
- The propositional Exclusive Disjunction
-
toFOL
public Conjunction toFOL(Conjunction conjunction)
Translates the given propositional Conjunction to a FOL Conjunction- Parameters:
conjunction
- a PL conjunction- Returns:
- The FOL Conjunction
-
toPropositional
public Conjunction toPropositional(Conjunction conjunction)
Translates the given FOL Conjunction to a propositional Conjunction- Parameters:
conjunction
- The FOL-Conjunction, if it contains formulas which are not expressible in propositional logic an exception is thrown.- Returns:
- The propositional Conjunction
-
toFOL
public FolFormula toFOL(PlFormula propFormula)
-
toPropositional
public PlFormula toPropositional(FolFormula folFormula)
-
-