Package net.sf.tweety.logics.pl.parser
Class DimacsParser
- java.lang.Object
-
- net.sf.tweety.commons.Parser<PlBeliefSet,PlFormula>
-
- net.sf.tweety.logics.pl.parser.DimacsParser
-
public class DimacsParser extends net.sf.tweety.commons.Parser<PlBeliefSet,PlFormula>
Parser a file in Dimacs format into a PlBeliefSet.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description protected Proposition[]prop_idxAn array representation of the propositions (for index mapping)
-
Constructor Summary
Constructors Constructor Description DimacsParser()
-
Method Summary
Modifier and Type Method Description PlBeliefSetparseBeliefBase(Reader reader)DisjunctionparseFormula(Reader reader)voidsetSignature(PlSignature sig)Sets the signature of this parser.
-
-
-
Field Detail
-
prop_idx
protected Proposition[] prop_idx
An array representation of the propositions (for index mapping)
-
-
Method Detail
-
setSignature
public void setSignature(PlSignature sig)
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
public PlBeliefSet parseBeliefBase(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseBeliefBasein classnet.sf.tweety.commons.Parser<PlBeliefSet,PlFormula>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
parseFormula
public Disjunction parseFormula(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseFormulain classnet.sf.tweety.commons.Parser<PlBeliefSet,PlFormula>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
-