- java.lang.Object
-
- org.logicng.io.parsers.FormulaParser
-
- org.logicng.io.parsers.PseudoBooleanParser
-
public final class PseudoBooleanParser extends FormulaParser
A parser for pseudo Boolean formulas.The syntax for pseudo Boolean formulas in LogicNG is:
$truefor the constant TRUE$falsefor the constant FALSE~for the negation|for the disjunction (OR)&for the conjunction (AND)=>for the implication<=>for the equivalence*for the multiplication of a literal and its coefficient+for the summation=for equals<=for less-equals<for less than>=for greater-equals>for greater than
(and). For variable names, there are the following rules:- must begin with a alphabetic character,
_,@, or# - can only contain alphanumerical character,
_, or# @is only allowed at the beginning of the variable name and is reserved for special internal variables
A valid pseudo Boolean expression is of the form
c_1 * l_1 + ... + c_n * l_n R kwhere thec_iare coefficients,l_iare literals, andRis one of=, >, >=, <, <=.- Since:
- 1.0
- Version:
- 2.4.1
-
-
Constructor Summary
Constructors Constructor Description PseudoBooleanParser(org.logicng.formulas.FormulaFactory f)Constructs a new parser for pseudo boolean formulas.
-