Logic Programming with Graph Automorphism: Integrating nauty with Prolog (Tool Description)

This paper presents the plnauty~library, a Prolog interface to the nauty graph-automorphism tool. Adding the capabilities of nauty to Prolog combines the strength of the "generate and prune" approach that is commonly used in logic programming and constraint solving, with the ability to reduce symmetries while reasoning over graph objects. Moreover, it enables the integration of nauty in existing tool-chains, such as SAT-solvers or finite domain constraints compilers which exist for Prolog. The implementation consists of two components: plnauty, an interface connecting \nauty's C library with Prolog, and plgtools, a Prolog framework integrating the software component of nauty, called gtools, with Prolog. The complete tool is available as a SWI-Prolog module. We provide a series of usage examples including two that apply to generate Ramsey graphs. This paper is under consideration for publication in TPLP.

[1]  Igor L. Markov,et al.  Solving difficult instances of Boolean satisfiability in the presence of symmetry , 2003, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[2]  Michael Frank,et al.  Computing the Ramsey number R(4,3,3) using abstraction and symmetry breaking , 2016, Constraints.

[3]  S. Radziszowski Small Ramsey Numbers , 2011 .

[4]  Michael Frank,et al.  Sorting nine inputs requires twenty-five comparisons , 2016, J. Comput. Syst. Sci..

[5]  Igor L. Markov,et al.  Exploiting structure in symmetry detection for CNF , 2004, Proceedings. 41st Design Automation Conference, 2004..

[6]  Dinesh P. Mehta,et al.  Random Models and Analyses for Chemical Graphs , 2015, Int. J. Found. Comput. Sci..

[7]  Tom Schrijvers,et al.  Under Consideration for Publication in Theory and Practice of Logic Programming Swi-prolog , 2022 .

[8]  Peter J. Stuckey,et al.  Breaking Symmetries in Graph Representation , 2013, IJCAI.

[9]  V. S. Costa,et al.  Theory and Practice of Logic Programming , 2010 .

[10]  James M. Crawford,et al.  Symmetry-Breaking Predicates for Search Problems , 1996, KR.

[11]  Peter J. Stuckey,et al.  Boolean Equi-propagation for Concise and Efficient SAT Encodings of Combinatorial Problems , 2013, J. Artif. Intell. Res..

[12]  Brendan D. McKay,et al.  Practical graph isomorphism, II , 2013, J. Symb. Comput..

[13]  Petteri Kaski,et al.  Engineering an Efficient Canonical Labeling Tool for Large and Sparse Graphs , 2007, ALENEX.

[14]  A. J. Radcliffe,et al.  McKay ’ s Canonical Graph Labeling Algorithm , 2008 .

[15]  László Babai,et al.  Graph isomorphism in quasipolynomial time [extended abstract] , 2015, STOC.

[16]  B. McKay nauty User ’ s Guide ( Version 2 . 4 ) , 1990 .

[17]  Michael Codish,et al.  Compiling finite domain constraints to SAT with BEE* , 2012, Theory and Practice of Logic Programming.