
Copyright (c) 2020  Jacob M. Howe <j.m.howe@city.ac.uk>
                    Ed Robbins <er209@kent.ac.uk>
                    Andy King <a.m.king@kent.ac.uk> 

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
 
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIESWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

If using this code, please cite: "Backjumping is Exception Handling," 
Robbins, E., King, A., Howe, J. M. Under consideration, 2020.

This folder contains code for a range of SAT solvers implementing
Conflict Driven Clause Learning realised by using exception handling
as a mechanism for realising backjumping.

It contains the following files and folders.

cdcl_last_uip.pl
cdcl_first_uip.pl
cdcl_first_uip_swi.pl
benchmark.pl
cdcl_first_uip_inst.pl
benchmark_inst.pl
parser.pl
static_var_order.pl
auxiliaries.pl
benchmarks/

The first of these:

cdcl_last_uip.pl

is the code as given in the paper, using last UIP to learn 
clauses from the implication graph.

The next group uses first UIP to learn clauses from the 
implication graph.  There are version for both SICStus
and SWI.  This is the recommended version of the code.
The benchmark.pl code will produce a table of timing
results that can be run with k-learning for various k.

cdcl_first_uip.pl
cdcl_first_uip_swi.pl
benchmark.pl

The next group is similar to above, but code is more
heavily instrument to record numbers of variables
assignments, backjumps and assignments jumped over.
Compile benchmark_inst.pl and call run_benchmarks 
(selecting a chosen folder of benchmarks), which will output
a LaTeX table of results.  

cdcl_first_uip_inst.pl
benchmark_inst.pl

The remaining files are helper files: parser reads in DIMACS
format SAT instances, static_variable_order.pl implements
a tactic that orders variables by their occurrence in the
SAT instance, and can give a big performance improvement 
(it is not used in the experiments; it can be used by uncommenting
its occurrence in the code).  auxiliaries.pl contains
further code for outputing data.

parser.pl
static_var_order.pl
auxiliaries.pl

Finally, benchmarks are included.

benchmarks/
