Class AspNlpTranslator
- java.lang.Object
-
- net.sf.tweety.logics.translators.Translator
-
- net.sf.tweety.logics.translators.aspfol.AspFolTranslator
-
- net.sf.tweety.logics.translators.aspnlp.AspNlpTranslator
-
public class AspNlpTranslator extends AspFolTranslator
Translates between DLP under the answer set semantics (ASP) and NLP. Because NLP is a kind of superset of FOL the Translator extends the AspFolTranslator.- Author:
- Tim Janus
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.logics.translators.aspfol.AspFolTranslator
TT_NEGATION
-
Fields inherited from class net.sf.tweety.logics.translators.Translator
TT_ASSOC, TT_ATOM, TT_PREDICATE, TT_RULE
-
-
Constructor Summary
Constructors Constructor Description AspNlpTranslator()
-
Method Summary
Modifier and Type Method Description Program
toASP(NLPProgram program)
Translate the given NLP-program into an ASP-program.Program
toASP(NLPRule rule)
Translates the given NLP-rule into an ASP Program.NLPProgram
toNLP(Program program)
-
Methods inherited from class net.sf.tweety.logics.translators.aspfol.AspFolTranslator
toASP, toASP, toASP, toASP, toFOL, toFOL, toFOL, toFOL, translateUsingMap
-
Methods inherited from class net.sf.tweety.logics.translators.Translator
translateAssociative, translateAtom, translatePredicate, translateRule
-
-
-
-
Method Detail
-
toNLP
public NLPProgram toNLP(Program program)
-
toASP
public Program toASP(NLPRule rule)
Translates the given NLP-rule into an ASP Program. A NLP rule might only be expressible by ASP with multiple rules. If the NLP rule is a :- b v c. Then the two ASP rules a :- b. and a :- c. Are generated. If Conjunctions exist in the head then a rule for every element of the conjunction in the head is generated. Those rules share the same body.- Parameters:
rule
- some rule- Returns:
- The ASP program that represens the rule given as parameter.
-
toASP
public Program toASP(NLPProgram program)
Translate the given NLP-program into an ASP-program.- Parameters:
program
- The NLP-program that is translated- Returns:
- A ASP-program representing the given NLP-program.
-
-