Package net.sf.tweety.logics.qbf.writer
Class QdimacsWriter
- java.lang.Object
-
- net.sf.tweety.logics.qbf.writer.QdimacsWriter
-
public class QdimacsWriter extends java.lang.ObjectConverts belief bases to QDIMACS format and prints them.
Notes:
- Currently only works for belief bases that have only quantifiers in the left portion of each formula and have only unquantified formulas in the right portion of each formula.
- The right portion of the formulas does not need to be in any special form (it will be converted to cnf).- Author:
- Anna Gessler
-
-
Field Summary
Fields Modifier and Type Field Description booleanDISABLE_PREAMBLE_ZERORemoves zero at the end of the problem line (workaround for some solvers).java.lang.Booleanspecial_formula_flagWill be set to true/false if the input can be simplified to a tautology/contradiction.
-
Constructor Summary
Constructors Constructor Description QdimacsWriter()Creates a new QDIMACS writer.QdimacsWriter(java.io.Writer writer)Creates a new QDIMACS writer.
-
Method Summary
Modifier and Type Method Description voidclose()java.lang.StringprintBase(PlBeliefSet kb)java.lang.StringprintVariables(java.util.Set<Proposition> vars, java.util.List<Proposition> mappings)
-
-
-
Field Detail
-
DISABLE_PREAMBLE_ZERO
public boolean DISABLE_PREAMBLE_ZERO
Removes zero at the end of the problem line (workaround for some solvers).
-
special_formula_flag
public java.lang.Boolean special_formula_flag
Will be set to true/false if the input can be simplified to a tautology/contradiction. Used in some of the solver wrappers to immediately return true/false instead of calling the solver in case of a tautology/contradiction.
-
-
Method Detail
-
printBase
public java.lang.String printBase(PlBeliefSet kb) throws java.io.IOException
- Throws:
java.io.IOException
-
printVariables
public java.lang.String printVariables(java.util.Set<Proposition> vars, java.util.List<Proposition> mappings)
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
-