├── misc ├── remmodified.perl ├── doxygen │ ├── footer.html │ ├── back.png │ └── gecode-logo-100.png ├── gecode-logo.ico ├── allexamples.perl └── fixautoheader.perl ├── contribs ├── qecode │ ├── shortdesc.ac │ ├── clean │ ├── QCOPPlus.cc │ ├── examples │ │ ├── network-pricing1.cpp │ │ └── COMPILING │ ├── README │ ├── vartype.hh │ ├── UnblockableBranching.hh │ ├── qsolver_parallel.hh │ ├── Work.cc │ ├── AbstractWorker.hh │ ├── WorkComparators.hh │ └── qsolver_parallel.cc ├── quacode │ ├── doxygen │ │ ├── mainpage.md │ │ └── getrevision.sh │ ├── README │ ├── LICENSE │ └── quacode │ │ └── support │ │ └── log.cpp └── README ├── gecode.m4 ├── changelog.in ├── gecode ├── int.hh ├── int │ ├── gcc.hh │ ├── unary.hh │ ├── distinct.hh │ ├── sorted.hh │ ├── cumulative.hh │ ├── distinct.cpp │ ├── channel.hpp │ ├── trace │ │ └── int-delta.hpp │ ├── nvalues │ │ └── range-event.hpp │ ├── int-set-2.hpp │ ├── var │ │ └── bool.cpp │ ├── trace.hpp │ └── ipl.hpp ├── flatzinc │ ├── exampleplugin │ │ ├── test_myplugin.fzn │ │ ├── myplugin.cpp │ │ ├── myplugin.hh │ │ └── myplugin.pro │ └── mznlib │ │ ├── arg_max_int.mzn │ │ ├── arg_min_int.mzn │ │ ├── arg_max_bool.mzn │ │ ├── arg_min_bool.mzn │ │ ├── disjunctive_strict.mzn │ │ ├── alldifferent_except_0.mzn │ │ ├── redefinitions-2.0.mzn │ │ ├── all_equal_int.mzn │ │ ├── nvalue.mzn │ │ ├── decreasing_bool.mzn │ │ ├── decreasing_int.mzn │ │ ├── disjoint.mzn │ │ ├── increasing_bool.mzn │ │ ├── increasing_int.mzn │ │ ├── all_different_int.mzn │ │ ├── sort.mzn │ │ ├── among.mzn │ │ ├── at_least_int.mzn │ │ ├── at_most_int.mzn │ │ ├── exactly_int.mzn │ │ ├── at_most_set.mzn │ │ ├── exactly_set.mzn │ │ ├── at_least_set.mzn │ │ ├── maximum_int.mzn │ │ ├── minimum_int.mzn │ │ ├── value_precede_int.mzn │ │ ├── value_precede_set.mzn │ │ ├── lex_less_int.mzn │ │ ├── lex_lesseq_int.mzn │ │ ├── lex_less_bool.mzn │ │ ├── lex_lesseq_bool.mzn │ │ ├── global_cardinality_low_up.mzn │ │ ├── member_int.mzn │ │ ├── partition_set.mzn │ │ ├── member_bool.mzn │ │ ├── circuit.mzn │ │ ├── count.mzn │ │ ├── global_cardinality_low_up_closed.mzn │ │ ├── sum_pred.mzn │ │ ├── inverse.mzn │ │ └── distribute.mzn ├── set │ ├── rel │ │ └── re-eq.hpp │ ├── trace.hpp │ ├── var │ │ └── print.hpp │ ├── int.hpp │ ├── trace │ │ └── traits.hpp │ ├── bool.cpp │ ├── branch │ │ ├── chb.hpp │ │ ├── action.hpp │ │ └── chb.cpp │ └── trace.cpp ├── kernel │ ├── branch │ │ ├── action.hpp │ │ └── afc.cpp │ ├── gpi.cpp │ └── trace │ │ ├── general.hpp │ │ └── general.cpp ├── search │ ├── cpprofiler │ │ └── connector.hpp │ ├── engine.hpp │ ├── par │ │ └── pbs.cpp │ ├── seq │ │ └── dead.hh │ ├── options.hpp │ └── engine.cpp ├── third-party │ └── boost │ │ ├── numeric │ │ ├── interval.hpp │ │ └── interval │ │ │ ├── arith.hpp │ │ │ ├── arith2.hpp │ │ │ ├── transc.hpp │ │ │ ├── checking.hpp │ │ │ ├── compare.hpp │ │ │ ├── interval.hpp │ │ │ ├── rounding.hpp │ │ │ ├── utility.hpp │ │ │ ├── constants.hpp │ │ │ ├── detail │ │ │ ├── bugs.hpp │ │ │ ├── test_input.hpp │ │ │ ├── interval_prototype.hpp │ │ │ ├── bcc_rounding_control.hpp │ │ │ ├── c99_rounding_control.hpp │ │ │ ├── msvc_rounding_control.hpp │ │ │ ├── ppc_rounding_control.hpp │ │ │ ├── x86_rounding_control.hpp │ │ │ ├── alpha_rounding_control.hpp │ │ │ ├── c99sub_rounding_control.hpp │ │ │ ├── sparc_rounding_control.hpp │ │ │ ├── x86gcc_rounding_control.hpp │ │ │ └── msvc_rounding_control.hpp.orig │ │ │ ├── hw_rounding.hpp │ │ │ ├── rounded_arith.hpp │ │ │ ├── compare │ │ │ └── explicit.hpp │ │ │ └── rounded_transc.hpp │ │ ├── config │ │ ├── abi │ │ │ ├── msvc_suffix.hpp │ │ │ ├── borland_suffix.hpp │ │ │ ├── msvc_prefix.hpp │ │ │ └── borland_prefix.hpp │ │ ├── platform │ │ │ ├── amigaos.hpp │ │ │ ├── beos.hpp │ │ │ ├── solaris.hpp │ │ │ ├── vms.hpp │ │ │ ├── irix.hpp │ │ │ ├── qnxnto.hpp │ │ │ ├── vxworks.hpp │ │ │ ├── aix.hpp │ │ │ └── cygwin.hpp │ │ ├── compiler │ │ │ ├── compaq_cxx.hpp │ │ │ ├── sgi_mipspro.hpp │ │ │ ├── greenhills.hpp │ │ │ ├── nvcc.hpp │ │ │ └── kai.hpp │ │ ├── abi_prefix.hpp │ │ ├── abi_suffix.hpp │ │ ├── no_tr1 │ │ │ ├── cmath.hpp │ │ │ └── utility.hpp │ │ └── stdlib │ │ │ ├── libcpp.hpp │ │ │ └── modena.hpp │ │ ├── type.hpp │ │ ├── non_type.hpp │ │ ├── patch.txt │ │ └── LICENSE_1_0.txt ├── gist │ └── standalone-example │ │ └── standalone_example.pro ├── minimodel │ ├── ipl.cpp │ ├── bool-expr.hpp │ └── set-expr.hpp ├── support │ ├── allocator.cpp │ ├── hw-rnd.hpp │ ├── heap.cpp │ └── cast.hpp └── float │ ├── trace.hpp │ ├── bool.cpp │ ├── trace │ └── traits.hpp │ ├── var │ └── print.hpp │ ├── branch │ ├── chb.hpp │ └── action.hpp │ ├── channel.hpp │ └── trace.cpp ├── Makefile.contribs ├── examples ├── scowl.hpp ├── bin-packing.cpp ├── black-hole.cpp ├── word-square.cpp └── dominating-queens.cpp ├── images ├── gecode-logo.ico ├── gecode-logo.pdf ├── gecode-logo-100.png ├── gecode-logo-120.png ├── gecode-logo-40.png └── gecode-logo-60.png ├── .github └── ISSUE_TEMPLATE │ ├── report-a-bug-in-gecode.md │ └── request-a-feature-in-gecode.md ├── .travis.yml ├── LICENSE ├── tools └── flatzinc │ ├── mzn-gecode.bat.in │ └── mzn-gecode.in └── README.md /misc/remmodified.perl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /contribs/qecode/shortdesc.ac: -------------------------------------------------------------------------------- 1 | Qecode - A quantified constraint solver -------------------------------------------------------------------------------- /misc/doxygen/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /gecode.m4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode.m4 -------------------------------------------------------------------------------- /changelog.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/changelog.in -------------------------------------------------------------------------------- /gecode/int.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int.hh -------------------------------------------------------------------------------- /Makefile.contribs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/Makefile.contribs -------------------------------------------------------------------------------- /gecode/int/gcc.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/gcc.hh -------------------------------------------------------------------------------- /examples/scowl.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/examples/scowl.hpp -------------------------------------------------------------------------------- /gecode/int/unary.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/unary.hh -------------------------------------------------------------------------------- /contribs/qecode/clean: -------------------------------------------------------------------------------- 1 | rm -rf *.o 2 | rm -rf lib* 3 | rm -f Makefile 4 | rm -f Makefile.in 5 | 6 | -------------------------------------------------------------------------------- /gecode/int/distinct.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/distinct.hh -------------------------------------------------------------------------------- /gecode/int/sorted.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/sorted.hh -------------------------------------------------------------------------------- /images/gecode-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo.ico -------------------------------------------------------------------------------- /images/gecode-logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo.pdf -------------------------------------------------------------------------------- /misc/doxygen/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/misc/doxygen/back.png -------------------------------------------------------------------------------- /misc/gecode-logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/misc/gecode-logo.ico -------------------------------------------------------------------------------- /examples/bin-packing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/examples/bin-packing.cpp -------------------------------------------------------------------------------- /examples/black-hole.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/examples/black-hole.cpp -------------------------------------------------------------------------------- /examples/word-square.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/examples/word-square.cpp -------------------------------------------------------------------------------- /gecode/flatzinc/exampleplugin/test_myplugin.fzn: -------------------------------------------------------------------------------- 1 | solve ::gecode_search(myplugin(1,2,3)) satisfy; 2 | -------------------------------------------------------------------------------- /gecode/int/cumulative.hh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/cumulative.hh -------------------------------------------------------------------------------- /gecode/int/distinct.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/int/distinct.cpp -------------------------------------------------------------------------------- /gecode/set/rel/re-eq.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/set/rel/re-eq.hpp -------------------------------------------------------------------------------- /contribs/qecode/QCOPPlus.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/contribs/qecode/QCOPPlus.cc -------------------------------------------------------------------------------- /images/gecode-logo-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo-100.png -------------------------------------------------------------------------------- /images/gecode-logo-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo-120.png -------------------------------------------------------------------------------- /images/gecode-logo-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo-40.png -------------------------------------------------------------------------------- /images/gecode-logo-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/images/gecode-logo-60.png -------------------------------------------------------------------------------- /examples/dominating-queens.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/examples/dominating-queens.cpp -------------------------------------------------------------------------------- /gecode/kernel/branch/action.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/kernel/branch/action.hpp -------------------------------------------------------------------------------- /misc/doxygen/gecode-logo-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/misc/doxygen/gecode-logo-100.png -------------------------------------------------------------------------------- /gecode/search/cpprofiler/connector.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/search/cpprofiler/connector.hpp -------------------------------------------------------------------------------- /contribs/qecode/examples/network-pricing1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/contribs/qecode/examples/network-pricing1.cpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/arith.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/arith.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/arith2.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/arith2.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/transc.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/transc.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/checking.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/checking.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/compare.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/compare.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/interval.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/interval.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/rounding.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/rounding.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/utility.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/utility.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/constants.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/constants.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/bugs.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/bugs.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/hw_rounding.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/hw_rounding.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/rounded_arith.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/rounded_arith.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/compare/explicit.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/compare/explicit.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/rounded_transc.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/rounded_transc.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/test_input.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/test_input.hpp -------------------------------------------------------------------------------- /contribs/quacode/doxygen/mainpage.md: -------------------------------------------------------------------------------- 1 | @mainpage Quacode 2 | 3 | \b Quacode is a Quantified Constraint Satisfaction Problems (QCSP) solver built over the [Gecode](http://www.gecode.org) toolkit. 4 | -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/interval_prototype.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/interval_prototype.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/bcc_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/bcc_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/c99_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/c99_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/msvc_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/msvc_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/ppc_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/ppc_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/x86_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/x86_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/alpha_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/alpha_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/c99sub_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/c99sub_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/sparc_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/sparc_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/x86gcc_rounding_control.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/x86gcc_rounding_control.hpp -------------------------------------------------------------------------------- /gecode/third-party/boost/numeric/interval/detail/msvc_rounding_control.hpp.orig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dpsanders/gecode/master/gecode/third-party/boost/numeric/interval/detail/msvc_rounding_control.hpp.orig -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/arg_max_int.mzn: -------------------------------------------------------------------------------- 1 | predicate gecode_maximum_arg_int_offset(array[int] of var int: x, int: offset, var int: i); 2 | 3 | predicate maximum_arg_int(array[int] of var int: x, var int: i) = 4 | gecode_maximum_arg_int_offset(x,min(index_set(x)),i); 5 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/arg_min_int.mzn: -------------------------------------------------------------------------------- 1 | predicate gecode_minimum_arg_int_offset(array[int] of var int: x, int: offset, var int: i); 2 | 3 | predicate minimum_arg_int(array[int] of var int: x, var int: i) = 4 | gecode_minimum_arg_int_offset(x,min(index_set(x)),i); 5 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/arg_max_bool.mzn: -------------------------------------------------------------------------------- 1 | predicate gecode_maximum_arg_bool_offset(array[int] of var bool: x, int: offset, var int: i); 2 | 3 | predicate maximum_arg_bool(array[int] of var bool: x, var int: i) = 4 | gecode_maximum_arg_bool_offset(x,min(index_set(x)),i); 5 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/arg_min_bool.mzn: -------------------------------------------------------------------------------- 1 | predicate gecode_minimum_arg_bool_offset(array[int] of var bool: x, int: offset, var int: i); 2 | 3 | predicate minimum_arg_bool(array[int] of var bool: x, var int: i) = 4 | gecode_minimum_arg_bool_offset(x,min(index_set(x)),i); 5 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi/msvc_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma pack(pop) 7 | 8 | 9 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi/borland_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | # pragma option pop 7 | #pragma nopushoptwarn 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /contribs/qecode/README: -------------------------------------------------------------------------------- 1 | QeCode is a quantified constraint satisfaction problems (QCSP) solver based on Gecode. 2 | It can also solve QCSP+, an extension of QCSP where quantifiers can be restricted and QCOP+, a quantified optimizaion problem formalism which scopes multi-level programming problems. 3 | 4 | QeCode have been developped at Universite d'Orleans by Jeremie Vautard, Arnaud Lallouet and Marco Benedetti. More info is available on 5 | http://www.univ-orleans.fr/lifo/software/qecode/ 6 | 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/report-a-bug-in-gecode.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Report a Bug in Gecode 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | 9 | A clear and concise description of what the bug is. 10 | 11 | **To Reproduce** 12 | 13 | Try to explain how to reproduce the bug. 14 | 15 | **Gecode and Platform Configuration** 16 | 17 | Please describe which version of Gecode you use, on which operating system, and with which C++ compiler (including its version). 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/request-a-feature-in-gecode.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request a Feature in Gecode 3 | about: Suggest a new feasture 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | **Describe the Feature** 10 | 11 | Please describe the feature in as much detail as you can. 12 | 13 | **Why Is the Requested Feature Useful?** 14 | 15 | Please argue why the feature is useful to you and _others_. 16 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/amigaos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | #define GECODE_BOOST_PLATFORM "AmigaOS" 9 | 10 | #define GECODE_BOOST_DISABLE_THREADS 11 | #define GECODE_BOOST_NO_CWCHAR 12 | #define GECODE_BOOST_NO_STD_WSTRING 13 | #define GECODE_BOOST_NO_INTRINSIC_WCHAR_T 14 | 15 | 16 | -------------------------------------------------------------------------------- /gecode/third-party/boost/type.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright David Abrahams 2001. 2 | // Distributed under the Boost Software License, Version 1.0. (See 3 | // accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef GECODE_BOOST_TYPE_DWA20010120_HPP 7 | # define GECODE_BOOST_TYPE_DWA20010120_HPP 8 | 9 | namespace gecode_boost { 10 | 11 | // Just a simple "type envelope". Useful in various contexts, mostly to work 12 | // around some MSVC deficiencies. 13 | template 14 | struct type {}; 15 | 16 | } 17 | 18 | #endif // GECODE_BOOST_TYPE_DWA20010120_HPP 19 | -------------------------------------------------------------------------------- /gecode/gist/standalone-example/standalone_example.pro: -------------------------------------------------------------------------------- 1 | ###################################################################### 2 | # Automatically generated by qmake (2.01a) Mi. Mrz 31 09:30:46 2010 3 | ###################################################################### 4 | 5 | TEMPLATE = app 6 | TARGET = mygist 7 | DEPENDPATH += . 8 | INCLUDEPATH += . ../../../ 9 | CONFIG += release x86_64 10 | 11 | # Input 12 | SOURCES += mygist.cpp 13 | 14 | win32:DESTDIR = ./ 15 | LIBS += -L../../.. 16 | !win32 { 17 | LIBS += -lgecodekernel -lgecodesupport -lgecodeint -lgecodesearch -lgecodegist 18 | } 19 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/compiler/compaq_cxx.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Tru64 C++ compiler setup (now HP): 9 | 10 | #define GECODE_BOOST_COMPILER "HP Tru64 C++ " GECODE_BOOST_STRINGIZE(__DECCXX_VER) 11 | 12 | #include "gecode/third-party/boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // versions check: 16 | // Nothing to do here? 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/disjunctive_strict.mzn: -------------------------------------------------------------------------------- 1 | include "cumulative.mzn"; 2 | 3 | predicate disjunctive_strict(array[int] of var int: s, 4 | array[int] of var int: d) = 5 | assert(index_set(s) == index_set(d), 6 | "disjunctive: the array arguments must have identical index sets", 7 | forall (i in index_set(d)) (d[i] >= 0) /\ 8 | if forall (i in index_set(d)) (is_fixed(d[i])) then 9 | cumulative(s,d,array1d(index_set(d),[1 | i in index_set(d)]),1) 10 | else 11 | forall (i,j in index_set(d) where i 21 | struct non_type { }; 22 | 23 | 24 | } 25 | 26 | 27 | #endif // include guard 28 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/beos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // BeOS specific config options: 9 | 10 | #define GECODE_BOOST_PLATFORM "BeOS" 11 | 12 | #define GECODE_BOOST_NO_CWCHAR 13 | #define GECODE_BOOST_NO_CWCTYPE 14 | #define GECODE_BOOST_HAS_UNISTD_H 15 | 16 | #define GECODE_BOOST_HAS_BETHREADS 17 | 18 | #ifndef GECODE_BOOST_DISABLE_THREADS 19 | # define GECODE_BOOST_HAS_THREADS 20 | #endif 21 | 22 | // boilerplate code: 23 | #include 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi_prefix.hpp: -------------------------------------------------------------------------------- 1 | // abi_prefix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | #ifndef GECODE_BOOST_CONFIG_ABI_PREFIX_HPP 10 | # define GECODE_BOOST_CONFIG_ABI_PREFIX_HPP 11 | #else 12 | # error double inclusion of header boost/config/abi_prefix.hpp is an error 13 | #endif 14 | 15 | #include 16 | 17 | // this must occur after all other includes and before any code appears: 18 | #ifdef GECODE_BOOST_HAS_ABI_HEADERS 19 | # include GECODE_BOOST_ABI_PREFIX 20 | #endif 21 | 22 | #if defined( __BORLANDC__ ) 23 | #pragma nopushoptwarn 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /gecode/third-party/boost/patch.txt: -------------------------------------------------------------------------------- 1 | diff -u -r boost/numeric/interval/detail/msvc_rounding_control.hpp /cygdrive/c/Users/schulte/boost/numeric/interval/detail/msvc_rounding_control.hpp 2 | --- boost/numeric/interval/detail/msvc_rounding_control.hpp 2010-11-10 16:52:44.696786200 +0100 3 | +++ /cygdrive/c/Users/schulte/boost/numeric/interval/detail/msvc_rounding_control.hpp 2010-11-10 16:01:56.730082700 +0100 4 | @@ -79,7 +79,11 @@ 5 | static void get_rounding_mode(rounding_mode& mode) 6 | { mode = msvc2hard(_control87(0, 0)); } 7 | static void set_rounding_mode(const rounding_mode mode) 8 | +#if defined(_M_X64) || defined(_M_IA64) 9 | + { _control87(hard2msvc(mode), _MCW_EM | _MCW_RC ); } 10 | +#else 11 | { _control87(hard2msvc(mode), _MCW_EM | _MCW_RC | _MCW_PC | _MCW_IC); } 12 | +#endif 13 | static double to_int(const double& x) { return rint(x); } 14 | }; 15 | 16 | 17 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/solaris.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // sun specific config options: 10 | 11 | #define GECODE_BOOST_PLATFORM "Sun Solaris" 12 | 13 | #define GECODE_BOOST_HAS_GETTIMEOFDAY 14 | 15 | // boilerplate code: 16 | #define GECODE_BOOST_HAS_UNISTD_H 17 | #include 18 | 19 | // 20 | // pthreads don't actually work with gcc unless _PTHREADS is defined: 21 | // 22 | #if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) 23 | # undef GECODE_BOOST_HAS_PTHREADS 24 | #endif 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/alldifferent_except_0.mzn: -------------------------------------------------------------------------------- 1 | include "global_cardinality_low_up_closed.mzn"; 2 | 3 | /** @group globals.alldifferent 4 | Constrain the array of integers \a vs to be all different except those 5 | elements that are assigned the value 0. 6 | */ 7 | predicate alldifferent_except_0(array[int] of var int: vs) = 8 | if length(vs)==0 then true 9 | else 10 | let { 11 | int: l = lb_array(vs); 12 | int: u = ub_array(vs); 13 | } in 14 | if l != -infinity /\ u != infinity then 15 | global_cardinality_low_up_closed(vs, [i | i in l..u], 16 | [0 | i in l..u], 17 | [if i==0 then length(vs) else 1 endif | i in l..u] 18 | ) 19 | else 20 | forall(i, j in index_set(vs) where i < j) ( 21 | (vs[i] != 0 /\ vs[j] != 0) -> vs[i] != vs[j] 22 | ) 23 | endif 24 | endif; 25 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi/msvc_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // 7 | // Boost binaries are built with the compiler's default ABI settings, 8 | // if the user changes their default alignment in the VS IDE then their 9 | // code will no longer be binary compatible with the bjam built binaries 10 | // unless this header is included to force Boost code into a consistent ABI. 11 | // 12 | // Note that inclusion of this header is only necessary for libraries with 13 | // separate source, header only libraries DO NOT need this as long as all 14 | // translation units are built with the same options. 15 | // 16 | #if defined(_M_X64) 17 | # pragma pack(push,16) 18 | #else 19 | # pragma pack(push,8) 20 | #endif 21 | 22 | 23 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi_suffix.hpp: -------------------------------------------------------------------------------- 1 | // abi_sufffix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | // This header should be #included AFTER code that was preceded by a #include 10 | // . 11 | 12 | #ifndef GECODE_BOOST_CONFIG_ABI_PREFIX_HPP 13 | # error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp 14 | #else 15 | # undef GECODE_BOOST_CONFIG_ABI_PREFIX_HPP 16 | #endif 17 | 18 | // the suffix header occurs after all of our code: 19 | #ifdef GECODE_BOOST_HAS_ABI_HEADERS 20 | # include GECODE_BOOST_ABI_SUFFIX 21 | #endif 22 | 23 | #if defined( __BORLANDC__ ) 24 | #pragma nopushoptwarn 25 | #endif 26 | 27 | 28 | -------------------------------------------------------------------------------- /contribs/quacode/README: -------------------------------------------------------------------------------- 1 | Quacode is a quantified constraint satisfaction 2 | problems (QCSP) solver based on Gecode. 3 | 4 | Quacode have been developped by Vincent Barichard. 5 | More info is available on http://quacode.barichard.com 6 | 7 | To compile Quacode, you have to install cmake. To setup the 8 | compilation process for your environment, you can launch 9 | cmake by invoking 10 | cmake . 11 | in the toplevel Quacode directory. 12 | 13 | By default, 'make install' will install all the files in 14 | '/usr/local/bin', '/usr/local/lib' etc. You can specify 15 | an installation prefix other than '/usr/local' setting the 16 | 'CMAKE_INSTALL_PREFIX' option, 17 | for instance 'cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME .' 18 | 19 | Then you can compile the code by invoking 20 | make 21 | in the toplevel Quacode directory. 22 | 23 | After a successful compilation, you can install Quacode 24 | library and examples by invoking 25 | make install 26 | in the build directory. 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: cpp 4 | 5 | compiler: 6 | - gcc 7 | - clang 8 | 9 | notifications: 10 | email: 11 | recipients: 12 | - cschulte@kth.se 13 | - guido.tack@monash.edu 14 | on_success: never 15 | on_failure: always 16 | 17 | addons: 18 | apt: 19 | sources: 20 | - ubuntu-toolchain-r-test 21 | - llvm-toolchain-precise-3.8 22 | - ubuntu-sdk-team 23 | packages: 24 | - g++-6 25 | - clang-3.8 26 | # For Gist. 27 | - qt5-qmake 28 | - qtbase5-dev 29 | - qtdeclarative5-dev 30 | - qt5-default 31 | 32 | install: 33 | - "[ $CXX = g++ ] && export CXX=g++-6 || true" 34 | - "[ $CXX = clang++ ] && export CXX=clang++-3.8 || true" 35 | 36 | script: 37 | - ./configure --prefix=/usr --enable-gist 38 | - make 39 | # Build the test case suite, but do not execute the 50k test cases. 40 | - make test 41 | # Run a small subset of test cases, as defined by make check. 42 | - LD_LIBRARY_PATH=. make check 43 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/compiler/sgi_mipspro.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // SGI C++ compiler setup: 9 | 10 | #define GECODE_BOOST_COMPILER "SGI Irix compiler version " GECODE_BOOST_STRINGIZE(_COMPILER_VERSION) 11 | 12 | #include "gecode/third-party/boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // Threading support: 16 | // Turn this on unconditionally here, it will get turned off again later 17 | // if no threading API is detected. 18 | // 19 | #define GECODE_BOOST_HAS_THREADS 20 | #define GECODE_BOOST_NO_TWO_PHASE_NAME_LOOKUP 21 | 22 | #undef GECODE_BOOST_NO_SWPRINTF 23 | #undef GECODE_BOOST_DEDUCED_TYPENAME 24 | 25 | // 26 | // version check: 27 | // probably nothing to do here? 28 | 29 | 30 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/vms.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Artyom Beilis 2010. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef GECODE_BOOST_CONFIG_PLATFORM_VMS_HPP 7 | #define GECODE_BOOST_CONFIG_PLATFORM_VMS_HPP 8 | 9 | #define GECODE_BOOST_PLATFORM "OpenVMS" 10 | 11 | #undef GECODE_BOOST_HAS_STDINT_H 12 | #define GECODE_BOOST_HAS_UNISTD_H 13 | #define GECODE_BOOST_HAS_NL_TYPES_H 14 | #define GECODE_BOOST_HAS_GETTIMEOFDAY 15 | #define GECODE_BOOST_HAS_DIRENT_H 16 | #define GECODE_BOOST_HAS_PTHREADS 17 | #define GECODE_BOOST_HAS_NANOSLEEP 18 | #define GECODE_BOOST_HAS_CLOCK_GETTIME 19 | #define GECODE_BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | #define GECODE_BOOST_HAS_LOG1P 21 | #define GECODE_BOOST_HAS_EXPM1 22 | #define GECODE_BOOST_HAS_THREADS 23 | #undef GECODE_BOOST_HAS_SCHED_YIELD 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/compiler/greenhills.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Greenhills C++ compiler setup: 9 | 10 | #define GECODE_BOOST_COMPILER "Greenhills C++ version " GECODE_BOOST_STRINGIZE(__ghs) 11 | 12 | #include "gecode/third-party/boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // versions check: 16 | // we don't support Greenhills prior to version 0: 17 | #if __ghs < 0 18 | # error "Compiler not supported or configured - please reconfigure" 19 | #endif 20 | // 21 | // last known and checked version is 0: 22 | #if (__ghs > 0) 23 | # if defined(GECODE_BOOST_ASSERT_CONFIG) 24 | # error "Unknown compiler version - please run the configure tests and report the results" 25 | # endif 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/irix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | 8 | // See http://www.boost.org for most recent version. 9 | 10 | // SGI Irix specific config options: 11 | 12 | #define GECODE_BOOST_PLATFORM "SGI Irix" 13 | 14 | #define GECODE_BOOST_NO_SWPRINTF 15 | // 16 | // these are not auto detected by POSIX feature tests: 17 | // 18 | #define GECODE_BOOST_HAS_GETTIMEOFDAY 19 | #define GECODE_BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | 21 | #ifdef __GNUC__ 22 | // GNU C on IRIX does not support threads (checked up to gcc 3.3) 23 | # define GECODE_BOOST_DISABLE_THREADS 24 | #endif 25 | 26 | // boilerplate code: 27 | #define GECODE_BOOST_HAS_UNISTD_H 28 | #include 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/qnxnto.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jim Douglas 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // QNX specific config options: 9 | 10 | #define GECODE_BOOST_PLATFORM "QNX" 11 | 12 | #define GECODE_BOOST_HAS_UNISTD_H 13 | #include 14 | 15 | // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h 16 | // or log1p and expm1: 17 | #undef GECODE_BOOST_HAS_NL_TYPES_H 18 | #undef GECODE_BOOST_HAS_LOG1P 19 | #undef GECODE_BOOST_HAS_EXPM1 20 | 21 | #define GECODE_BOOST_HAS_PTHREADS 22 | #define GECODE_BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 23 | 24 | #define GECODE_BOOST_HAS_GETTIMEOFDAY 25 | #define GECODE_BOOST_HAS_CLOCK_GETTIME 26 | #define GECODE_BOOST_HAS_NANOSLEEP 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/no_tr1/cmath.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2008. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/cmath is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef GECODE_BOOST_CONFIG_CMATH 14 | # define GECODE_BOOST_CONFIG_CMATH 15 | 16 | # ifndef GECODE_BOOST_TR1_NO_RECURSION 17 | # define GECODE_BOOST_TR1_NO_RECURSION 18 | # define GECODE_BOOST_CONFIG_NO_CMATH_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef GECODE_BOOST_CONFIG_NO_CMATH_RECURSION 24 | # undef GECODE_BOOST_TR1_NO_RECURSION 25 | # undef GECODE_BOOST_CONFIG_NO_CMATH_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/compiler/nvcc.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Eric Jourdanneau, Joel Falcou 2010 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // NVIDIA CUDA C++ compiler setup 9 | 10 | #ifndef GECODE_BOOST_COMPILER 11 | # define GECODE_BOOST_COMPILER "NVIDIA CUDA C++ Compiler" 12 | #endif 13 | 14 | // NVIDIA Specific support 15 | // GECODE_BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device 16 | #define GECODE_BOOST_GPU_ENABLED __host__ __device__ 17 | 18 | // Boost support macro for NVCC 19 | // NVCC Basically behaves like some flavor of MSVC6 + some specific quirks 20 | #ifdef __GNUC__ 21 | 22 | #include 23 | 24 | #elif defined(_MSC_VER) 25 | 26 | #include 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/vxworks.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Dustin Spicuzza 2009. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // vxWorks specific config options: 9 | 10 | #define GECODE_BOOST_PLATFORM "vxWorks" 11 | 12 | #define GECODE_BOOST_NO_CWCHAR 13 | #define GECODE_BOOST_NO_INTRINSIC_WCHAR_T 14 | 15 | #if defined(__GNUC__) && defined(__STRICT_ANSI__) 16 | #define GECODE_BOOST_NO_INT64_T 17 | #endif 18 | 19 | #define GECODE_BOOST_HAS_UNISTD_H 20 | 21 | // these allow posix_features to work, since vxWorks doesn't 22 | // define them itself 23 | #define _POSIX_TIMERS 1 24 | #define _POSIX_THREADS 1 25 | 26 | // vxworks doesn't work with asio serial ports 27 | #define GECODE_BOOST_ASIO_DISABLE_SERIAL_PORT 28 | 29 | // boilerplate code: 30 | #include 31 | 32 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/no_tr1/utility.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/utility is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef GECODE_BOOST_CONFIG_UTILITY 14 | # define GECODE_BOOST_CONFIG_UTILITY 15 | 16 | # ifndef GECODE_BOOST_TR1_NO_RECURSION 17 | # define GECODE_BOOST_TR1_NO_RECURSION 18 | # define GECODE_BOOST_CONFIG_NO_UTILITY_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef GECODE_BOOST_CONFIG_NO_UTILITY_RECURSION 24 | # undef GECODE_BOOST_TR1_NO_RECURSION 25 | # undef GECODE_BOOST_CONFIG_NO_UTILITY_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /contribs/README: -------------------------------------------------------------------------------- 1 | GECODE CONTRIBUTIONS 2 | ====================================================================== 3 | 4 | 1. External contributions 5 | This directory contains external contributions to the Gecode 6 | system. Please see our web pages for more information about the 7 | contributors: 8 | 9 | http://www.gecode.org/contributions.html 10 | 11 | 2. Installation 12 | The contributions are distributed together with Gecode to ease 13 | compilation and installation. They are not enabled by default. Please 14 | refer to the installation instructions in the individual 15 | subdirectories if you want to use these contributions. 16 | 17 | 3. License issues 18 | The external contributions may be distributed under a license that is 19 | different from the Gecode license. Please see the individual LICENSE 20 | files in the contributed subdirectories. 21 | 22 | 4. Bugs 23 | Please do not use the Gecode bugtracking system to report bugs in 24 | external contributions. If you find bugs in contributed code, please 25 | see the contributors' web pages for information on how to contact 26 | them. 27 | -------------------------------------------------------------------------------- /contribs/qecode/examples/COMPILING: -------------------------------------------------------------------------------- 1 | To compile the examples, you must add the qecode folder and the gecode folder (i.e. .. and ../../.. from this examples folder) to your include and library paths. These examples have to been linked against the gecodeint, gecodekernel, gecodeminimodel, gecodesupport, and gecodeqecode libraries. If you built the dynamic version of the gecode/qecode libraries, you will also have to add these folders to the dynamic libraries search path. 2 | 3 | Example (with dynamic libs) : 4 | For Linux, using gcc : 5 | $ g++ stress_test.cpp -I.. -I../../.. -L.. -L../../.. -lgecodeqecode -lgecodeminimodel -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport -lpthread -o stress_test 6 | $ export LD_LIBRARY_PATH="..:../../.." # only if using shared libraries 7 | $ ./stress_test 8 | 9 | For MacOS, using gcc : 10 | $ g++ stress_test.cpp -I.. -I../../.. -L.. -L../../.. -lgecodeqecode -lgecodeminimodel -lgecodesearch -lgecodeint -lgecodekernel -lgecodesupport -lpthread -o stress_test 11 | $ export DYLD_LIBRARY_PATH="..:../../.." # only if using shared libraries 12 | $ ./stress_test 13 | 14 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/abi/borland_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // for C++ Builder the following options effect the ABI: 7 | // 8 | // -b (on or off - effect emum sizes) 9 | // -Vx (on or off - empty members) 10 | // -Ve (on or off - empty base classes) 11 | // -aX (alignment - 5 options). 12 | // -pX (Calling convention - 4 options) 13 | // -VmX (member pointer size and layout - 5 options) 14 | // -VC (on or off, changes name mangling) 15 | // -Vl (on or off, changes struct layout). 16 | 17 | // In addition the following warnings are sufficiently annoying (and 18 | // unfixable) to have them turned off by default: 19 | // 20 | // 8027 - functions containing [for|while] loops are not expanded inline 21 | // 8026 - functions taking class by value arguments are not expanded inline 22 | 23 | #pragma nopushoptwarn 24 | # pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/stdlib/libcpp.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Christopher Jefferson 2011. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // config for libc++ 9 | // Might need more in here later. 10 | 11 | #if !defined(_LIBCPP_VERSION) 12 | # include 13 | # if !defined(_LIBCPP_VERSION) 14 | # error "This is not libc++!" 15 | # endif 16 | #endif 17 | 18 | #define GECODE_BOOST_STDLIB "libc++ version " GECODE_BOOST_STRINGIZE(_LIBCPP_VERSION) 19 | 20 | #define GECODE_BOOST_HAS_THREADS 21 | 22 | #ifdef _LIBCPP_HAS_NO_VARIADICS 23 | # define GECODE_BOOST_NO_0X_HDR_TUPLE 24 | #endif 25 | 26 | // 27 | // These appear to be unusable/incomplete so far: 28 | // 29 | # define GECODE_BOOST_NO_0X_HDR_CHRONO 30 | # define GECODE_BOOST_NO_0X_HDR_FUTURE 31 | # define GECODE_BOOST_NO_0X_HDR_TYPE_TRAITS 32 | 33 | // libc++ uses a non-standard messages_base 34 | #define GECODE_BOOST_NO_STD_MESSAGES 35 | 36 | // --- end --- 37 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/aix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // IBM/Aix specific config options: 9 | 10 | #define GECODE_BOOST_PLATFORM "IBM Aix" 11 | 12 | #define GECODE_BOOST_HAS_UNISTD_H 13 | #define GECODE_BOOST_HAS_NL_TYPES_H 14 | #define GECODE_BOOST_HAS_NANOSLEEP 15 | #define GECODE_BOOST_HAS_CLOCK_GETTIME 16 | 17 | // This needs support in "gecode/third-party/boost/cstdint.hpp" exactly like FreeBSD. 18 | // This platform has header named which includes all 19 | // the things needed. 20 | #define GECODE_BOOST_HAS_STDINT_H 21 | 22 | // Threading API's: 23 | #define GECODE_BOOST_HAS_PTHREADS 24 | #define GECODE_BOOST_HAS_PTHREAD_DELAY_NP 25 | #define GECODE_BOOST_HAS_SCHED_YIELD 26 | //#define GECODE_BOOST_HAS_PTHREAD_YIELD 27 | 28 | // boilerplate code: 29 | #include 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/redefinitions-2.0.mzn: -------------------------------------------------------------------------------- 1 | % This file contains redefinitions of standard builtins that can be overridden 2 | % by solvers. 3 | 4 | predicate bool_clause_reif(array[int] of var bool: as, 5 | array[int] of var bool: bs, 6 | var bool: b); 7 | 8 | predicate array_int_maximum(var int: m, array[int] of var int: x); 9 | 10 | predicate array_float_maximum(var float: m, array[int] of var float: x) = 11 | let { int: l = min(index_set(x)), 12 | int: u = max(index_set(x)), 13 | float: ly = lb_array(x), 14 | float: uy = ub_array(x), 15 | array[l..u] of var ly..uy: y } in 16 | y[l] = x[l] /\ 17 | m = y[u] /\ 18 | forall (i in l+1 .. u) ( y[i] == max(x[i],y[i-1]) ); 19 | 20 | predicate array_int_minimum(var int: m, array[int] of var int: x); 21 | 22 | predicate array_float_minimum(var float: m, array[int] of var float: x) = 23 | let { int: l = min(index_set(x)), 24 | int: u = max(index_set(x)), 25 | float: ly = lb_array(x), 26 | float: uy = ub_array(x), 27 | array[l..u] of var ly..uy: y } in 28 | y[l] = x[l] /\ 29 | m = y[u] /\ 30 | forall (i in l+1 .. u) ( y[i] == min(x[i],y[i-1]) ); 31 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/compiler/kai.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // (C) Copyright David Abrahams 2002. 3 | // (C) Copyright Aleksey Gurtovoy 2002. 4 | // Use, modification and distribution are subject to the 5 | // Boost Software License, Version 1.0. (See accompanying file 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // See http://www.boost.org for most recent version. 9 | 10 | // Kai C++ compiler setup: 11 | 12 | #include "gecode/third-party/boost/config/compiler/common_edg.hpp" 13 | 14 | # if (__KCC_VERSION <= 4001) || !defined(GECODE_BOOST_STRICT_CONFIG) 15 | // at least on Sun, the contents of is not in namespace std 16 | # define GECODE_BOOST_NO_STDC_NAMESPACE 17 | # endif 18 | 19 | // see also common_edg.hpp which needs a special check for __KCC 20 | # if !defined(_EXCEPTIONS) && !defined(GECODE_BOOST_NO_EXCEPTIONS) 21 | # define GECODE_BOOST_NO_EXCEPTIONS 22 | # endif 23 | 24 | // 25 | // last known and checked version is 4001: 26 | #if (__KCC_VERSION > 4001) 27 | # if defined(GECODE_BOOST_ASSERT_CONFIG) 28 | # error "Unknown compiler version - please run the configure tests and report the results" 29 | # endif 30 | #endif 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /contribs/quacode/LICENSE: -------------------------------------------------------------------------------- 1 | QUACODE LICENSE AGREEMENT 2 | 3 | This software and its documentation are copyrighted by the 4 | individual authors as listed in each file. The following 5 | terms apply to all files associated with the software unless 6 | explicitly disclaimed in individual files. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GECODE LICENSE AGREEMENT 2 | 3 | (MIT License) 4 | 5 | This software and its documentation are copyrighted by the 6 | individual authors as listed in each file. The following 7 | terms apply to all files associated with the software unless 8 | explicitly disclaimed in individual files. 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining 11 | a copy of this software and associated documentation files (the 12 | "Software"), to deal in the Software without restriction, including 13 | without limitation the rights to use, copy, modify, merge, publish, 14 | distribute, sublicense, and/or sell copies of the Software, and to 15 | permit persons to whom the Software is furnished to do so, subject to 16 | the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | -------------------------------------------------------------------------------- /contribs/qecode/vartype.hh: -------------------------------------------------------------------------------- 1 | /**** qecode2, [ vartype.hh ], 2 | Copyright (c) 2007 Universite d'Orleans - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | 23 | #ifndef QECODE_VARTYPE 24 | #define QECODE_VARTYPE 25 | 26 | enum VarType { 27 | VTYPE_INT, 28 | VTYPE_BOOL 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /gecode/third-party/boost/LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/all_equal_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate all_equal_int(array[int] of var int: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/nvalue.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate nvalue(var int: n, array[int] of var int: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/decreasing_bool.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate decreasing_bool(array[int] of var bool: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/decreasing_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate decreasing_int(array[int] of var int: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/disjoint.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate disjoint(var set of int: s1, var set of int: s2); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/increasing_bool.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate increasing_bool(array[int] of var bool: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/increasing_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate increasing_int(array[int] of var int: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/all_different_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate all_different_int(array[int] of var int: x); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/sort.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate sort(array[int] of var int: x, array[int] of var int: y); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/among.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate among(var int: n, array[int] of var int: x, set of int: v); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/at_least_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate at_least_int(int: n, array[int] of var int: x, int: v); 34 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/at_most_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate at_most_int(int: n, array[int] of var int: x, int: v); 34 | -------------------------------------------------------------------------------- /contribs/quacode/doxygen/getrevision.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Main authors: 4 | # Vincent Barichard 5 | # 6 | # Copyright: 7 | # Vincent Barichard, 2013 8 | # 9 | # Last modified: 10 | # $Date$ by $Author$ 11 | # $Revision$ 12 | # 13 | # This file is part of Quacode: 14 | # http://quacode.barichard.com 15 | # 16 | # Permission is hereby granted, free of charge, to any person obtaining 17 | # a copy of this software and associated documentation files (the 18 | # "Software"), to deal in the Software without restriction, including 19 | # without limitation the rights to use, copy, modify, merge, publish, 20 | # distribute, sublicense, and/or sell copies of the Software, and to 21 | # permit persons to whom the Software is furnished to do so, subject to 22 | # the following conditions: 23 | # 24 | # The above copyright notice and this permission notice shall be 25 | # included in all copies or substantial portions of the Software. 26 | # 27 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | # 35 | 36 | git log -n1 --pretty="rev %h" $1 37 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/exactly_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | include "count.mzn"; 34 | 35 | predicate exactly_int(int: n, array[int] of var int: x, int: v) = 36 | count(x, v, n); 37 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/at_most_set.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate at_most_set(int: n, array[int] of var set of int: x, set of int: v) = 34 | bool_sum_le([x[i] == v | i in index_set(x)], n); 35 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/exactly_set.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate exactly_set(int: n, array[int] of var set of int: x, set of int: v) = 34 | bool_sum_eq([x[i] == v | i in index_set(x)], n); 35 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/at_least_set.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate at_least_set(int: n, array[int] of var set of int: x, set of int: v) = 34 | bool_sum_ge([x[i] == v | i in index_set(x)], n); 35 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/maximum_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | include "redefinitions-2.0.mzn"; 34 | 35 | predicate maximum_int(var int: m, array[int] of var int: x) = 36 | array_int_maximum(m, x); 37 | 38 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/minimum_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | include "redefinitions-2.0.mzn"; 34 | 35 | predicate minimum_int(var int: m, array[int] of var int: x) = 36 | array_int_minimum(m, x); 37 | 38 | -------------------------------------------------------------------------------- /tools/flatzinc/mzn-gecode.bat.in: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem 4 | rem Main authors: 5 | rem Guido Tack 6 | rem 7 | rem Copyright: 8 | rem Guido Tack, 2012 9 | rem 10 | rem This file is part of Gecode, the generic constraint 11 | rem development environment: 12 | rem http://www.gecode.org 13 | rem 14 | rem Permission is hereby granted, free of charge, to any person obtaining 15 | rem a copy of this software and associated documentation files (the 16 | rem "Software"), to deal in the Software without restriction, including 17 | rem without limitation the rights to use, copy, modify, merge, publish, 18 | rem distribute, sublicense, and/or sell copies of the Software, and to 19 | rem permit persons to whom the Software is furnished to do so, subject to 20 | rem the following conditions: 21 | rem 22 | rem The above copyright notice and this permission notice shall be 23 | rem included in all copies or substantial portions of the Software. 24 | rem 25 | rem THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 26 | rem EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27 | rem MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 28 | rem NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 29 | rem LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 30 | rem OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 31 | rem WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 32 | rem 33 | rem 34 | 35 | setlocal 36 | set FLATZINC_CMD=fzn-gecode 37 | minizinc -I "%GECODEDIR%\mznlib" %* 38 | -------------------------------------------------------------------------------- /contribs/qecode/UnblockableBranching.hh: -------------------------------------------------------------------------------- 1 | /**** , [ UnblockableBranching.hh ], 2 | Copyright (c) 2009 Universite d'Orleans - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | #ifndef __QECODE_UNBLOCKABLE_BRANCHING__ 23 | #define __QECODE_UNBLOCKABLE_BRANCHING__ 24 | 25 | #include "myspace.hh" 26 | 27 | class UnblockableBranching { 28 | public: 29 | virtual ~UnblockableBranching() {} 30 | virtual void branch(MySpace* s,IntVarArgs ivars, BoolVarArgs bvars)=0; 31 | }; 32 | 33 | #endif 34 | 35 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/value_precede_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate gecode_precede(array[int] of var int: x, int: s, int: t); 34 | 35 | predicate value_precede_int(int: s, int: t, array[int] of var int: x) = 36 | gecode_precede(x,s,t); 37 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/value_precede_set.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate gecode_precede_set(array[int] of var set of int: x, int: s, int: t); 34 | 35 | predicate value_precede_set(int: s, int: t, array[int] of var set of int: x) = 36 | gecode_precede_set(x,s,t); 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gecode - Generic Constraint Development Environment 2 | 3 | ![Gecode](images/gecode-logo-100.png "Gecode") 4 | 5 | Gecode is an open source C++ toolkit for developing 6 | constraint-based systems and applications. Gecode provides a 7 | constraint solver with state-of-the-art performance while being 8 | modular and extensible. 9 | 10 | [master](https://github.com/Gecode/gecode/tree/master): 11 | [![Build Status master](https://api.travis-ci.org/Gecode/gecode.svg?branch=master)](https://travis-ci.org/Gecode/gecode) 12 | 13 | [develop](https://github.com/Gecode/gecode/tree/develop): 14 | [![Build Status develop](https://api.travis-ci.org/Gecode/gecode.svg?branch=develop)](https://travis-ci.org/Gecode/gecode) 15 | 16 | ## Getting All the Info You Need... 17 | 18 | You can find lots of information on 19 | [Gecode's webpages](https://gecode.github.io), 20 | including how to download, compile, install, and use it. 21 | 22 | In particular, 23 | Gecode comes with 24 | [extensive tutorial and reference documentation](https://gecode.github.io/documentation.html). 25 | 26 | ## Download Gecode 27 | 28 | Gecode packages (source, Apple MacOS, Microsoft Windows) can be downloaded from 29 | [GitHub](https://github.com/Gecode/gecode/releases) 30 | or 31 | [Gecode's webpages](https://gecode.github.io/download.html). 32 | 33 | ## Contributing to Gecode 34 | 35 | We happily accept smaller contributions and fixes, please provide them as pull requests against the develop branch. For larger contributions, please get in touch. 36 | 37 | ## Gecode License 38 | 39 | Gecode is licensed under the 40 | [MIT license](https://github.com/Gecode/gecode/blob/master/LICENSE). 41 | 42 | 43 | -------------------------------------------------------------------------------- /tools/flatzinc/mzn-gecode.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Main authors: 4 | # Guido Tack 5 | # 6 | # Copyright: 7 | # Guido Tack, 2012 8 | # 9 | # This file is part of Gecode, the generic constraint 10 | # development environment: 11 | # http://www.gecode.org 12 | # 13 | # Permission is hereby granted, free of charge, to any person obtaining 14 | # a copy of this software and associated documentation files (the 15 | # "Software"), to deal in the Software without restriction, including 16 | # without limitation the rights to use, copy, modify, merge, publish, 17 | # distribute, sublicense, and/or sell copies of the Software, and to 18 | # permit persons to whom the Software is furnished to do so, subject to 19 | # the following conditions: 20 | # 21 | # The above copyright notice and this permission notice shall be 22 | # included in all copies or substantial portions of the Software. 23 | # 24 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | # 32 | # 33 | 34 | prefix=@prefix@ 35 | datarootdir=@datarootdir@ 36 | if command -v minizinc >/dev/null 2>&1; then 37 | MZN_CMD=minizinc 38 | else 39 | MZN_CMD=mzn-fzn 40 | fi 41 | FLATZINC_CMD=fzn-gecode $MZN_CMD -I @datadir@/gecode/mznlib "$@" 42 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/lex_less_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate array_int_lt(array[int] of var int: x, 34 | array[int] of var int: y); 35 | 36 | predicate lex_less_int(array[int] of var int: x, 37 | array[int] of var int: y) = 38 | array_int_lt(x,y); 39 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/lex_lesseq_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate array_int_lq(array[int] of var int: x, 34 | array[int] of var int: y); 35 | 36 | predicate lex_lesseq_int(array[int] of var int: x, 37 | array[int] of var int: y) = 38 | array_int_lq(x,y); 39 | -------------------------------------------------------------------------------- /gecode/kernel/branch/afc.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2012 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | const AFC AFC::def; 39 | 40 | } 41 | 42 | // STATISTICS: kernel-branch 43 | -------------------------------------------------------------------------------- /gecode/search/engine.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2015 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { namespace Search { 35 | 36 | forceinline 37 | Engine::~Engine(void) {} 38 | 39 | }} 40 | 41 | // STATISTICS: search-other 42 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/lex_less_bool.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate array_bool_lt(array[int] of var bool: x, 34 | array[int] of var bool: y); 35 | 36 | predicate lex_less_bool(array[int] of var bool: x, 37 | array[int] of var bool: y) = 38 | array_bool_lt(x,y); 39 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/lex_lesseq_bool.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate array_bool_lq(array[int] of var bool: x, 34 | array[int] of var bool: y); 35 | 36 | predicate lex_lesseq_bool(array[int] of var bool: x, 37 | array[int] of var bool: y) = 38 | array_bool_lq(x,y); 39 | -------------------------------------------------------------------------------- /gecode/kernel/gpi.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2009 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { namespace Kernel { 37 | 38 | Support::Mutex GPI::m; 39 | 40 | }} 41 | 42 | // STATISTICS: kernel-prop 43 | -------------------------------------------------------------------------------- /misc/allexamples.perl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use File::Basename; 3 | 4 | $directory = $ARGV[0]; 5 | 6 | open (EXAMPLES, "find $directory/examples -maxdepth 1 -type f ! -name '*.*' |"); 7 | 8 | while (my $x = ) { 9 | chomp($x); 10 | my ($filename, $dummydir, $suffix) = fileparse($x); 11 | 12 | open (HELP, "$x -help 2>&1 |"); 13 | my @prop; 14 | my @model; 15 | while (my $l = ) { 16 | if ($l =~ /-propagation \((.*)\)/) { 17 | $l1 = $1; 18 | $l1 =~ s/ //g; 19 | @prop = split(/,/, $l1); 20 | } elsif ($l =~ /-model \((.*)\)/) { 21 | $l1 = $1; 22 | $l1 =~ s/ //g; 23 | @model = split(/,/, $l1); 24 | } 25 | } 26 | if (scalar(@prop) == 0) { 27 | if (scalar(@model) == 0) { 28 | runexample($directory,$filename); 29 | } else { 30 | foreach $m (@model) { 31 | runexample($directory,"$filename -model $m"); 32 | } 33 | } 34 | } else { 35 | foreach $p (@prop) { 36 | if (scalar(@model) == 0) { 37 | runexample($directory,"$filename -propagation $p"); 38 | } else { 39 | foreach $m (@model) { 40 | runexample($directory,"$filename -propagation $p -model $m"); 41 | } 42 | } 43 | } 44 | } 45 | close (HELP); 46 | } 47 | close (EXAMPLES); 48 | 49 | sub runexample { 50 | $directory = $_[0]; 51 | $filename = $_[1]; 52 | print "------------------------------------------------------------\n"; 53 | print "Running $filename\n"; 54 | open (EX, "$directory/examples/$filename -time 120000 2>&1 |"); 55 | while ($l = ) { 56 | print $l; 57 | } 58 | close (EX); 59 | print "------------------------------------------------------------\n"; 60 | } 61 | -------------------------------------------------------------------------------- /gecode/minimodel/ipl.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main author: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2018 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | const IntPropLevels IntPropLevels::def; 39 | 40 | } 41 | 42 | // STATISTICS: minimodel-any 43 | 44 | -------------------------------------------------------------------------------- /gecode/support/allocator.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { namespace Support { 37 | 38 | Allocator allocator; 39 | 40 | }} 41 | 42 | // STATISTICS: support-any 43 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/global_cardinality_low_up.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate global_cardinality_low_up(array[int] of var int: x, 34 | array[int] of int: cover, 35 | array[int] of int: lbound, 36 | array[int] of int: ubound); 37 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/member_int.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate member_int(array[int] of var int: x, var int: y); 34 | predicate gecode_member_int_reif(array[int] of var int: x, var int: y, 35 | var bool: b); 36 | predicate member_int_reif(array[int] of var int: x, var int: y, 37 | var bool: b) = gecode_member_int_reif(x,y,b); 38 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/partition_set.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate array_set_partition(array[int] of var set of int: S, 34 | set of int: universe); 35 | 36 | predicate partition_set(array[int] of var set of int: S, 37 | set of int: universe) = 38 | array_set_partition(S, universe); 39 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/member_bool.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate member_bool(array[int] of var bool: x, var bool: y); 34 | predicate gecode_member_bool_reif(array[int] of var bool: x, var bool: y, 35 | var bool: b); 36 | predicate member_bool_reif(array[int] of var bool: x, var bool: y, 37 | var bool: b) = gecode_member_bool_reif(x,y,b); 38 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/circuit.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate gecode_circuit(int: offset, array[int] of var int: x); 34 | 35 | predicate circuit(array[int] of var int: x) = 36 | if min(index_set(x)) >= 0 then 37 | gecode_circuit(min(index_set(x)),x) 38 | else 39 | gecode_circuit(0,[x[i]-min(index_set(x)) | i in index_set(x)]) 40 | endif; 41 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/count.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate count(array[int] of var int: x, var int: y, var int: c); 34 | 35 | predicate count_reif(array[int] of var int: x, var int: y, var int: c, 36 | var bool: b); 37 | 38 | predicate count_imp(array[int] of var int: x, var int: y, var int: c, 39 | var bool: r); 40 | -------------------------------------------------------------------------------- /gecode/minimodel/bool-expr.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Guido Tack 5 | * 6 | * Copyright: 7 | * Guido Tack, 2004 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | /* 37 | * Operations for expressions 38 | * 39 | */ 40 | 41 | forceinline 42 | BoolExpr::Misc::Misc(void) {} 43 | 44 | } 45 | 46 | // STATISTICS: minimodel-any 47 | -------------------------------------------------------------------------------- /gecode/kernel/trace/general.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | inline void 37 | trace(Home home, int te, Tracer& t) { 38 | trace(home,TraceFilter::all,te,t); 39 | } 40 | 41 | } 42 | 43 | // STATISTICS: kernel-trace 44 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate global_cardinality_low_up_closed(array[int] of var int: x, 34 | array[int] of int: cover, 35 | array[int] of int: lbound, 36 | array[int] of int: ubound); 37 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/sum_pred.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate gecode_set_weights(array[int] of int: csi,array[int] of int: cs, 34 | var set of int: x, var int: y); 35 | 36 | predicate sum_pred(var int: i, array[int] of set of int: sets, 37 | array[int] of int: cs, var int: s) = 38 | gecode_set_weights([j|j in index_set(cs)],cs,sets[i],s); 39 | -------------------------------------------------------------------------------- /gecode/support/hw-rnd.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2012 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { namespace Support { 35 | 36 | /// Return hardware generated random number 37 | GECODE_SUPPORT_EXPORT unsigned int hwrnd(void); 38 | 39 | }} 40 | 41 | // STATISTICS: support-any 42 | 43 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/inverse.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate inverse_offsets(array[int] of var int: f, int: foff, 34 | array[int] of var int: invf, int: invfoff); 35 | 36 | predicate inverse(array[int] of var int: f, 37 | array[int] of var int: invf) = 38 | inverse_offsets(f, min(index_set(invf)), invf, min(index_set(f))); 39 | -------------------------------------------------------------------------------- /contribs/quacode/quacode/support/log.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Vincent Barichard 5 | * 6 | * Copyright: 7 | * Vincent Barichard, 2013 8 | * 9 | * Last modified: 10 | * $Date$ by $Author$ 11 | * $Revision$ 12 | * 13 | * This file is part of Quacode: 14 | * http://quacode.barichard.com 15 | * 16 | * Permission is hereby granted, free of charge, to any person obtaining 17 | * a copy of this software and associated documentation files (the 18 | * "Software"), to deal in the Software without restriction, including 19 | * without limitation the rights to use, copy, modify, merge, publish, 20 | * distribute, sublicense, and/or sell copies of the Software, and to 21 | * permit persons to whom the Software is furnished to do so, subject to 22 | * the following conditions: 23 | * 24 | * The above copyright notice and this permission notice shall be 25 | * included in all copies or substantial portions of the Software. 26 | * 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | * 35 | */ 36 | 37 | #include 38 | 39 | // Initialisation of instance of Log 40 | Gecode::Support::Log* Gecode::Support::Log::m_pLog = new Log(); 41 | -------------------------------------------------------------------------------- /gecode/int/channel.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline void 37 | channel(Home home, IntVar x0, BoolVar x1, 38 | IntPropLevel ipl) { 39 | channel(home,x1,x0,ipl); 40 | } 41 | 42 | } 43 | 44 | // STATISTICS: int-post 45 | -------------------------------------------------------------------------------- /gecode/set/trace.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | inline void 37 | trace(Home home, const SetVarArgs& x, 38 | int te, SetTracer& t) { 39 | trace(home,x,TraceFilter::all,te,t); 40 | } 41 | 42 | } 43 | 44 | // STATISTICS: set-trace 45 | -------------------------------------------------------------------------------- /gecode/float/trace.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | inline void 37 | trace(Home home, const FloatVarArgs& x, 38 | int te, FloatTracer& t) { 39 | trace(home,x,TraceFilter::all,te,t); 40 | } 41 | 42 | } 43 | 44 | // STATISTICS: float-trace 45 | -------------------------------------------------------------------------------- /gecode/support/heap.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2008 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | Heap::Heap(void) 39 | #ifdef GECODE_PEAKHEAP 40 | : _peak(0), _cur(0) 41 | #endif 42 | {} 43 | 44 | Heap heap; 45 | 46 | } 47 | 48 | // STATISTICS: support-any 49 | -------------------------------------------------------------------------------- /misc/fixautoheader.perl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | print < 7 | * 8 | * Copyright: 9 | * Guido Tack, 2008 10 | * 11 | * This file is part of Gecode, the generic constraint 12 | * development environment: 13 | * http://www.gecode.org 14 | * 15 | * Permission is hereby granted, free of charge, to any person obtaining 16 | * a copy of this software and associated documentation files (the 17 | * "Software"), to deal in the Software without restriction, including 18 | * without limitation the rights to use, copy, modify, merge, publish, 19 | * distribute, sublicense, and/or sell copies of the Software, and to 20 | * permit persons to whom the Software is furnished to do so, subject to 21 | * the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be 24 | * included in all copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | * 34 | */ 35 | 36 | EOF 37 | ; 38 | 39 | my $prev = ""; 40 | 41 | while (my $l = <>) { 42 | if ($l =~ /\#undef.*GECODE.*/ || $l =~/.*forceinline*/) { 43 | print $prev; 44 | print $l; 45 | print "\n"; 46 | } else { 47 | $prev = $l; 48 | } 49 | } 50 | 51 | print "// STATISTICS: support-any\n"; 52 | -------------------------------------------------------------------------------- /gecode/minimodel/set-expr.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Guido Tack 5 | * 6 | * Copyright: 7 | * Guido Tack, 2010 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #ifdef GECODE_HAS_SET_VARS 35 | 36 | namespace Gecode { 37 | 38 | /* 39 | * Operations for expressions 40 | * 41 | */ 42 | 43 | forceinline 44 | SetExpr::SetExpr(void) : n(nullptr) {} 45 | 46 | } 47 | 48 | #endif 49 | 50 | // STATISTICS: minimodel-any 51 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/platform/cygwin.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // cygwin specific config options: 9 | 10 | #define GECODE_BOOST_PLATFORM "Cygwin" 11 | #define GECODE_BOOST_HAS_DIRENT_H 12 | #define GECODE_BOOST_HAS_LOG1P 13 | #define GECODE_BOOST_HAS_EXPM1 14 | 15 | // 16 | // Threading API: 17 | // See if we have POSIX threads, if we do use them, otherwise 18 | // revert to native Win threads. 19 | #define GECODE_BOOST_HAS_UNISTD_H 20 | #include 21 | #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(GECODE_BOOST_HAS_WINTHREADS) 22 | # define GECODE_BOOST_HAS_PTHREADS 23 | # define GECODE_BOOST_HAS_SCHED_YIELD 24 | # define GECODE_BOOST_HAS_GETTIMEOFDAY 25 | # define GECODE_BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 26 | # define GECODE_BOOST_HAS_SIGACTION 27 | #else 28 | # if !defined(GECODE_BOOST_HAS_WINTHREADS) 29 | # define GECODE_BOOST_HAS_WINTHREADS 30 | # endif 31 | # define GECODE_BOOST_HAS_FTIME 32 | #endif 33 | 34 | // 35 | // find out if we have a stdint.h, there should be a better way to do this: 36 | // 37 | #include 38 | #ifdef _STDINT_H 39 | #define GECODE_BOOST_HAS_STDINT_H 40 | #endif 41 | 42 | /// Cygwin has no fenv.h 43 | #define GECODE_BOOST_NO_FENV_H 44 | 45 | // boilerplate code: 46 | #include 47 | 48 | // 49 | // Cygwin lies about XSI conformance, there is no nl_types.h: 50 | // 51 | #ifdef GECODE_BOOST_HAS_NL_TYPES_H 52 | # undef GECODE_BOOST_HAS_NL_TYPES_H 53 | #endif 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /gecode/int/trace/int-delta.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline 37 | IntTraceDelta::IntTraceDelta(Int::IntTraceView o, Int::IntView n, 38 | const Delta&) 39 | : rn(n), ro(o.ranges()) { 40 | init(ro,rn); 41 | } 42 | 43 | } 44 | 45 | // STATISTICS: int-trace 46 | -------------------------------------------------------------------------------- /gecode/support/cast.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2007 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | /// Cast \a p into pointer of type \a T 37 | template 38 | T ptr_cast(void* p); 39 | 40 | template 41 | forceinline T 42 | ptr_cast(void* p) { 43 | return static_cast(p); 44 | } 45 | 46 | } 47 | 48 | // STATISTICS: support-any 49 | -------------------------------------------------------------------------------- /gecode/search/par/pbs.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2015 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { namespace Search { namespace Par { 37 | 38 | bool 39 | PortfolioStop::stop(const Statistics& s, const Options& o) { 40 | return *tostop || ((so != NULL) && so->stop(s,o)); 41 | } 42 | 43 | }}} 44 | 45 | // STATISTICS: search-par 46 | -------------------------------------------------------------------------------- /gecode/set/var/print.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2008 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | template 37 | inline std::basic_ostream& 38 | operator <<(std::basic_ostream& os, const SetVar& x) { 39 | Gecode::Set::SetView vx(x); 40 | return os << vx; 41 | } 42 | 43 | } 44 | 45 | // STATISTICS: set-var 46 | -------------------------------------------------------------------------------- /contribs/qecode/qsolver_parallel.hh: -------------------------------------------------------------------------------- 1 | /************************************************************ qsolver_parallel.hh 2 | Copyright (c) 2010 Universite d'Orleans - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | 23 | #include "QCOPPlus.hh" 24 | #include "WorkManager.hh" 25 | #include "Worker.hh" 26 | #include 27 | #include 28 | #include "Strategy.hh" 29 | #include "qecode.hh" 30 | 31 | 32 | class QECODE_VTABLE_EXPORT QCSP_Parallel_Solver { 33 | 34 | private : 35 | WorkManager wm; 36 | QWorker** workers; 37 | unsigned int nw; 38 | 39 | public : 40 | 41 | QECODE_EXPORT QCSP_Parallel_Solver(Qcop* sp,WorkComparator* c,unsigned int nbWorkers); 42 | QECODE_EXPORT Strategy solve(); 43 | }; -------------------------------------------------------------------------------- /gecode/float/bool.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | void 39 | ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z) { 40 | using namespace Float; 41 | GECODE_POST; 42 | GECODE_ES_FAIL(Bool::Ite::post(home,b,x,y,z)); 43 | } 44 | 45 | } 46 | 47 | // STATISTICS: float-post 48 | -------------------------------------------------------------------------------- /gecode/flatzinc/exampleplugin/myplugin.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Guido Tack 5 | * 6 | * Copyright: 7 | * Guido Tack, 2010 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | #include "myplugin.hh" 37 | 38 | void MyPlugin::branch(Gecode::FlatZinc::FlatZincSpace& s, 39 | Gecode::FlatZinc::AST::Call* c) { 40 | std::cerr << "MyPlugin::branch "; 41 | c->print(std::cerr); 42 | std::cerr << std::endl; 43 | } 44 | 45 | Q_EXPORT_PLUGIN2(myplugin, MyPlugin) 46 | -------------------------------------------------------------------------------- /gecode/int/nvalues/range-event.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2011 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { namespace Int { namespace NValues { 35 | 36 | forceinline bool 37 | RangeEvent::operator <(RangeEvent re) const { 38 | if (val < re.val) 39 | return true; 40 | if (val == re.val) 41 | return ret < re.ret; 42 | return false; 43 | } 44 | 45 | }}} 46 | 47 | // STATISTICS: int-prop 48 | -------------------------------------------------------------------------------- /gecode/set/int.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline void 37 | rel(Home home, IntVar x, IntRelType rt, SetVar s) { 38 | rel(home, s, swap(rt), x); 39 | } 40 | 41 | forceinline void 42 | rel(Home home, IntVar x, IntRelType rt, SetVar s, Reify r) { 43 | rel(home, s, swap(rt), x, r); 44 | } 45 | 46 | } 47 | 48 | // STATISTICS: set-post 49 | -------------------------------------------------------------------------------- /gecode/int/int-set-2.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2008 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | /// Initialize integer set with integer arguments 37 | template<> 38 | class IntSetInit { 39 | public: 40 | static void init(IntSet& s, const IntArgs& i) { 41 | if (i.size() > 0) 42 | s.init(&i[0],i.size()); 43 | } 44 | }; 45 | 46 | } 47 | 48 | // STATISTICS: int-var 49 | 50 | -------------------------------------------------------------------------------- /contribs/qecode/Work.cc: -------------------------------------------------------------------------------- 1 | /************************************************************ Work.cc 2 | Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | 23 | #include "Work.hh" 24 | QWork::QWork(int scope,vector root,Gecode::Search::Engine* todo){ 25 | this->theRoot = root; 26 | this->remaining = todo; 27 | this->scope = scope; 28 | this->wait = this->stop = false; 29 | } 30 | 31 | QWork::~QWork() {} 32 | 33 | QWork QWork::Wait() { 34 | QWork ret; 35 | ret.wait=true; 36 | ret.stop=false; 37 | ret.remaining=NULL; 38 | return ret; 39 | } 40 | 41 | QWork QWork::Stop() { 42 | QWork ret; 43 | ret.wait=false; 44 | ret.stop=true; 45 | ret.remaining=NULL; 46 | return ret; 47 | } 48 | 49 | -------------------------------------------------------------------------------- /gecode/search/seq/dead.hh: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2015 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | #ifndef __GECODE_SEARCH_SEQ_DEAD_HH__ 37 | #define __GECODE_SEARCH_SEQ_DEAD_HH__ 38 | 39 | namespace Gecode { namespace Search { namespace Seq { 40 | 41 | GECODE_SEARCH_EXPORT 42 | Engine* dead(const Options& o, const Statistics& stat); 43 | 44 | }}} 45 | 46 | #endif 47 | 48 | // STATISTICS: search-seq 49 | -------------------------------------------------------------------------------- /gecode/set/trace/traits.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | /// Trace traits for set views 37 | template<> 38 | class TraceTraits { 39 | public: 40 | typedef Set::SetTraceView TraceView; 41 | typedef SetTraceDelta TraceDelta; 42 | typedef unsigned long long int SlackValue; 43 | }; 44 | 45 | } 46 | 47 | // STATISTICS: set-trace 48 | -------------------------------------------------------------------------------- /contribs/qecode/AbstractWorker.hh: -------------------------------------------------------------------------------- 1 | /**** , [ Worker.hh ], 2 | Copyright (c) 2010 Universite de Caen Basse Normandie - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | 23 | #ifndef __QECODE_ABSTRACT_WORKER__ 24 | #define __QECODE_ABSTRACT_WORKER__ 25 | #include "qecode.hh" 26 | #include 27 | #include "gecode/support.hh" 28 | 29 | using namespace Gecode::Support; 30 | 31 | class QECODE_VTABLE_EXPORT AQWorker : public Runnable { 32 | 33 | public: 34 | QECODE_EXPORT virtual void stopAndReturn()=0; 35 | QECODE_EXPORT virtual void stopAndForget()=0; 36 | QECODE_EXPORT virtual vector workPosition()=0; 37 | QECODE_EXPORT virtual bool mustStop()=0; 38 | QECODE_EXPORT virtual void wake()=0; 39 | // QECODE_EXPORT Strategy solve(); 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /gecode/float/trace/traits.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | /// Trace traits for float views 37 | template<> 38 | class TraceTraits { 39 | public: 40 | typedef Float::FloatTraceView TraceView; 41 | typedef FloatTraceDelta TraceDelta; 42 | typedef FloatNum SlackValue; 43 | }; 44 | 45 | } 46 | 47 | // STATISTICS: float-trace 48 | -------------------------------------------------------------------------------- /contribs/qecode/WorkComparators.hh: -------------------------------------------------------------------------------- 1 | /* 2 | * WorkComparators.hh 3 | * 4 | * 5 | * Created by Jérémie Vautard on 31/03/10. 6 | * Copyright 2010 Université d'Orléans. All rights reserved. 7 | * 8 | */ 9 | 10 | #include "WorkManager.hh" 11 | #include "QCOPPlus.hh" 12 | 13 | class BidonComparator : public WorkComparator { 14 | public : 15 | virtual bool cmp(QWork a,QWork b) { 16 | return false; 17 | } 18 | }; 19 | 20 | class DeepFirstComparator : public WorkComparator { 21 | public : 22 | virtual bool cmp(QWork a,QWork b) { 23 | if (a.root().size() > b.root().size()) return true; 24 | if (a.root().size() < b.root().size()) return false; 25 | return ((a.getRemaining()) < (b.getRemaining())); 26 | } 27 | }; 28 | 29 | class QuantifierThenDepthComparator : public WorkComparator { 30 | private : 31 | Qcop* problem; 32 | bool existsFirst; 33 | bool deepestFirst; 34 | 35 | public : 36 | QuantifierThenDepthComparator(Qcop* p,bool existsFirst,bool deepestFirst) { 37 | this->problem = p; 38 | this->existsFirst = existsFirst; 39 | this->deepestFirst = deepestFirst; 40 | } 41 | virtual bool cmp(QWork a,QWork b) { 42 | bool q1 = (problem->qt_of_var(a.root().size()) != existsFirst); 43 | bool q2 = (problem->qt_of_var(b.root().size()) != existsFirst); 44 | if (q1 && !q2) return true; 45 | if (!q1 && q2) return false; 46 | int d1 = a.root().size(); 47 | int d2 = b.root().size(); 48 | if ( (d1 < d2) != deepestFirst) return true; 49 | return false; 50 | } 51 | }; 52 | 53 | class DepthComparator : public WorkComparator { 54 | private : 55 | bool deepestFirst; 56 | public : 57 | DepthComparator(bool deepestFirst) { 58 | this->deepestfirst = deepestFirst; 59 | } 60 | 61 | virtual bool cmp(QWork a,QWork b) { 62 | int d1 = a.root().size(); 63 | int d2 = b.root().size(); 64 | if ( (d1 < d2) != deepestFirst) return true; 65 | return false; 66 | } 67 | }; 68 | -------------------------------------------------------------------------------- /gecode/set/bool.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | void 39 | ite(Home home, BoolVar b, SetVar x, SetVar y, SetVar z) { 40 | GECODE_POST; 41 | IntVar i(home,0,1); 42 | channel(home, b, i); 43 | SetVarArgs yx(2); 44 | yx[0]=y; yx[1]=x; 45 | element(home, yx, i, z); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: set-post 51 | -------------------------------------------------------------------------------- /gecode/set/branch/chb.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline 37 | SetCHB::SetCHB(void) {} 38 | 39 | forceinline 40 | SetCHB::SetCHB(const SetCHB& chb) 41 | : CHB(chb) {} 42 | 43 | forceinline SetCHB& 44 | SetCHB::operator =(const SetCHB& chb) { 45 | return static_cast(CHB::operator =(chb)); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: set-branch 51 | -------------------------------------------------------------------------------- /gecode/flatzinc/exampleplugin/myplugin.hh: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Guido Tack 5 | * 6 | * Copyright: 7 | * Guido Tack, 2010 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | #include 36 | 37 | class MyPlugin : public QObject, public Gecode::FlatZinc::BranchPlugin { 38 | public: 39 | Q_OBJECT 40 | Q_INTERFACES(Gecode::FlatZinc::BranchPlugin) 41 | virtual void branch(Gecode::FlatZinc::FlatZincSpace& s, 42 | Gecode::FlatZinc::AST::Call* c); 43 | }; 44 | -------------------------------------------------------------------------------- /gecode/flatzinc/mznlib/distribute.mzn: -------------------------------------------------------------------------------- 1 | % 2 | % Main authors: 3 | % Guido Tack 4 | % 5 | % Copyright: 6 | % Guido Tack, 2007 7 | % 8 | % This file is part of Gecode, the generic constraint 9 | % development environment: 10 | % http://www.gecode.org 11 | % 12 | % Permission is hereby granted, free of charge, to any person obtaining 13 | % a copy of this software and associated documentation files (the 14 | % "Software"), to deal in the Software without restriction, including 15 | % without limitation the rights to use, copy, modify, merge, publish, 16 | % distribute, sublicense, and/or sell copies of the Software, and to 17 | % permit persons to whom the Software is furnished to do so, subject to 18 | % the following conditions: 19 | % 20 | % The above copyright notice and this permission notice shall be 21 | % included in all copies or substantial portions of the Software. 22 | % 23 | % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | % EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | % MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | % NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | % LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | % OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | % WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | % 31 | % 32 | 33 | predicate distribute(array[int] of var int: card, 34 | array[int] of var int: value, 35 | array[int] of var int: base) = 36 | assert(index_set(card) == index_set(value), 37 | "distribute: card and value arrays must have identical index sets", 38 | forall (i in index_set(card)) ( 39 | bool_sum_eq([value[i] == base[j] | j in index_set(base)], 40 | card[i]) 41 | ) 42 | ); 43 | -------------------------------------------------------------------------------- /gecode/float/var/print.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * Guido Tack 6 | * 7 | * Copyright: 8 | * Christian Schulte, 2008 9 | * Guido Tack, 2012 10 | * 11 | * This file is part of Gecode, the generic constraint 12 | * development environment: 13 | * http://www.gecode.org 14 | * 15 | * Permission is hereby granted, free of charge, to any person obtaining 16 | * a copy of this software and associated documentation files (the 17 | * "Software"), to deal in the Software without restriction, including 18 | * without limitation the rights to use, copy, modify, merge, publish, 19 | * distribute, sublicense, and/or sell copies of the Software, and to 20 | * permit persons to whom the Software is furnished to do so, subject to 21 | * the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be 24 | * included in all copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | * 34 | */ 35 | 36 | namespace Gecode { 37 | 38 | template 39 | inline std::basic_ostream& 40 | operator <<(std::basic_ostream& os, const FloatVar& x) { 41 | Float::FloatView vx(x); 42 | return os << vx; 43 | } 44 | 45 | } 46 | 47 | // STATISTICS: float-var 48 | -------------------------------------------------------------------------------- /contribs/qecode/qsolver_parallel.cc: -------------------------------------------------------------------------------- 1 | /************************************************************ qsolver_parallel.cc 2 | Copyright (c) 2010 Universite d'Orleans - Jeremie Vautard 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | *************************************************************************/ 22 | 23 | #include "qsolver_parallel.hh" 24 | 25 | QCSP_Parallel_Solver::QCSP_Parallel_Solver(Qcop* sp,WorkComparator* c,unsigned int nbWorkers) : wm(sp,c) { 26 | workers = new QWorker*[nbWorkers]; 27 | nw = nbWorkers; 28 | for (unsigned int i=0;i 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline 37 | FloatCHB::FloatCHB(void) {} 38 | 39 | forceinline 40 | FloatCHB::FloatCHB(const FloatCHB& chb) 41 | : CHB(chb) {} 42 | 43 | forceinline FloatCHB& 44 | FloatCHB::operator =(const FloatCHB& chb) { 45 | return static_cast(CHB::operator =(chb)); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: float-branch 51 | -------------------------------------------------------------------------------- /gecode/int/var/bool.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2006 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | BoolVar::BoolVar(Space& home, int min, int max) { 39 | if ((min < 0) || (max > 1)) 40 | throw Int::NotZeroOne("BoolVar::BoolVar"); 41 | if (min > max) 42 | throw Int::VariableEmptyDomain("BoolVar::BoolVar"); 43 | _init(home,min,max); 44 | } 45 | 46 | } 47 | 48 | // STATISTICS: int-var 49 | 50 | -------------------------------------------------------------------------------- /gecode/flatzinc/exampleplugin/myplugin.pro: -------------------------------------------------------------------------------- 1 | # 2 | # Main authors: 3 | # Guido Tack 4 | # 5 | # Copyright: 6 | # Guido Tack, 2010 7 | # 8 | # This file is part of Gecode, the generic constraint 9 | # development environment: 10 | # http://www.gecode.org 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining 13 | # a copy of this software and associated documentation files (the 14 | # "Software"), to deal in the Software without restriction, including 15 | # without limitation the rights to use, copy, modify, merge, publish, 16 | # distribute, sublicense, and/or sell copies of the Software, and to 17 | # permit persons to whom the Software is furnished to do so, subject to 18 | # the following conditions: 19 | # 20 | # The above copyright notice and this permission notice shall be 21 | # included in all copies or substantial portions of the Software. 22 | # 23 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | # 31 | # 32 | 33 | TEMPLATE = lib 34 | CONFIG += plugin release x86_64 35 | INCLUDEPATH += ../../.. 36 | HEADERS = myplugin.hh 37 | SOURCES = myplugin.cpp 38 | TARGET = myplugin 39 | win32:DESTDIR = ./ 40 | LIBS += -L../../.. 41 | macx { 42 | LIBS += -framework gecode 43 | } 44 | unix { 45 | !macx { 46 | LIBS += -lgecodekernel -lgecodesupport -lgecodeint -lgecodescheduling -lgecodegraph -lgecodeminimodel -lgecodedriver -lgecodesearch -lgecodeflatzinc 47 | }} 48 | -------------------------------------------------------------------------------- /gecode/int/trace.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | inline void 37 | trace(Home home, const IntVarArgs& x, 38 | int te, IntTracer& t) { 39 | trace(home,x,TraceFilter::all,te,t); 40 | } 41 | 42 | inline void 43 | trace(Home home, const BoolVarArgs& x, 44 | int te, BoolTracer& t) { 45 | trace(home,x,TraceFilter::all,te,t); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: int-trace 51 | -------------------------------------------------------------------------------- /gecode/set/branch/action.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2012 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline 37 | SetAction::SetAction(void) {} 38 | 39 | forceinline 40 | SetAction::SetAction(const SetAction& a) 41 | : Action(a) {} 42 | 43 | forceinline SetAction& 44 | SetAction::operator =(const SetAction& a) { 45 | return static_cast(Action::operator =(a)); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: set-branch 51 | -------------------------------------------------------------------------------- /gecode/set/trace.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | void 39 | trace(Home home, const SetVarArgs& x, 40 | TraceFilter tf, int te, SetTracer& t) { 41 | using namespace Gecode::Set; 42 | GECODE_POST; 43 | ViewArray xv(home,x); 44 | GECODE_ES_FAIL(SetTraceRecorder::post(home,xv,tf,te,t)); 45 | } 46 | 47 | } 48 | 49 | // STATISTICS: set-trace 50 | -------------------------------------------------------------------------------- /gecode/third-party/boost/config/stdlib/modena.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jens Maurer 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Modena C++ standard library (comes with KAI C++) 9 | 10 | #if !defined(MSIPL_COMPILE_H) 11 | # include 12 | # if !defined(__MSIPL_COMPILE_H) 13 | # error "This is not the Modena C++ library!" 14 | # endif 15 | #endif 16 | 17 | #ifndef MSIPL_NL_TYPES 18 | #define GECODE_BOOST_NO_STD_MESSAGES 19 | #endif 20 | 21 | #ifndef MSIPL_WCHART 22 | #define GECODE_BOOST_NO_STD_WSTRING 23 | #endif 24 | 25 | // C++0x headers not yet implemented 26 | // 27 | # define GECODE_BOOST_NO_0X_HDR_ARRAY 28 | # define GECODE_BOOST_NO_0X_HDR_CHRONO 29 | # define GECODE_BOOST_NO_0X_HDR_CODECVT 30 | # define GECODE_BOOST_NO_0X_HDR_CONDITION_VARIABLE 31 | # define GECODE_BOOST_NO_0X_HDR_FORWARD_LIST 32 | # define GECODE_BOOST_NO_0X_HDR_FUTURE 33 | # define GECODE_BOOST_NO_0X_HDR_INITIALIZER_LIST 34 | # define GECODE_BOOST_NO_0X_HDR_MUTEX 35 | # define GECODE_BOOST_NO_0X_HDR_RANDOM 36 | # define GECODE_BOOST_NO_0X_HDR_RATIO 37 | # define GECODE_BOOST_NO_0X_HDR_REGEX 38 | # define GECODE_BOOST_NO_0X_HDR_SYSTEM_ERROR 39 | # define GECODE_BOOST_NO_0X_HDR_THREAD 40 | # define GECODE_BOOST_NO_0X_HDR_TUPLE 41 | # define GECODE_BOOST_NO_0X_HDR_TYPE_TRAITS 42 | # define GECODE_BOOST_NO_0X_HDR_TYPEINDEX 43 | # define GECODE_BOOST_NO_STD_UNORDERED // deprecated; see following 44 | # define GECODE_BOOST_NO_0X_HDR_UNORDERED_MAP 45 | # define GECODE_BOOST_NO_0X_HDR_UNORDERED_SET 46 | # define GECODE_BOOST_NO_NUMERIC_LIMITS_LOWEST 47 | 48 | #define GECODE_BOOST_STDLIB "Modena C++ standard library" 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /gecode/kernel/trace/general.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | void 39 | trace(Home home, TraceFilter tf, int te, Tracer& t) { 40 | if (static_cast(home).findtracerecorder()) 41 | throw MoreThanOneTracer("trace()"); 42 | GECODE_POST; 43 | GECODE_ES_FAIL(TraceRecorder::post(home,tf,te,t)); 44 | } 45 | 46 | } 47 | 48 | // STATISTICS: kernel-trace 49 | -------------------------------------------------------------------------------- /gecode/float/channel.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * Vincent Barichard 6 | * 7 | * Copyright: 8 | * Christian Schulte, 2002 9 | * Vincent Barichard, 2012 10 | * 11 | * This file is part of Gecode, the generic constraint 12 | * development environment: 13 | * http://www.gecode.org 14 | * 15 | * Permission is hereby granted, free of charge, to any person obtaining 16 | * a copy of this software and associated documentation files (the 17 | * "Software"), to deal in the Software without restriction, including 18 | * without limitation the rights to use, copy, modify, merge, publish, 19 | * distribute, sublicense, and/or sell copies of the Software, and to 20 | * permit persons to whom the Software is furnished to do so, subject to 21 | * the following conditions: 22 | * 23 | * The above copyright notice and this permission notice shall be 24 | * included in all copies or substantial portions of the Software. 25 | * 26 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 27 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 28 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 29 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 30 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 31 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 32 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 33 | * 34 | */ 35 | 36 | namespace Gecode { 37 | 38 | inline void 39 | channel(Home home, IntVar x0, FloatVar x1) { 40 | channel(home, x1, x0); 41 | } 42 | 43 | inline void 44 | channel(Home home, BoolVar x0, FloatVar x1) { 45 | channel(home, x1, x0); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: float-post 51 | -------------------------------------------------------------------------------- /gecode/float/trace.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2016 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | void 39 | trace(Home home, const FloatVarArgs& x, 40 | TraceFilter tf, int te, FloatTracer& t) { 41 | using namespace Gecode::Float; 42 | GECODE_POST; 43 | ViewArray xv(home,x); 44 | GECODE_ES_FAIL(FloatTraceRecorder::post(home,xv,tf,te,t)); 45 | } 46 | 47 | } 48 | 49 | // STATISTICS: int-trace 50 | -------------------------------------------------------------------------------- /gecode/float/branch/action.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2012 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline 37 | FloatAction::FloatAction(void) {} 38 | 39 | forceinline 40 | FloatAction::FloatAction(const FloatAction& a) 41 | : Action(a) {} 42 | 43 | forceinline FloatAction& 44 | FloatAction::operator =(const FloatAction& a) { 45 | return static_cast(Action::operator =(a)); 46 | } 47 | 48 | } 49 | 50 | // STATISTICS: float-branch 51 | -------------------------------------------------------------------------------- /gecode/search/options.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2008 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { namespace Search { 35 | 36 | forceinline 37 | Options::Options(void) 38 | : clone(Config::clone), 39 | threads(Config::threads), 40 | c_d(Config::c_d), a_d(Config::a_d), 41 | d_l(Config::d_l), 42 | assets(0), slice(Config::slice), nogoods_limit(0), 43 | stop(nullptr), cutoff(nullptr), tracer(nullptr) {} 44 | 45 | }} 46 | 47 | // STATISTICS: search-other 48 | -------------------------------------------------------------------------------- /gecode/search/engine.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2015 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { namespace Search { 37 | 38 | void 39 | Engine::constrain(const Space& b) { 40 | (void) b; 41 | throw NoBest("Engine::constrain"); 42 | } 43 | void 44 | Engine::reset(Space* s) { 45 | (void) s; 46 | } 47 | NoGoods& 48 | Engine::nogoods(void) { 49 | return NoGoods::eng; 50 | } 51 | 52 | }} 53 | 54 | // STATISTICS: search-other 55 | -------------------------------------------------------------------------------- /gecode/int/ipl.hpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2015 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | namespace Gecode { 35 | 36 | forceinline IntPropLevel 37 | vbd(IntPropLevel ipl) { 38 | return static_cast(ipl & 39 | (IPL_DEF | IPL_VAL | IPL_BND | IPL_DOM)); 40 | } 41 | 42 | forceinline IntPropLevel 43 | ba(IntPropLevel ipl) { 44 | return static_cast(ipl & IPL_BASIC_ADVANCED); 45 | } 46 | 47 | } 48 | 49 | // STATISTICS: int-post 50 | 51 | -------------------------------------------------------------------------------- /gecode/set/branch/chb.cpp: -------------------------------------------------------------------------------- 1 | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 | /* 3 | * Main authors: 4 | * Christian Schulte 5 | * 6 | * Copyright: 7 | * Christian Schulte, 2017 8 | * 9 | * This file is part of Gecode, the generic constraint 10 | * development environment: 11 | * http://www.gecode.org 12 | * 13 | * Permission is hereby granted, free of charge, to any person obtaining 14 | * a copy of this software and associated documentation files (the 15 | * "Software"), to deal in the Software without restriction, including 16 | * without limitation the rights to use, copy, modify, merge, publish, 17 | * distribute, sublicense, and/or sell copies of the Software, and to 18 | * permit persons to whom the Software is furnished to do so, subject to 19 | * the following conditions: 20 | * 21 | * The above copyright notice and this permission notice shall be 22 | * included in all copies or substantial portions of the Software. 23 | * 24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | * 32 | */ 33 | 34 | #include 35 | 36 | namespace Gecode { 37 | 38 | SetCHB::SetCHB(Home home, const SetVarArgs& x, SetBranchMerit bm) { 39 | ViewArray y(home,x); 40 | CHB::init(home,y,bm); 41 | } 42 | 43 | void 44 | SetCHB::init(Home home, const SetVarArgs& x, SetBranchMerit bm) { 45 | ViewArray y(home,x); 46 | CHB::init(home,y,bm); 47 | } 48 | 49 | } 50 | 51 | // STATISTICS: set-branch 52 | --------------------------------------------------------------------------------