Class 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
    • Constructor Detail

      • AspNlpTranslator

        public AspNlpTranslator()
    • Method Detail

      • 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.