big update
ffi.lisp
Sun Jan 7 17:49:57 PST 2007 kilian.sprotte@gmail.com
* big update
The API resembles much more the original gecode one.
Added support for finite sets.
Can now use BAB search.
--- old-gecol/ffi.lisp 2014-04-17 12:25:20.000000000 -0700
+++ new-gecol/ffi.lisp 2014-04-17 12:25:20.000000000 -0700
@@ -1,3 +1,4 @@
+
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: GECOL; Base: 10 -*-
;;; arch-tag: 09C25807-504D-487A-B9D3-275276CF17B1
@@ -29,6 +30,11 @@
(in-package :gecol)
+(defmacro defcfun* (name &rest args)
+ `(progn
+ (export ',(if (listp name) (second name) name))
+ (defcfun ,name ,@args)))
+
(defcenum int-rel-type
:irt-= ; =
:irt-/= ; /=
@@ -61,260 +67,102 @@
:sot-minus ; difference
)
-(defcfun ("create_space" create-space) :pointer
- (varnum :int)
- (varmin :int)
- (varmax :int)
- (boolnum :int)
- (setnum :int))
-
-(defcfun ("dispose_space" dispose-space) :void
- (space :pointer))
-
-(defcfun ("create_search_engine" create-search-engine) :pointer
- (space :pointer))
-
-(defcfun ("dispose_search_engine" dispose-search-engine) :void
- (engine :pointer))
-
-(defcfun ("search_next" search-next) :pointer
- (engine :pointer))
-
-(defcfun space-read-int :int
- (space :pointer)
- (index :int))
-
-(defcfun space-read-bool :boolean
- (space :pointer)
- (index :int))
-
-(defcfun gec-branch-vars-min :void
- (space :pointer))
-
-(defcfun gec-branch-vars-med :void
- (space :pointer))
-
-(defcfun gec-branch-vars-max :void
- (space :pointer))
-
-(defcfun ("gec_rel_var" gec-rel-var) :void
- (space :pointer)
- (x :int)
- (type int-rel-type)
- (y :int)
- (level int-con-level))
-
-(defcfun ("gec_rel_const" gec-rel-const) :void
- (space :pointer)
- (x :int)
- (type int-rel-type)
- (c :int)
- (level int-con-level))
-
-(defcfun ("gec_rel_reif" gec-rel-reif) :void
- (space :pointer)
- (x :int)
- (type int-rel-type)
- (y :int)
- (b :int)
- (level int-con-level))
-
-(defcfun ("gec_dom_var" gec-dom-var) :void
- (space :pointer)
- (x :int)
- (min :int)
- (max :int)
- (level int-con-level))
-
-(defcfun ("gec_dom_var_set" %gec-dom-var-set) :void
- (space :pointer)
- (x :int)
- (dom :pointer)
- (n :int)
- (level int-con-level))
+(defcenum bvar-sel
+ :bvar-none
+ :bvar-min-min
+ :bvar-min-max
+ :bvar-max-min
+ :bvar-max-max
+ :bvar-size-min
+ :bvar-size-max
+ :bvar-degree-min
+ :bvar-degree-max
+ :bvar-regret-min-min
+ :bvar-regret-min-max
+ :bvar-regret-max-min
+ :bvar-regret-max-max
+ )
-(defcfun ("gec_linear_var" %gec-linear-var) :void
- (space :pointer)
- (res :int)
- (type int-rel-type)
- (xs :pointer)
- (n :int)
- (level int-con-level))
+(defcenum bval-sel
+ :bval-min
+ :bval-med
+ :bval-max
+ :bval-split-min
+ :bval-split-max
+ )
-(defcfun ("gec_linear_const" %gec-linear-const) :void
- (space :pointer)
- (res :int)
- (type int-rel-type)
- (xs :pointer)
+;; IntSet
+(defcfun* ("make_IntSet_int_int" make-intset-int-int) :pointer
(n :int)
- (level int-con-level))
-
-(defcfun ("gec_distinct" %gec-distinct) :void
- (space :pointer)
- (xs :pointer)
- (n :int)
- (level int-con-level))
-
-(defcfun ("gec_distance" gec-distance) :void
- (space :pointer)
- (res :int)
- (a :int)
- (b :int))
-
-(defcfun gec-distance-const :void
- (space :pointer)
- (res :int)
- (a :int)
- (b :int))
-
-(defcfun ("gec_min" gec-min) :void
- (space :pointer)
- (res :int)
- (a :int)
- (b :int)
- (level int-con-level))
-
-(defcfun ("gec_max" gec-max) :void
- (space :pointer)
- (res :int)
- (a :int)
- (b :int)
- (level int-con-level))
-
-(defcfun ("gec_mult" gec-mult) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
-
-(defcfun ("gec_minus" gec-minus) :void
- (space :pointer)
- (res :int)
- (a :int)
- (b :int)
- (level int-con-level))
-
-(defcfun ("gec_bool_eq" gec-bool-eq) :void
- (space :pointer)
- (a :int)
- (b :int)
- (level int-con-level))
-
-(defcfun ("gec_bool_eq_const" gec-bool-eq-const) :void
- (space :pointer)
- (a :int)
- (const :int)
- (level int-con-level))
-
-(defcfun ("gec_bool_not" gec-bool-not) :void
- (space :pointer)
- (a :int)
- (res :int)
- (level int-con-level))
+ (m :int))
-(defcfun ("gec_bool_and" gec-bool-and) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("make_IntSet_intarray_int" make-intset-intarray-int) :pointer
+ (r :pointer)
+ (n :int))
-(defcfun ("gec_bool_and_const" gec-bool-and-const) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_size" intset-size) :int
+ (intset :pointer))
-(defcfun ("gec_bool_or" gec-bool-or) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_min_int" intset-min-int) :int
+ (intset :pointer)
+ (i :int))
-(defcfun ("gec_bool_or_const" gec-bool-or-const) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_max_int" intset-max-int) :int
+ (intset :pointer)
+ (i :int))
-(defcfun ("gec_bool_xor" gec-bool-xor) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_width_int" intset-width-int) :unsigned-int
+ (intset :pointer)
+ (i :int))
-(defcfun ("gec_bool_xor_const" gec-bool-xor-const) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
-
-(defcfun ("gec_bool_imp" gec-bool-imp) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_min" intset-min) :int
+ (intset :pointer))
-(defcfun ("gec_bool_imp_const" gec-bool-imp-const) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
-
-(defcfun ("gec_bool_eqv" gec-bool-eqv) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("IntSet_max" intset-max) :int
+ (intset :pointer))
-(defcfun ("gec_bool_eqv_const" gec-bool-eqv-const) :void
- (space :pointer)
- (a :int)
- (b :int)
- (res :int)
- (level int-con-level))
+(defcfun* ("delete_IntSet" delete-intset) :void
+ (intset :pointer))
-(defcfun ("gec_int_assigned" gec-int-assigned) :boolean
+;; IntVar
+(defcfun* ("make_IntVar_Space_int_int" make-intvar-space-int-int) :pointer
(space :pointer)
- (x :int))
+ (min :int)
+ (max :int))
+(defcfun* ("IntVar_assigned" intvar-assigned) :boolean
+ (intvar :pointer))
+(defcfun* ("IntVar_val" intvar-val) :int
+ (intvar :pointer))
+(defcfun* ("delete_IntVar" delete-intvar) :void
+ (intvar :pointer))
+
+;; Space
+(defcfun ("make_GecolSpace" %make-gecolspace) :pointer
+ (intnum :int)
+ (intmin :int)
+ (intmax :int)
+ (boolnum :int)
+ (setnum :int)
+ (bab-intvar-ind :int)
+ (bab-intreltype int-rel-type))
-(defcfun ("gec_bool_assigned" gec-bool-assigned) :boolean
- (space :pointer)
- (x :int))
+(defcfun* ("delete_GecolSpace" delete-gecolspace) :void
+ (gecolspace :pointer))
-(defcfun ("gec_element_const" %gec-element-const) :void
+(defcfun* ("GecolSpace_getInt_int" gecolspace-getint-int) :pointer
(space :pointer)
- (ns :pointer)
- (n :int)
- (x0 :int)
- (x1 :int)
- (level int-con-level))
+ (ind :int))
-(defcfun ("gec_element_vars" %gec-element-vars) :void
+(defcfun* ("GecolSpace_getBool_int" gecolspace-getbool-int) :pointer
(space :pointer)
- (xs :pointer)
- (n :int)
- (x0 :int)
- (x1 :int)
- (level int-con-level))
+ (ind :int))
-(defcfun ("gec_mod_12" gec-mod-12) :void
+(defcfun* ("GecolSpace_getSet_int" gecolspace-getset-int) :pointer
+ "Access SetVar at IND in SPACE."
(space :pointer)
- (x :int)
- (m :int))
-
-;;; Sets
+ (ind :int))
-(defcfun gec-fs-space-put :void
+(defcfun* ("GecolSpace_putSet_int_SetVar" gecolspace-putset-int-setvar) :void
"Place the SetVar SET into SPACE.
After SPACE has been constructed with only the number of
SetVars given, this needs to be done for each one.
@@ -325,10 +173,367 @@
(ind :int)
(set :pointer))
-(defcfun gec-fs-space-get :pointer
- "Access SetVar at IND in SPACE."
+;;; DFS
+(defcfun ("make_DFS_Space_int_int_Stop" %make-dfs-space-int-int-stop) :pointer
(space :pointer)
- (ind :int))
+ (c-d :int)
+ (a-d :int)
+ (st :pointer))
+
+(defcfun* ("delete_DFS" delete-dfs) :void
+ (dfs :pointer))
+
+(defcfun* ("DFS_next" dfs-next) :pointer
+ (dfs :pointer))
+
+;;; BAB
+(defcfun ("make_BAB_Space_int_int_Stop" %make-bab-space-int-int-stop) :pointer
+ (space :pointer)
+ (c-d :int)
+ (a-d :int)
+ (st :pointer))
+
+(defcfun* ("delete_BAB" delete-bab) :void
+ (bab :pointer))
+
+(defcfun* ("BAB_next" bab-next) :pointer
+ (bab :pointer))
+
+;;;;;;;;;
+
+(defcfun*
+ ("branch_intvarargs_bvarsel_bvalsel" branch-intvarargs-bvarsel-bvalsel) :void
+ (home :pointer) (x :pointer) (vars bvar-sel) (vals bval-sel))
+(defcfun*
+ ("linear_intvarargs_intreltype_int_intconlevel"
+ linear-intvarargs-intreltype-int-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (c :int)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intvarargs_intreltype_intvar_intconlevel"
+ linear-intvarargs-intreltype-intvar-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (y :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intvarargs_intreltype_int_boolvar_intconlevel"
+ linear-intvarargs-intreltype-int-boolvar-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (c :int) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intvarargs_intreltype_intvar_boolvar_intconlevel"
+ linear-intvarargs-intreltype-intvar-boolvar-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (y :pointer) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intargs_intvarargs_intreltype_int_intconlevel"
+ linear-intargs-intvarargs-intreltype-int-intconlevel)
+ :void (home :pointer) (a :pointer) (x :pointer) (r int-rel-type) (c :int)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intargs_intvarargs_intreltype_intvar_intconlevel"
+ linear-intargs-intvarargs-intreltype-intvar-intconlevel)
+ :void (home :pointer) (a :pointer) (x :pointer) (r int-rel-type) (y :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("linear_intargs_intvarargs_intreltype_int_boolvar_intconlevel"
+ linear-intargs-intvarargs-intreltype-int-boolvar-intconlevel)
+ :void (home :pointer) (a :pointer) (x :pointer) (r int-rel-type) (c :int)
+ (b :pointer) (icl int-con-level))
+(defcfun*
+ ("linear_intargs_intvarargs_intreltype_intvar_boolvar_intconlevel"
+ linear-intargs-intvarargs-intreltype-intvar-boolvar-intconlevel)
+ :void (home :pointer) (a :pointer) (x :pointer) (r int-rel-type) (y :pointer)
+ (b :pointer) (icl int-con-level))
+(defcfun*
+ ("linear_boolvarargs_intreltype_int_intconlevel"
+ linear-boolvarargs-intreltype-int-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (c :int)
+ (icl int-con-level))
+(defcfun*
+ ("linear_boolvarargs_intreltype_intvar_intconlevel"
+ linear-boolvarargs-intreltype-intvar-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (y :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intvarargs_intvarargs_intvarargs_intvarargs_intvarargs_intargs_bool_intconlevel"
+ cumulatives-intvarargs-intvarargs-intvarargs-intvarargs-intvarargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intargs_intvarargs_intvarargs_intvarargs_intvarargs_intargs_bool_intconlevel"
+ cumulatives-intargs-intvarargs-intvarargs-intvarargs-intvarargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intvarargs_intvarargs_intargs_intvarargs_intvarargs_intargs_bool_intconlevel"
+ cumulatives-intvarargs-intvarargs-intargs-intvarargs-intvarargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intargs_intvarargs_intargs_intvarargs_intvarargs_intargs_bool_intconlevel"
+ cumulatives-intargs-intvarargs-intargs-intvarargs-intvarargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intvarargs_intvarargs_intvarargs_intvarargs_intargs_intargs_bool_intconlevel"
+ cumulatives-intvarargs-intvarargs-intvarargs-intvarargs-intargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intargs_intvarargs_intvarargs_intvarargs_intargs_intargs_bool_intconlevel"
+ cumulatives-intargs-intvarargs-intvarargs-intvarargs-intargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intvarargs_intvarargs_intargs_intvarargs_intargs_intargs_bool_intconlevel"
+ cumulatives-intvarargs-intvarargs-intargs-intvarargs-intargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("cumulatives_intargs_intvarargs_intargs_intvarargs_intargs_intargs_bool_intconlevel"
+ cumulatives-intargs-intvarargs-intargs-intvarargs-intargs-intargs-bool-intconlevel)
+ :void (home :pointer) (machine :pointer) (start :pointer) (duration :pointer)
+ (end :pointer) (height :pointer) (limit :pointer) (at_most :boolean)
+ (icl int-con-level))
+(defcfun* ("eq_intvar_intvar_intconlevel" eq-intvar-intvar-intconlevel) :void
+ (home :pointer) (x0 :pointer) (x1 :pointer) (icl int-con-level))
+(defcfun* ("eq_intvar_int_intconlevel" eq-intvar-int-intconlevel) :void
+ (home :pointer) (x :pointer) (n :int) (icl int-con-level))
+(defcfun*
+ ("eq_intvar_intvar_boolvar_intconlevel" eq-intvar-intvar-boolvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (x1 :pointer) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("eq_intvar_int_boolvar_intconlevel" eq-intvar-int-boolvar-intconlevel) :void
+ (home :pointer) (x :pointer) (n :int) (b :pointer) (icl int-con-level))
+(defcfun* ("eq_intvarargs_intconlevel" eq-intvarargs-intconlevel) :void
+ (home :pointer) (x :pointer) (icl int-con-level))
+(defcfun*
+ ("count_intvarargs_int_intreltype_int_intconlevel"
+ count-intvarargs-int-intreltype-int-intconlevel)
+ :void (home :pointer) (x :pointer) (n :int) (r int-rel-type) (m :int)
+ (icl int-con-level))
+(defcfun*
+ ("count_intvarargs_intvar_intreltype_int_intconlevel"
+ count-intvarargs-intvar-intreltype-int-intconlevel)
+ :void (home :pointer) (x :pointer) (y :pointer) (r int-rel-type) (m :int)
+ (icl int-con-level))
+(defcfun*
+ ("count_intvarargs_int_intreltype_intvar_intconlevel"
+ count-intvarargs-int-intreltype-intvar-intconlevel)
+ :void (home :pointer) (x :pointer) (n :int) (r int-rel-type) (z :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("count_intvarargs_intvar_intreltype_intvar_intconlevel"
+ count-intvarargs-intvar-intreltype-intvar-intconlevel)
+ :void (home :pointer) (x :pointer) (y :pointer) (r int-rel-type) (z :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_intargs_int_int_int_int_int_intconlevel"
+ gcc-intvarargs-intargs-int-int-int-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (c :pointer) (m :int) (unspec_low :int)
+ (unspec_up :int) (min :int) (max :int) (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_intargs_int_int_int_int_intconlevel"
+ gcc-intvarargs-intargs-int-int-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (c :pointer) (m :int) (unspec :int)
+ (min :int) (max :int) (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_int_int_intconlevel" gcc-intvarargs-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (lb :int) (ub :int) (icl int-con-level))
+(defcfun* ("gcc_intvarargs_int_intconlevel" gcc-intvarargs-int-intconlevel)
+ :void (home :pointer) (x :pointer) (ub :int) (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_intvarargs_int_int_intconlevel"
+ gcc-intvarargs-intvarargs-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (c :pointer) (min :int) (max :int)
+ (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_intargs_intvarargs_int_int_int_bool_int_int_intconlevel"
+ gcc-intvarargs-intargs-intvarargs-int-int-int-bool-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (v :pointer) (c :pointer) (m :int)
+ (unspec_low :int) (unspec_up :int) (all :boolean) (min :int) (max :int)
+ (icl int-con-level))
+(defcfun*
+ ("gcc_intvarargs_intargs_intvarargs_int_int_bool_int_int_intconlevel"
+ gcc-intvarargs-intargs-intvarargs-int-int-bool-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (v :pointer) (c :pointer) (m :int)
+ (unspec :int) (all :boolean) (min :int) (max :int) (icl int-con-level))
+(defcfun*
+ ("channel_intvarargs_intvarargs_intconlevel"
+ channel-intvarargs-intvarargs-intconlevel)
+ :void (home :pointer) (x :pointer) (y :pointer) (icl int-con-level))
+(defcfun* ("dom_intvar_int_int_intconlevel" dom-intvar-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (l :int) (m :int) (icl int-con-level))
+(defcfun*
+ ("dom_intvarargs_int_int_intconlevel" dom-intvarargs-int-int-intconlevel)
+ :void (home :pointer) (x :pointer) (l :int) (m :int) (icl int-con-level))
+(defcfun* ("dom_intvar_intset_intconlevel" dom-intvar-intset-intconlevel) :void
+ (home :pointer) (x :pointer) (s :pointer) (icl int-con-level))
+(defcfun*
+ ("dom_intvarargs_intset_intconlevel" dom-intvarargs-intset-intconlevel) :void
+ (home :pointer) (x :pointer) (s :pointer) (icl int-con-level))
+(defcfun*
+ ("dom_intvar_int_int_boolvar_intconlevel"
+ dom-intvar-int-int-boolvar-intconlevel)
+ :void (home :pointer) (x :pointer) (l :int) (m :int) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("dom_intvar_intset_boolvar_intconlevel"
+ dom-intvar-intset-boolvar-intconlevel)
+ :void (home :pointer) (x :pointer) (s :pointer) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_not_boolvar_boolvar_intconlevel" bool-not-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (icl int-con-level))
+(defcfun*
+ ("bool_eq_boolvar_boolvar_intconlevel" bool-eq-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (icl int-con-level))
+(defcfun*
+ ("bool_and_boolvar_boolvar_boolvar_intconlevel"
+ bool-and-boolvar-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_and_boolvar_boolvar_bool_intconlevel"
+ bool-and-boolvar-boolvar-bool-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("bool_and_boolvarargs_boolvar_intconlevel"
+ bool-and-boolvarargs-boolvar-intconlevel)
+ :void (home :pointer) (b :pointer) (c :pointer) (icl int-con-level))
+(defcfun*
+ ("bool_and_boolvarargs_bool_intconlevel"
+ bool-and-boolvarargs-bool-intconlevel)
+ :void (home :pointer) (b :pointer) (c :boolean) (icl int-con-level))
+(defcfun*
+ ("bool_or_boolvar_boolvar_boolvar_intconlevel"
+ bool-or-boolvar-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_or_boolvar_boolvar_bool_intconlevel"
+ bool-or-boolvar-boolvar-bool-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("bool_or_boolvarargs_boolvar_intconlevel"
+ bool-or-boolvarargs-boolvar-intconlevel)
+ :void (home :pointer) (b :pointer) (c :pointer) (icl int-con-level))
+(defcfun*
+ ("bool_or_boolvarargs_bool_intconlevel" bool-or-boolvarargs-bool-intconlevel)
+ :void (home :pointer) (b :pointer) (c :boolean) (icl int-con-level))
+(defcfun*
+ ("bool_imp_boolvar_boolvar_boolvar_intconlevel"
+ bool-imp-boolvar-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_imp_boolvar_boolvar_bool_intconlevel"
+ bool-imp-boolvar-boolvar-bool-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("bool_eqv_boolvar_boolvar_boolvar_intconlevel"
+ bool-eqv-boolvar-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_eqv_boolvar_boolvar_bool_intconlevel"
+ bool-eqv-boolvar-boolvar-bool-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("bool_xor_boolvar_boolvar_boolvar_intconlevel"
+ bool-xor-boolvar-boolvar-boolvar-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("bool_xor_boolvar_boolvar_bool_intconlevel"
+ bool-xor-boolvar-boolvar-bool-intconlevel)
+ :void (home :pointer) (b0 :pointer) (b1 :pointer) (b2 :boolean)
+ (icl int-con-level))
+(defcfun*
+ ("sortedness_intvarargs_intvarargs_intconlevel"
+ sortedness-intvarargs-intvarargs-intconlevel)
+ :void (home :pointer) (x :pointer) (y :pointer) (icl int-con-level))
+(defcfun*
+ ("sortedness_intvarargs_intvarargs_intvarargs_intconlevel"
+ sortedness-intvarargs-intvarargs-intvarargs-intconlevel)
+ :void (home :pointer) (x :pointer) (y :pointer) (z :pointer)
+ (icl int-con-level))
+(defcfun* ("distinct_intvarargs_intconlevel" distinct-intvarargs-intconlevel)
+ :void (home :pointer) (x :pointer) (icl int-con-level))
+(defcfun*
+ ("distinct_intargs_intvarargs_intconlevel"
+ distinct-intargs-intvarargs-intconlevel)
+ :void (home :pointer) (n :pointer) (x :pointer) (icl int-con-level))
+(defcfun*
+ ("element_intargs_intvar_intvar_intconlevel"
+ element-intargs-intvar-intvar-intconlevel)
+ :void (home :pointer) (n :pointer) (x0 :pointer) (x1 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("element_intvarargs_intvar_intvar_intconlevel"
+ element-intvarargs-intvar-intvar-intconlevel)
+ :void (home :pointer) (x :pointer) (y0 :pointer) (y1 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("rel_intvar_intreltype_intvar_intconlevel"
+ rel-intvar-intreltype-intvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (r int-rel-type) (x1 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("rel_intvar_intreltype_int_intconlevel"
+ rel-intvar-intreltype-int-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (c :int)
+ (icl int-con-level))
+(defcfun*
+ ("rel_intvar_intreltype_intvar_boolvar_intconlevel"
+ rel-intvar-intreltype-intvar-boolvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (r int-rel-type) (x1 :pointer)
+ (b :pointer) (icl int-con-level))
+(defcfun*
+ ("rel_intvar_intreltype_int_boolvar_intconlevel"
+ rel-intvar-intreltype-int-boolvar-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (c :int) (b :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("rel_intvarargs_intreltype_intvarargs_intconlevel"
+ rel-intvarargs-intreltype-intvarargs-intconlevel)
+ :void (home :pointer) (x :pointer) (r int-rel-type) (y :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("min_intvar_intvar_intvar_intconlevel" min-intvar-intvar-intvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (x1 :pointer) (x2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("min_intvarargs_intvar_intconlevel" min-intvarargs-intvar-intconlevel) :void
+ (home :pointer) (x :pointer) (y :pointer) (icl int-con-level))
+(defcfun*
+ ("max_intvar_intvar_intvar_intconlevel" max-intvar-intvar-intvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (x1 :pointer) (x2 :pointer)
+ (icl int-con-level))
+(defcfun*
+ ("max_intvarargs_intvar_intconlevel" max-intvarargs-intvar-intconlevel) :void
+ (home :pointer) (x :pointer) (y :pointer) (icl int-con-level))
+(defcfun* ("abs_intvar_intvar_intconlevel" abs-intvar-intvar-intconlevel) :void
+ (home :pointer) (x0 :pointer) (x1 :pointer) (icl int-con-level))
+(defcfun*
+ ("mult_intvar_intvar_intvar_intconlevel"
+ mult-intvar-intvar-intvar-intconlevel)
+ :void (home :pointer) (x0 :pointer) (x1 :pointer) (x2 :pointer)
+ (icl int-con-level))
+
+;;; Sets
(defcfun gec-fs-make-const :pointer
"Make constant SetVar of CARD with DOM (int array)."
@@ -407,44 +612,129 @@
"Test whether this variable is assigned."
(set :pointer))
-(defcfun gec-fs-cardinality-const :void
- (space :pointer)
- (set :pointer)
- (min :unsigned-int)
- (max :unsigned-int))
-
-(defcfun gec-fs-cardinality :void
- (space :pointer)
- (set :pointer)
- (x :int))
+;;
-(defcfun gec-fs-rel-setvar-setreltype-setvar :void
- (space :pointer)
- (x :pointer)
- (r set-rel-type)
- (y :pointer))
-
-(defcfun gec-fs-rel-intvar-setreltype-setvar :void
- (space :pointer)
- (x :int)
- (r set-rel-type)
- (y :pointer))
-
-(defcfun gec-fs-rel-setvar-setoptype-setvar-setreltype-setvar :void
- (space :pointer)
- (x :pointer)
- (op set-op-type)
- (y :pointer)
- (r set-rel-type)
- (z :pointer))
-
-(defcfun gec-fs-min :void
- (space :pointer)
- (set :pointer)
- (x :int))
-
-(defcfun gec-fs-max :void
- (space :pointer)
- (set :pointer)
- (x :int))
+(defcfun*
+ ("atmostOne_setvarargs_unsigned_int" atmostone-setvarargs-unsigned-int) :void
+ (home :pointer) (x :pointer) (c :unsigned-int))
+(defcfun* ("distinct_setvarargs_unsigned_int" distinct-setvarargs-unsigned-int)
+ :void (home :pointer) (x :pointer) (c :unsigned-int))
+(defcfun* ("min_setvar_intvar" min-setvar-intvar) :void (home :pointer)
+ (s :pointer) (x :pointer))
+(defcfun* ("max_setvar_intvar" max-setvar-intvar) :void (home :pointer)
+ (s :pointer) (x :pointer))
+(defcfun* ("match_setvar_intvarargs" match-setvar-intvarargs) :void
+ (home :pointer) (s :pointer) (x :pointer))
+(defcfun* ("channel_intvarargs_setvarargs" channel-intvarargs-setvarargs) :void
+ (home :pointer) (x :pointer) (y :pointer))
+(defcfun* ("cardinality_setvar_intvar" cardinality-setvar-intvar) :void
+ (home :pointer) (s :pointer) (x :pointer))
+(defcfun*
+ ("weights_intargs_intargs_setvar_intvar"
+ weights-intargs-intargs-setvar-intvar)
+ :void (home :pointer) (elements :pointer) (weights :pointer) (x :pointer)
+ (y :pointer))
+(defcfun* ("convex_setvar" convex-setvar) :void (home :pointer) (x :pointer))
+(defcfun* ("convexHull_setvar_setvar" convexhull-setvar-setvar) :void
+ (home :pointer) (x :pointer) (y :pointer))
+(defcfun*
+ ("selectUnion_setvarargs_setvar_setvar" selectunion-setvarargs-setvar-setvar)
+ :void (home :pointer) (x :pointer) (y :pointer) (z :pointer))
+(defcfun*
+ ("selectInter_setvarargs_setvar_setvar" selectinter-setvarargs-setvar-setvar)
+ :void (home :pointer) (x :pointer) (y :pointer) (z :pointer))
+(defcfun*
+ ("selectInterIn_setvarargs_setvar_setvar_intset"
+ selectinterin-setvarargs-setvar-setvar-intset)
+ :void (home :pointer) (x :pointer) (y :pointer) (z :pointer)
+ (universe :pointer))
+(defcfun* ("selectDisjoint_setvarargs_setvar" selectdisjoint-setvarargs-setvar)
+ :void (home :pointer) (x :pointer) (y :pointer))
+(defcfun*
+ ("selectSet_setvarargs_intvar_setvar" selectset-setvarargs-intvar-setvar)
+ :void (home :pointer) (x :pointer) (y :pointer) (z :pointer))
+(defcfun* ("rel_setvar_setreltype_setvar" rel-setvar-setreltype-setvar) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (y :pointer))
+(defcfun*
+ ("rel_setvar_setreltype_setvar_boolvar" rel-setvar-setreltype-setvar-boolvar)
+ :void (home :pointer) (x :pointer) (r set-rel-type) (y :pointer) (b :pointer))
+(defcfun* ("rel_setvar_setreltype_intvar" rel-setvar-setreltype-intvar) :void
+ (home :pointer) (s :pointer) (r set-rel-type) (x :pointer))
+(defcfun* ("rel_intvar_setreltype_setvar" rel-intvar-setreltype-setvar) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (s :pointer))
+(defcfun*
+ ("rel_setvar_setreltype_intvar_boolvar" rel-setvar-setreltype-intvar-boolvar)
+ :void (home :pointer) (s :pointer) (r set-rel-type) (x :pointer) (b :pointer))
+(defcfun*
+ ("rel_intvar_setreltype_setvar_boolvar" rel-intvar-setreltype-setvar-boolvar)
+ :void (home :pointer) (x :pointer) (r set-rel-type) (s :pointer) (b :pointer))
+(defcfun* ("rel_setvar_intreltype_intvar" rel-setvar-intreltype-intvar) :void
+ (home :pointer) (s :pointer) (r int-rel-type) (x :pointer))
+(defcfun* ("rel_intvar_intreltype_setvar" rel-intvar-intreltype-setvar) :void
+ (home :pointer) (x :pointer) (r int-rel-type) (s :pointer))
+(defcfun*
+ ("rel_setvar_setoptype_setvar_setreltype_setvar"
+ rel-setvar-setoptype-setvar-setreltype-setvar)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun* ("rel_setoptype_setvarargs_setvar" rel-setoptype-setvarargs-setvar)
+ :void (home :pointer) (op set-op-type) (x :pointer) (y :pointer))
+(defcfun* ("rel_setoptype_intvarargs_setvar" rel-setoptype-intvarargs-setvar)
+ :void (home :pointer) (op set-op-type) (x :pointer) (y :pointer))
+(defcfun*
+ ("rel_intset_setoptype_setvar_setreltype_setvar"
+ rel-intset-setoptype-setvar-setreltype-setvar)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun*
+ ("rel_setvar_setoptype_intset_setreltype_setvar"
+ rel-setvar-setoptype-intset-setreltype-setvar)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun*
+ ("rel_setvar_setoptype_setvar_setreltype_intset"
+ rel-setvar-setoptype-setvar-setreltype-intset)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun*
+ ("rel_intset_setoptype_intset_setreltype_setvar"
+ rel-intset-setoptype-intset-setreltype-setvar)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun*
+ ("rel_intset_setoptype_setvar_setreltype_intset"
+ rel-intset-setoptype-setvar-setreltype-intset)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun*
+ ("rel_setvar_setoptype_intset_setreltype_intset"
+ rel-setvar-setoptype-intset-setreltype-intset)
+ :void (home :pointer) (x :pointer) (op set-op-type) (y :pointer)
+ (r set-rel-type) (z :pointer))
+(defcfun* ("sequence_setvarargs" sequence-setvarargs) :void (home :pointer)
+ (x :pointer))
+(defcfun*
+ ("sequentialUnion_setvarargs_setvar" sequentialunion-setvarargs-setvar) :void
+ (home :pointer) (y :pointer) (x :pointer))
+(defcfun* ("dom_setvar_setreltype_int" dom-setvar-setreltype-int) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (i :int))
+(defcfun* ("dom_setvar_setreltype_int_int" dom-setvar-setreltype-int-int) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (i :int) (j :int))
+(defcfun* ("dom_setvar_setreltype_intset" dom-setvar-setreltype-intset) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (s :pointer))
+(defcfun*
+ ("dom_setvar_setreltype_int_boolvar" dom-setvar-setreltype-int-boolvar) :void
+ (home :pointer) (x :pointer) (r set-rel-type) (i :int) (b :pointer))
+(defcfun*
+ ("dom_setvar_setreltype_int_int_boolvar"
+ dom-setvar-setreltype-int-int-boolvar)
+ :void (home :pointer) (x :pointer) (r set-rel-type) (i :int) (j :int)
+ (b :pointer))
+(defcfun*
+ ("dom_setvar_setreltype_intset_boolvar" dom-setvar-setreltype-intset-boolvar)
+ :void (home :pointer) (x :pointer) (r set-rel-type) (s :pointer) (b :pointer))
+(defcfun*
+ ("cardinality_setvar_unsigned_int_unsigned_int"
+ cardinality-setvar-unsigned-int-unsigned-int)
+ :void (home :pointer) (x :pointer) (i :unsigned-int) (j :unsigned-int))