Class AspFolTranslator
java.lang.Object
org.tweetyproject.logics.translators.Translator
org.tweetyproject.logics.translators.aspfol.AspFolTranslator
- Direct Known Subclasses:
AspNlpTranslator
This Translator can translate between FOL and ASP literals (without default
negated literals).
- Author:
- Tim Janus
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant representing translation type for negationFields inherited from class org.tweetyproject.logics.translators.Translator
TT_ASSOC, TT_ATOM, TT_PREDICATE, TT_RULE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoASP(Disjunction source) Translates a FOL Disjunction into an ASP ClassicalHead.Translates a FolAtom to its corresponding ASPAtom.toASP(FolFormula source) Translates a FolFormula to an ASPLiteral.Translates a Negation from FOL into a StrictNegation for ASP.Translates an ASPAtom to its corresponding FolAtom.toFOL(ASPLiteral source) Translates an ASPLiteral to a FolFormula.toFOL(ClassicalHead source) Translates a ClassicalHead (ASP disjunction) to a FOL Disjunction.toFOL(StrictNegation source) Translates a StrictNegation into a Negation for FOL.Translates the given formula using the translation map, handling custom logic for negations if needed.Methods inherited from class org.tweetyproject.logics.translators.Translator
translateAssociative, translateAtom, translatePredicate, translateRule
-
Field Details
-
TT_NEGATION
public static final int TT_NEGATIONConstant representing translation type for negation- See Also:
-
-
Constructor Details
-
AspFolTranslator
public AspFolTranslator()Default constructor for the AspFolTranslator class
-
-
Method Details
-
toFOL
-
toASP
-
toASP
Translates a FolFormula to an ASPLiteral. If the formula is an atom or negation, it will translate accordingly.- Parameters:
source- the FolFormula to be translated- Returns:
- the translated ASPLiteral
-
toFOL
Translates a StrictNegation into a Negation for FOL.- Parameters:
source- the StrictNegation to be translated- Returns:
- the translated Negation
-
toASP
Translates a Negation from FOL into a StrictNegation for ASP.- Parameters:
source- the Negation to be translated- Returns:
- the translated StrictNegation
-
toFOL
Translates an ASPLiteral to a FolFormula. If the literal is an atom or negation, it will translate accordingly.- Parameters:
source- the ASPLiteral to be translated- Returns:
- the translated FolFormula
-
toFOL
Translates a ClassicalHead (ASP disjunction) to a FOL Disjunction.- Parameters:
source- the ClassicalHead to be translated- Returns:
- the translated Disjunction
-
toASP
Translates a FOL Disjunction into an ASP ClassicalHead.- Parameters:
source- the Disjunction to be translated- Returns:
- the translated ClassicalHead
-
translateUsingMap
Translates the given formula using the translation map, handling custom logic for negations if needed.- Overrides:
translateUsingMapin classTranslator- Parameters:
source- the source formula to be translated- Returns:
- the translated SimpleLogicalFormula or null if no translation could be performed
-