Package org.tweetyproject.lp.asp.parser
Class AspifParser
java.lang.Object
org.tweetyproject.lp.asp.parser.AspifParser
This class is a parser for the aspif (ASP Intermediate Format) format, the output language of gringo
(https://potassco.org/clingo/).
Note that parsing is only supported for rules, optimize statements and output statements, but not for advanced statement types such as #external statements, #heuristic directives or theory terms. A description of the format can be found in the appendix of [Gebser, Kaminski, Kaufmann, Ostrowski, Schaub, Wanko. Theory Solving Made Easy with Clingo 5 (Extended Version). 2016].
Note that parsing is only supported for rules, optimize statements and output statements, but not for advanced statement types such as #external statements, #heuristic directives or theory terms. A description of the format can be found in the appendix of [Gebser, Kaminski, Kaufmann, Ostrowski, Schaub, Wanko. Theory Solving Made Easy with Clingo 5 (Extended Version). 2016].
- Author:
- Anna Gessler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseProgram
(String output) Parses output in the aspif format and returns the resulting program.parseProgramFile
(String filename) Parses the file of the given filename in the aspif format and returns the resulting program.
-
Constructor Details
-
AspifParser
public AspifParser()Create a new AspifParser.
-
-
Method Details
-
parseProgram
Parses output in the aspif format and returns the resulting program.- Parameters:
output
- parseProgram- Returns:
- ASP Program
- Throws:
ParseException
- parseProgram
-
parseProgramFile
public Program parseProgramFile(String filename) throws FileNotFoundException, IOException, ParseException Parses the file of the given filename in the aspif format and returns the resulting program.- Parameters:
filename
- the name of a file- Returns:
- a belief base
- Throws:
FileNotFoundException
- if the file is not foundIOException
- if some IO issue occurred.ParseException
- parseProgramFile
-