Class DimacsParser
java.lang.Object
org.tweetyproject.commons.Parser<PlBeliefSet,PlFormula>
org.tweetyproject.logics.pl.parser.DimacsParser
- Direct Known Subclasses:
QdimacsParser
Parser a file in Dimacs format into a PlBeliefSet.
- Author:
- Matthias Thimm
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionparseBeliefBase
(Reader reader) Parses the given reader into a belief base of the given type.parseFormula
(Reader reader) Parses the given reader into a formula of the given type.void
setSignature
(PlSignature sig) Sets the signature of this parser.Methods inherited from class org.tweetyproject.commons.Parser
isNumeric, parseBeliefBase, parseBeliefBaseFromFile, parseFormula, parseFormulaFromFile, parseListOfBeliefBases, parseListOfBeliefBases, parseListOfBeliefBasesFromFile, parseListOfBeliefBasesFromFile
-
Constructor Details
-
DimacsParser
public DimacsParser()Default Constructor
-
-
Method Details
-
setSignature
Sets the signature of this parser. Note that the natural order of the atoms in the signature (as returned by an iterator) is used for indexing variables in clauses.- Parameters:
sig
- some signature
-
parseBeliefBase
Description copied from class:Parser
Parses the given reader into a belief base of the given type.- Specified by:
parseBeliefBase
in classParser<PlBeliefSet,
PlFormula> - Parameters:
reader
- a reader- Returns:
- a belief base
- Throws:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-
parseFormula
Description copied from class:Parser
Parses the given reader into a formula of the given type.- Specified by:
parseFormula
in classParser<PlBeliefSet,
PlFormula> - Parameters:
reader
- a reader- Returns:
- a formula
- Throws:
IOException
- if some IO issue occurred.ParserException
- some parsing exceptions may be added here.
-