anchor.diff:           (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
  
positive.code:   "Create a new instance of SAT solver."
    (cmsat-new))
  
  (defun add-new-vars (solver cnt)
    "Add <cnt> new vars to the solver"
    (cmsat-new-vars solver cnt))
  
negative.code: (defcstruct slice-lbool- (vals (:pointer c-lbool)) (num-vals :uint))
  (defctype slice-lbool (:struct slice-lbool-))
  
  (defcstruct slice-lit- (vals (:pointer c-lit)) (num-vals :uint))
  (defctype slice-lit (:struct slice-lit-))
  
  (defcfun "cmsat_new" (:pointer (:struct SATSolver)))
  
  (defcfun "cmsat_free" :void (solver (:pointer (:struct SATSolver))))
  
  (defcfun "cmsat_set_num_threads"
    :void
    (self (:pointer (:struct SATSolver))) (n :unsigned-int))
  
  (defcfun "cmsat_nvars" :unsigned-int (self (:pointer (:struct SATSolver))))
  
  (defcfun "cmsat_new_vars"
    :void
  