Class AspNlpTranslator
java.lang.Object
org.tweetyproject.logics.translators.Translator
org.tweetyproject.logics.translators.aspfol.AspFolTranslator
org.tweetyproject.logics.translators.aspnlp.AspNlpTranslator
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 org.tweetyproject.logics.translators.aspfol.AspFolTranslator
TT_NEGATION
Fields inherited from class org.tweetyproject.logics.translators.Translator
TT_ASSOC, TT_ATOM, TT_PREDICATE, TT_RULE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiontoASP
(NLPProgram program) Translate the given NLP-program into an ASP-program.Translates the given NLP-rule into an ASP Program.Methods inherited from class org.tweetyproject.logics.translators.aspfol.AspFolTranslator
toASP, toASP, toASP, toASP, toFOL, toFOL, toFOL, toFOL, translateUsingMap
Methods inherited from class org.tweetyproject.logics.translators.Translator
translateAssociative, translateAtom, translatePredicate, translateRule
-
Constructor Details
-
AspNlpTranslator
public AspNlpTranslator()
-
-
Method Details
-
toNLP
- Parameters:
program
- program- Returns:
- NLPProgram toNLP
-
toASP
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
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.
-