anchor.diff:    (:unix "libcryptominisat5.so")
     (t (:default "libcryptominisat5.so")))
   (load-foreign-library 'libcryptominisat)
  +
  +; TODO: add_xor_clause?
   
   ; Describe the C interface.
   
  
positive.code:   c-lbool
    (self (:pointer (:struct SATSolver))))
  
  (defcfun "cmsat_get_model"
    slice-lbool
    (self (:pointer (:struct SATSolver))))
  
  
  
negative.code:          (num-vals (getf model 'num-vals)))
      (loop for i from 0 to (1- num-vals)
            collect (foreign-slot-value (mem-aref (getf model 'vals) 'c-lbool i) 'c-lbool 'x))))
  
  (defun get-conflict (solver)
    "Return the found conflict in the SAT problem."
    ; TODO: decode literals.
    (let* ((conflict (cmsat-get-conflict solver))
           (num-vals (getf conflict 'num-vals)))
      (loop for i from 0 to (1- num-vals)
            collect (foreign-slot-value (mem-aref (getf model 'vals) 'c-lit i) 'c-lit 'x))))
  
  
  ; Use the interface
  