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 protected Map<Class<?>,net.sf.tweety.commons.util.Pair<Integer,Class<?>>>createTranslateMap()net.sf.tweety.logics.fol.syntax.ConjunctiontoFOL(net.sf.tweety.logics.pl.syntax.Conjunction conjunction)Translates the given propositional Conjunction to a FOL Conjunctionnet.sf.tweety.logics.fol.syntax.DisjunctiontoFOL(net.sf.tweety.logics.pl.syntax.Disjunction disjunction)Translates the given propositional Disjunction to a FOL Disjunctionnet.sf.tweety.logics.fol.syntax.FolFormulatoFOL(net.sf.tweety.logics.pl.syntax.PlFormula propFormula)net.sf.tweety.logics.fol.syntax.FolAtomtoFOL(net.sf.tweety.logics.pl.syntax.Proposition proposition)Translates the given proposition into a FOL-Atomnet.sf.tweety.logics.pl.syntax.ConjunctiontoPropositional(net.sf.tweety.logics.fol.syntax.Conjunction conjunction)Translates the given FOL Conjunction to a propositional Conjunctionnet.sf.tweety.logics.pl.syntax.DisjunctiontoPropositional(net.sf.tweety.logics.fol.syntax.Disjunction disjunction)Translates the given FOL Disjunction to a propositional Disjunctionnet.sf.tweety.logics.pl.syntax.ExclusiveDisjunctiontoPropositional(net.sf.tweety.logics.fol.syntax.ExclusiveDisjunction xor)Translates the given FOL Exclusive Disjunction to a propositional Exclusive Disjunctionnet.sf.tweety.logics.pl.syntax.PropositiontoPropositional(net.sf.tweety.logics.fol.syntax.FolAtom atom)Translates the given FOL-Atom into a Propositionnet.sf.tweety.logics.pl.syntax.PlFormulatoPropositional(net.sf.tweety.logics.fol.syntax.FolFormula folFormula)-
Methods inherited from class net.sf.tweety.logics.translators.Translator
createInstance, getTranslateInfo, translateAssociative, translateAtom, translatePredicate, translateRule, translateUsingMap
-
-
-
-
Method Detail
-
toPropositional
public net.sf.tweety.logics.pl.syntax.Proposition toPropositional(net.sf.tweety.logics.fol.syntax.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 net.sf.tweety.logics.fol.syntax.FolAtom toFOL(net.sf.tweety.logics.pl.syntax.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 net.sf.tweety.logics.fol.syntax.Disjunction toFOL(net.sf.tweety.logics.pl.syntax.Disjunction disjunction)
Translates the given propositional Disjunction to a FOL Disjunction- Parameters:
disjunction- a PL disjunction- Returns:
- The FOL Disjunction
-
toPropositional
public net.sf.tweety.logics.pl.syntax.Disjunction toPropositional(net.sf.tweety.logics.fol.syntax.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 net.sf.tweety.logics.pl.syntax.ExclusiveDisjunction toPropositional(net.sf.tweety.logics.fol.syntax.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 net.sf.tweety.logics.fol.syntax.Conjunction toFOL(net.sf.tweety.logics.pl.syntax.Conjunction conjunction)
Translates the given propositional Conjunction to a FOL Conjunction- Parameters:
conjunction- a PL conjunction- Returns:
- The FOL Conjunction
-
toPropositional
public net.sf.tweety.logics.pl.syntax.Conjunction toPropositional(net.sf.tweety.logics.fol.syntax.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 net.sf.tweety.logics.fol.syntax.FolFormula toFOL(net.sf.tweety.logics.pl.syntax.PlFormula propFormula)
-
toPropositional
public net.sf.tweety.logics.pl.syntax.PlFormula toPropositional(net.sf.tweety.logics.fol.syntax.FolFormula folFormula)
-
createTranslateMap
protected Map<Class<?>,net.sf.tweety.commons.util.Pair<Integer,Class<?>>> createTranslateMap()
- Specified by:
createTranslateMapin classTranslator
-
-