OKlibrary  0.2.1.6
Deficiency4.mac
Go to the documentation of this file.
00001 /* Oliver Kullmann, 31.5.2008 (Swansea) */
00002 /* Copyright 2008, 2010 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00022 oklib_include("OKlib/ComputerAlgebra/TestSystem/Lisp/Asserts.mac")$
00023 oklib_include("OKlib/ComputerAlgebra/Satisfiability/Lisp/MinimalUnsatisfiability/tests/Basics.mac")$
00024 oklib_include("OKlib/ComputerAlgebra/Satisfiability/Lisp/Backtracking/DLL_solvers.mac")$
00025 oklib_include("OKlib/ComputerAlgebra/Hypergraphs/Lisp/SetSystems.mac")$
00026 oklib_include("OKlib/ComputerAlgebra/Satisfiability/Lisp/ClauseSets/Statistics.mac")$
00027 
00028 kill(f)$
00029 
00030 
00031 /* Testing the characteristic properties of the special clause-sets showing
00032    the sharpness of the min-var-degree bound. */
00033 charprop_minvdegdef4(FF,n) := (
00034   assert(nvar_f(FF) = n+1),
00035   assert(FF[1] = setn(n+1)),
00036   assert(deficiency_fcs(FF) = 4),
00037   assert(min_unsat_bydef(FF,lambda([GG],dll_rk_trivial1(GG,1)))),
00038   assert(literal_degrees_list_fcs(FF) = [[3,2*n],[4,2]]),
00039   assert(variable_degrees_list_cs(FF[2]) = [[6,n-1],[7,2]])
00040 )$
00041 
00042 okltest_minvdegdef4(f) := (
00043   for n : 2 thru if oklib_test_level=0 then 3 else 5 do
00044     charprop_minvdegdef4(f(n),n),
00045   true)$
00046