Package net.sf.tweety.logics.pcl.parser
Class PclParser
- java.lang.Object
-
- net.sf.tweety.commons.Parser<PclBeliefSet,ProbabilisticConditional>
-
- net.sf.tweety.logics.pcl.parser.PclParser
-
public class PclParser extends net.sf.tweety.commons.Parser<PclBeliefSet,ProbabilisticConditional>
This class implements a parser for probabilistic conditional logic. The BNF for a conditional knowledge base is given by (starting symbol is KB)
KB ::== (CONDITIONAL "\n")*
CONDITIONAL ::== "(" FORMULA ")" "[" PROB "]" | "(" FORMULA "|" FORMULA ")" "[" PROB "]"
FORMULA ::== PROPOSITION | "(" FORMULA ")" | FORMULA "&&" FORMULA | FORMULA "||" FORMULA | "!" FORMULA | "+" | "-"
where PROPOSITION is a sequence of symbols from {a,...,z,A,...,Z,0,...,9} with a letter at the beginning and PROB is a float in [0,1].- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description PclParser()
-
Method Summary
Modifier and Type Method Description PclBeliefSetparseBeliefBase(Reader reader)ProbabilisticConditionalparseFormula(Reader reader)
-
-
-
Method Detail
-
parseBeliefBase
public PclBeliefSet parseBeliefBase(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseBeliefBasein classnet.sf.tweety.commons.Parser<PclBeliefSet,ProbabilisticConditional>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
parseFormula
public ProbabilisticConditional parseFormula(Reader reader) throws IOException, net.sf.tweety.commons.ParserException
- Specified by:
parseFormulain classnet.sf.tweety.commons.Parser<PclBeliefSet,ProbabilisticConditional>- Throws:
IOExceptionnet.sf.tweety.commons.ParserException
-
-