This page defines a suggested standard for the input and output formats of quantified Boolean formulas (QBFs) solvers. The proposed standard is a stricter version of the original QDIMACS draft which, in turn, is built on top of the DIMACS standard for SAT solvers. The standard is comprised of two specifications:
For questions, comments and any other issue regarding the QDIMACS suggested standard please get in touch with qbfeval AT qbflib DOT org.
The input format is described by the following BNF grammar:
<input> ::= <preamble> <prefix> <matrix> EOF <preamble> ::= [<comment_lines>] <problem_line> <comment_lines> ::= <comment_line> <comment_lines> | <comment_line> <comment_line> ::= c <text> EOL <problem_line> ::= p cnf <pnum> <pnum> EOL <prefix> ::= [<quant_sets>] <quant_sets> ::= <quant_set> <quant_sets> | <quant_set> <quant_set> ::= <quantifier> <atom_set> 0 EOL <quantifier> ::= e | a <atom_set> ::= <pnum> <atom_set> | <pnum> <matrix> ::= <clause_list> <clause_list> ::= <clause> <clause_list> | <clause> <clause> ::= <literal> <clause> | <literal> 0 EOL <literal> ::= <num> <text> ::= {A sequence of non-special ASCII characters} <num> ::= {A 32-bit signed integer different from 0} <pnum> ::= {A 32-bit signed integer greater than 0}where the terminal symbols
EOL
and EOF
stand for the
end-of-line and end-of-file markers respectively, [<expr>]
denotes that <expr>
is an optional expression, and
concatenation of expressions has precedence over choice between expressions.
The syntax above is subject to the following additional constraints:
<clause>
expressions which <matrix>
is comprised of.
p cnf 4 2 e 1 2 0 e 3 4 0 -1 2 0 2 -3 -4 0Wrong! Contiguous ' e ' sets
|
p cnf 4 2 e 1 2 3 4 0 -1 2 0 2 -3 -4 0Ok! Single ' e ' set
|
p cnf 4 2 -1 2 0 2 -3 -4 0Ok! DIMACS compatibility |
e
'.The output format is described by the following BNF grammar:
<output> ::= <preamble> [<certificate>] EOF <preamble> ::= [<comment_lines>] <solution_line> <comment_lines> ::= <comment_line> <comment_lines> | <comment_line> <comment_line> ::= c <text> EOL <solution_line> ::= s cnf <answer> <pnum> <pnum> EOL <answer> ::= 1 | 0 | -1 <certificate> ::= <cert_lines> <cert_lines> ::= <cert_line> <cert_lines> | <cert_line> <cert_line> ::= V <literal> EOL <literal> ::= <num> <text> ::= {A sequence of non-special ASCII characters} <num> ::= {A 32-bit signed integer different from 0} <pnum> ::= {A 32-bit signed integer greater than 0}and it is subject to the following additional constraints:
1
, 0
, or
-1
indicating that the input QBF was found true, false, or remained
unsolved, respectively.a
' and the answer is
0
, ore
' and the answer is
1
.