QDIMACS standard

Version 1.1

Released on December 21, 2005


[Introduction] - [Input format] - [Output format]

Introduction

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.


[Introduction] - [Input format] - [Output format]

Input format

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:


[Introduction] - [Input format] - [Output format]

Output format

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: