
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 four version of the graph colouring example from
the paper, using exception handling to handle backjumping.

allColours.pl
allColoursSWI.pl
allColoursStraight.pl
allColoursMulti.pl

For each of these, the top level predicate is main(+Num,-List), where
Num is instantiated to an integer indicating which problem instance to 
run the code with (there are 8 sample problems), and List is a 
satisfying colour assignment.

allColours.pl is the SICStus Prolog version in the paper

allColoursSWI.pl is the equivalent SWI version of the code

allColourStraight.pl realises backjumping using exception handling, but
without the use of currency via suspension for maintaining consistency

allColoursMulti.pl finds all failures following an assignment, and analyses
them to find the best backjump level