dep-selector-libgecode 1.0.0.alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +26 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +20 -0
- data/dep-selector-libgecode.gemspec +25 -0
- data/ext/libgecode3/Makefile +8 -0
- data/ext/libgecode3/extconf.rb +57 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/LICENSE +25 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.contribs +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.dep +11307 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.in +1795 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/changelog.in +6132 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure +13054 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac +356 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac.in +352 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/README +26 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/AbstractWorker.hh +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Doxyfile +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Makefile.in.in +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.cc +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.hh +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc +306 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.hh +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.cc +239 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.hh +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/README +6 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.cc +253 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.hh +112 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.cc +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.hh +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableBranching.hh +34 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.cc +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.hh +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.cc +48 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.hh +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkComparators.hh +67 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.cc +376 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.cc +285 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.hh +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/clean +5 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure +2637 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure.ac +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myDom.cc +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.cc +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.hh +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qecode.hh +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.cc +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.hh +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.cc +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.hh +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.cc +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.hh +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.cc +423 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.hh +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/shortdesc.ac +1 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/vartype.hh +31 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.conf.in +1245 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.hh.in +594 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/all-interval.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/alpha.cpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bacp.cpp +596 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bibd.cpp +182 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp +25363 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp +413 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/car-sequencing.cpp +653 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crew.cpp +269 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crossword.cpp +3954 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crowded-chess.cpp +424 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp +170 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/domino.cpp +346 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/donald.cpp +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/efpa.cpp +323 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/eq20.cpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/golf.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/golomb-ruler.cpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/graph-color.cpp +425 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/grocery.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/hamming.cpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/ind-set.cpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/kakuro.cpp +627 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/knights.cpp +430 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/langford-number.cpp +218 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-sequence.cpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-square.cpp +141 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/minesweeper.cpp +311 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/money.cpp +132 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/nonogram.cpp +1215 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/open-shop.cpp +412 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/ortho-latin.cpp +183 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/partition.cpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/pentominoes.cpp +952 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/perfect-square.cpp +317 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/photo.cpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/queen-armies.cpp +335 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/queens.cpp +214 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/radiotherapy.cpp +943 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sat.cpp +260 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/schurs-lemma.cpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/scowl.hpp +14149 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sports-league.cpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/steel-mill.cpp +654 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/steiner.cpp +170 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sudoku.cpp +2294 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/tsp.cpp +339 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/warehouses.cpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/word-square.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode.m4 +1272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver.hh +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.cpp +435 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.hpp +418 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.cpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.hpp +388 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc.hh +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/CHANGES +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/ast.hh +492 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/conexpr.hh +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.cpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.hh +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.pro +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/test_myplugin.fzn +1 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/flatzinc.cpp +1056 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.lxx +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.yy.cpp +2458 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_different_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_equal_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/among.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing.mzn +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_capa.mzn +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_load.mzn +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/circuit.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/count.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/cumulative.mzn +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/diffn.mzn +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/disjoint.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/distribute.mzn +46 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_int.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/gecode.mzn +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality.mzn +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_closed.mzn +39 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/int_set_channel.mzn +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/inverse.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_less_int.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_lesseq_int.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/link_set_to_booleans.mzn +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/maximum_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_bool.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_int.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/minimum_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/nvalue.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/partition_set.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/precedence.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/range.mzn +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/redefinitions.mzn +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/regular.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/roots.mzn +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sort.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sum_pred.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/option.hh +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.hh +265 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.cpp +3571 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.hh +164 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.yxx +1604 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/plugin.hh +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.cpp +1812 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.hh +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/symboltable.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/varspec.hh +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist.hh +298 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.cpp +288 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hh +110 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.cpp +673 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.hh +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.cpp +120 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.hpp +207 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hh +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.cpp +341 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.hh +129 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hh +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hpp +210 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hh +215 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hpp +271 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.cpp +138 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.hh +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hpp +126 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.cpp +90 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.hh +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.cpp +809 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.hh +294 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.cpp +369 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hh +221 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hpp +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/mygist.cpp +80 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/standalone_example.pro +18 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.cpp +90 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.hh +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.cpp +175 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.hh +75 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.cpp +1430 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.hh +369 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.cpp +473 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hh +237 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hpp +220 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/zoomToFitIcon.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh +3477 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.cpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.hh +666 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/abs.hpp +236 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/divmod.hpp +350 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/max.hpp +398 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/mult.hpp +750 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqr.hpp +377 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqrt.hpp +217 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array-traits.hpp +147 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.cpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.cpp +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.hh +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.cpp +388 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.hpp +219 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.cpp +755 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.hh +581 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/base.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/clause.hpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eq.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.cpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.hpp +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/lq.hpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/or.hpp +850 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.cpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.hh +607 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-bool.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-int.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.bs +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.cpp +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.bs +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.cpp +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-val.hpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-values.hpp +213 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-view.hpp +364 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.cpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.hh +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/base.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/dom.hpp +332 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.cpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.cpp +77 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.hpp +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/val.hpp +256 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.cpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.hh +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/base.hpp +270 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/dom.hpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/val.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.cpp +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.hh +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-base.hpp +80 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-eq.hpp +143 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-gq.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-lq.hpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/rel.hpp +281 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-base.hpp +131 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-eq.hpp +117 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-gq.hpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-lq.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.cpp +432 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh +745 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/basic.hpp +211 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/edge-finding.hpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/man-prop.hpp +127 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/opt-prop.hpp +171 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/overload.hpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task-view.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task.hpp +256 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/tree.hpp +272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.cpp +187 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.hh +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives/val.hpp +380 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.cpp +97 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/bnd.hpp +444 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom-ctrl.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom.hpp +123 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/graph.hpp +266 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/ter-dom.hpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/val.hpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.cpp +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.hh +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/range.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/spec.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.hh +384 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/int.hpp +443 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.cpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.hpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/view.hpp +559 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exception.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.cpp +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.hh +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.cpp +77 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.cpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.hh +508 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/base.hpp +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/basic.hpp +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.cpp +535 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.hpp +282 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/incremental.hpp +454 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/layered-graph.hpp +982 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.cpp +222 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.hpp +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.cpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd-sup.hpp +608 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd.hpp +829 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom-sup.hpp +1777 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom.hpp +315 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/post.hpp +169 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/val.hpp +299 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/view.hpp +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-1.hpp +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-2.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set.cpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/limits.hpp +94 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-bool.cpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-int.cpp +194 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear.hh +1560 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-int.hpp +743 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-post.cpp +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-scale.hpp +695 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-view.hpp +319 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-bin.hpp +439 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-dom.hpp +484 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-nary.hpp +864 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-noview.hpp +251 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-post.cpp +561 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-ter.hpp +273 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/post.hpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.cpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.hh +125 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/prop.hpp +175 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/re-prop.hpp +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.cpp +226 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.hh +318 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/base.hpp +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/box.hpp +198 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/dim.hpp +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/man.hpp +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/opt.hpp +153 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.cpp +244 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.hh +429 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-base.hpp +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-eq.hpp +174 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-gq.hpp +149 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-lq.hpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/graph.hpp +283 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-base.hpp +347 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-eq.hpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-gq.hpp +130 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-lq.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/range-event.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/sym-bit-matrix.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.cpp +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.hh +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede/single.hpp +232 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/propagator.hpp +311 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.cpp +381 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.hh +665 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/eq.hpp +676 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lex.hpp +414 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lq-le.hpp +537 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/nq.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.cpp +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.hh +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/int.hpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/set-op.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/view.hpp +499 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/violations.hpp +101 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/matching.hpp +173 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/narrowing.hpp +250 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/order.hpp +213 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/propagate.hpp +646 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/sortsup.hpp +564 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hh +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hpp +187 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task.hh +454 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/array.hpp +179 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/fwd-to-bwd.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/iter.hpp +92 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/man-to-opt.hpp +100 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/prop.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/purge.hpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/sort.hpp +234 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/tree.hpp +189 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.cpp +258 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh +839 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/detectable.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/edge-finding.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/man-prop.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/not-first-not-last.hpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/opt-prop.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/overload.hpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/subsumption.hpp +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task-view.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task.hpp +532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/tree.hpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unshare.cpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hh +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp.hpp +710 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.hpp +431 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.vis +75 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/delta.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.cpp +361 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.hpp +1029 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.vis +117 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.cpp +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.hpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.hpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/print.hpp +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph.hh +334 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/bi-link.hpp +89 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/comb-ptr-flag.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/edge.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/graph.hpp +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/iter-prune-val.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/node.hpp +171 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view.hpp +1690 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool-test.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool.hpp +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/cached.hpp +402 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/constint.hpp +324 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/int.hpp +264 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/iter.hpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/minus.hpp +300 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/neg-bool.hpp +177 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/offset.hpp +303 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/print.hpp +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/rel-test.hpp +231 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/scale.hpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/zero.hpp +305 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-add.hpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-append.hpp +222 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-array.hpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-cache.hpp +106 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-compl.hpp +220 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-diff.hpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-empty.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-inter.hpp +309 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-list.hpp +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-map.hpp +260 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minmax.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minus.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-negative.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-offset.hpp +127 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-operations.hpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-positive.hpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-rangelist.hpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-scale.hpp +238 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton-append.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton.hpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-size.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-union.hpp +361 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-values.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-array.hpp +120 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-bitset.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-inter.hpp +130 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-list.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-map.hpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-minus.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-negative.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-offset.hpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-positive.hpp +123 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-ranges.hpp +106 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-singleton.hpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-union.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-unique.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel.hh +194 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/advisor.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/allocators.hpp +476 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.hpp +298 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/array.hpp +2133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.cpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.hpp +254 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-tiebreak.hpp +615 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-val.hpp +126 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-view.hpp +455 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher.hpp +431 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.cpp +563 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.hpp +3668 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/exception.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/global-prop-info.hpp +258 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/macros.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-config.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.cpp +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.hpp +511 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/modevent.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/propagator.hpp +699 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/range-list.hpp +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.cpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.hpp +459 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/shared-array.hpp +345 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-imp.hpp +332 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-type.hpp +767 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var.hpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/view.hpp +715 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/wait.hh +244 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel.hh +1870 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/arithmetic.cpp +408 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.cpp +522 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.hpp +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/exception.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.cpp +594 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.hpp +297 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.cpp +414 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.hpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/matrix.hpp +247 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/optimize.hpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.cpp +817 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.hpp +94 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.cpp +704 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.cpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search.hh +458 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.hpp +91 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.hpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.cpp +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.hh +203 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.cpp +176 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.hh +195 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.cpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.hh +418 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/path.hh +477 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.cpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.hh +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.hpp +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/bab.hh +177 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/dfs.hh +176 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/path.hh +411 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/restart.hh +89 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/statistics.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.cpp +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/support.hh +91 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set.hh +1144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array-traits.hpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.cpp +219 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.cpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.hh +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-val.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.bs +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.cpp +370 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-val.hpp +204 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-view.hpp +306 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/cardinality.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.cpp +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.hh +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.cpp +97 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.hpp +67 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.hpp +68 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.cpp +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.hh +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.cpp +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.hpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/dom.cpp +300 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.cpp +255 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.hh +218 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/disjoint.hpp +324 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/inter.hpp +308 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/union.hpp +342 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/unionConst.hpp +293 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exception.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exec.cpp +58 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.cpp +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.hh +459 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/card.hpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-bool.hpp +282 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-int.hpp +158 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/match.hpp +199 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/minmax.hpp +645 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/weights.hpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/limits.hpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.cpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.hh +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede/single.hpp +255 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvc.cpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvv.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcc.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcv.cpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vvc.cpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-singleton.cpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-ternary.cpp +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.cpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.hh +297 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/common.hpp +619 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/inter.hpp +389 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/partition.hpp +164 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvc.cpp +58 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvv.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-vvc.cpp +57 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvc.cpp +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvv.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-vvc.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post.hpp +266 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/subofunion.hpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/superofinter.hpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/union.hpp +319 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.cpp +232 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.hh +322 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/common.hpp +125 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/eq.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/lq.hpp +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nosubset.hpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nq.hpp +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-eq.hpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-lq.hpp +182 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-subset.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/subset.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.cpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.hh +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/common.hpp +100 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.cpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.hpp +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.cpp +76 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp.hpp +634 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/delta.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.cpp +348 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.hpp +426 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/iter.hpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.cpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.hpp +531 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.vis +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/print.hpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.cpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.hpp +254 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view.hpp +1142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/cached.hpp +399 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/complement.hpp +556 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/const.hpp +723 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/print.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/set.hpp +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/singleton.hpp +402 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support.hh +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/auto-link.hpp +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset-base.hpp +379 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/block-allocator.hpp +169 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/cast.hpp +52 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/config.hpp.in +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-array.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-queue.hpp +156 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-stack.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.cpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.hpp +593 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/int-type.hpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/macros.hpp +103 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/marked-pointer.hpp +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/random.hpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/sort.hpp +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/static-stack.hpp +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread.hpp +272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/none.hpp +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.cpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.hpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.cpp +68 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.hpp +108 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/timer.hpp +103 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/install-sh +323 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/allexamples.perl +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/back.png +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/footer.html +3 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/gecode-logo-100.png +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/header.html +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/stylesheet.css +468 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixautoheader.perl +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixmanifest.perl +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixproperties.sh +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gecode-logo.ico +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genbranch.perl +310 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genchangelog.perl +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gencurrentchangelog.perl +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlcovmakefile.perl +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlicense.perl +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genrc.perl +236 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genstatistics.perl +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gentxtchangelog.perl +198 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genvarimp.perl +877 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genxcodeproj.perl +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/getrevision.perl +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/makedepend.perl +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore-root.txt +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore.txt +18 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/afc.cpp +143 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/array.cpp +277 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.cpp +278 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.hh +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/bool.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/int.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/set.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.cpp +504 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.hh +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/bool.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/int.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/set.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.cpp +655 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hh +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hpp +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/arithmetic.cpp +772 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/basic.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bin-packing.cpp +237 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bool.cpp +500 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/channel.cpp +234 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/circuit.cpp +359 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/count.cpp +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulative.cpp +560 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulatives.cpp +276 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/distinct.cpp +248 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/dom.cpp +174 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/element.cpp +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/exec.cpp +150 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/extensional.cpp +571 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/gcc.cpp +320 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/linear.cpp +394 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/member.cpp +138 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-arithmetic.cpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-bool.cpp +4344 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-count.cpp +295 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-lin.cpp +2179 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-rel.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/no-overlap.cpp +259 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/nvalues.cpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/precede.cpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/rel.cpp +568 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sequence.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sorted.cpp +165 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unary.cpp +327 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unshare.cpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/search.cpp +487 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.cpp +638 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hh +362 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/construct.cpp +225 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/convex.cpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/distinct.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/dom.cpp +346 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/element.cpp +397 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/exec.cpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/int.cpp +532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/mm-set.cpp +4532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/precede.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op-const.cpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op.cpp +504 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel.cpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/sequence.cpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.cpp +281 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hh +161 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hpp +76 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/fz.cpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.bat.in +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.in +41 -0
- data/lib/dep-selector-libgecode.rb +15 -0
- data/lib/dep-selector-libgecode/version.rb +3 -0
- metadata +878 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/* A Bison parser, made by GNU Bison 2.3. */
|
|
2
|
+
|
|
3
|
+
/* Skeleton interface for Bison's Yacc-like parsers in C
|
|
4
|
+
|
|
5
|
+
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
|
6
|
+
Free Software Foundation, Inc.
|
|
7
|
+
|
|
8
|
+
This program is free software; you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation; either version 2, or (at your option)
|
|
11
|
+
any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program; if not, write to the Free Software
|
|
20
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
21
|
+
Boston, MA 02110-1301, USA. */
|
|
22
|
+
|
|
23
|
+
/* As a special exception, you may create a larger work that contains
|
|
24
|
+
part or all of the Bison parser skeleton and distribute that work
|
|
25
|
+
under terms of your choice, so long as that work isn't itself a
|
|
26
|
+
parser generator using the skeleton or a modified version thereof
|
|
27
|
+
as a parser skeleton. Alternatively, if you modify or redistribute
|
|
28
|
+
the parser skeleton itself, you may (at your option) remove this
|
|
29
|
+
special exception, which will cause the skeleton and the resulting
|
|
30
|
+
Bison output files to be licensed under the GNU General Public
|
|
31
|
+
License without this special exception.
|
|
32
|
+
|
|
33
|
+
This special exception was added by the Free Software Foundation in
|
|
34
|
+
version 2.2 of Bison. */
|
|
35
|
+
|
|
36
|
+
/* Tokens. */
|
|
37
|
+
#ifndef YYTOKENTYPE
|
|
38
|
+
# define YYTOKENTYPE
|
|
39
|
+
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
|
40
|
+
know about them. */
|
|
41
|
+
enum yytokentype {
|
|
42
|
+
FZ_INT_LIT = 258,
|
|
43
|
+
FZ_BOOL_LIT = 259,
|
|
44
|
+
FZ_FLOAT_LIT = 260,
|
|
45
|
+
FZ_ID = 261,
|
|
46
|
+
FZ_U_ID = 262,
|
|
47
|
+
FZ_STRING_LIT = 263,
|
|
48
|
+
FZ_VAR = 264,
|
|
49
|
+
FZ_PAR = 265,
|
|
50
|
+
FZ_ANNOTATION = 266,
|
|
51
|
+
FZ_ANY = 267,
|
|
52
|
+
FZ_ARRAY = 268,
|
|
53
|
+
FZ_BOOL = 269,
|
|
54
|
+
FZ_CASE = 270,
|
|
55
|
+
FZ_COLONCOLON = 271,
|
|
56
|
+
FZ_CONSTRAINT = 272,
|
|
57
|
+
FZ_DEFAULT = 273,
|
|
58
|
+
FZ_DOTDOT = 274,
|
|
59
|
+
FZ_ELSE = 275,
|
|
60
|
+
FZ_ELSEIF = 276,
|
|
61
|
+
FZ_ENDIF = 277,
|
|
62
|
+
FZ_ENUM = 278,
|
|
63
|
+
FZ_FLOAT = 279,
|
|
64
|
+
FZ_FUNCTION = 280,
|
|
65
|
+
FZ_IF = 281,
|
|
66
|
+
FZ_INCLUDE = 282,
|
|
67
|
+
FZ_INT = 283,
|
|
68
|
+
FZ_LET = 284,
|
|
69
|
+
FZ_MAXIMIZE = 285,
|
|
70
|
+
FZ_MINIMIZE = 286,
|
|
71
|
+
FZ_OF = 287,
|
|
72
|
+
FZ_SATISFY = 288,
|
|
73
|
+
FZ_OUTPUT = 289,
|
|
74
|
+
FZ_PREDICATE = 290,
|
|
75
|
+
FZ_RECORD = 291,
|
|
76
|
+
FZ_SET = 292,
|
|
77
|
+
FZ_SHOW = 293,
|
|
78
|
+
FZ_SHOWCOND = 294,
|
|
79
|
+
FZ_SOLVE = 295,
|
|
80
|
+
FZ_STRING = 296,
|
|
81
|
+
FZ_TEST = 297,
|
|
82
|
+
FZ_THEN = 298,
|
|
83
|
+
FZ_TUPLE = 299,
|
|
84
|
+
FZ_TYPE = 300,
|
|
85
|
+
FZ_VARIANT_RECORD = 301,
|
|
86
|
+
FZ_WHERE = 302
|
|
87
|
+
};
|
|
88
|
+
#endif
|
|
89
|
+
/* Tokens. */
|
|
90
|
+
#define FZ_INT_LIT 258
|
|
91
|
+
#define FZ_BOOL_LIT 259
|
|
92
|
+
#define FZ_FLOAT_LIT 260
|
|
93
|
+
#define FZ_ID 261
|
|
94
|
+
#define FZ_U_ID 262
|
|
95
|
+
#define FZ_STRING_LIT 263
|
|
96
|
+
#define FZ_VAR 264
|
|
97
|
+
#define FZ_PAR 265
|
|
98
|
+
#define FZ_ANNOTATION 266
|
|
99
|
+
#define FZ_ANY 267
|
|
100
|
+
#define FZ_ARRAY 268
|
|
101
|
+
#define FZ_BOOL 269
|
|
102
|
+
#define FZ_CASE 270
|
|
103
|
+
#define FZ_COLONCOLON 271
|
|
104
|
+
#define FZ_CONSTRAINT 272
|
|
105
|
+
#define FZ_DEFAULT 273
|
|
106
|
+
#define FZ_DOTDOT 274
|
|
107
|
+
#define FZ_ELSE 275
|
|
108
|
+
#define FZ_ELSEIF 276
|
|
109
|
+
#define FZ_ENDIF 277
|
|
110
|
+
#define FZ_ENUM 278
|
|
111
|
+
#define FZ_FLOAT 279
|
|
112
|
+
#define FZ_FUNCTION 280
|
|
113
|
+
#define FZ_IF 281
|
|
114
|
+
#define FZ_INCLUDE 282
|
|
115
|
+
#define FZ_INT 283
|
|
116
|
+
#define FZ_LET 284
|
|
117
|
+
#define FZ_MAXIMIZE 285
|
|
118
|
+
#define FZ_MINIMIZE 286
|
|
119
|
+
#define FZ_OF 287
|
|
120
|
+
#define FZ_SATISFY 288
|
|
121
|
+
#define FZ_OUTPUT 289
|
|
122
|
+
#define FZ_PREDICATE 290
|
|
123
|
+
#define FZ_RECORD 291
|
|
124
|
+
#define FZ_SET 292
|
|
125
|
+
#define FZ_SHOW 293
|
|
126
|
+
#define FZ_SHOWCOND 294
|
|
127
|
+
#define FZ_SOLVE 295
|
|
128
|
+
#define FZ_STRING 296
|
|
129
|
+
#define FZ_TEST 297
|
|
130
|
+
#define FZ_THEN 298
|
|
131
|
+
#define FZ_TUPLE 299
|
|
132
|
+
#define FZ_TYPE 300
|
|
133
|
+
#define FZ_VARIANT_RECORD 301
|
|
134
|
+
#define FZ_WHERE 302
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
140
|
+
typedef union YYSTYPE
|
|
141
|
+
#line 347 "gecode/flatzinc/parser.yxx"
|
|
142
|
+
{ int iValue; char* sValue; bool bValue; double dValue;
|
|
143
|
+
std::vector<int>* setValue;
|
|
144
|
+
Gecode::FlatZinc::AST::SetLit* setLit;
|
|
145
|
+
std::vector<double>* floatSetValue;
|
|
146
|
+
std::vector<Gecode::FlatZinc::AST::SetLit>* setValueList;
|
|
147
|
+
Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::SetLit* > oSet;
|
|
148
|
+
Gecode::FlatZinc::VarSpec* varSpec;
|
|
149
|
+
Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::Node*> oArg;
|
|
150
|
+
std::vector<Gecode::FlatZinc::VarSpec*>* varSpecVec;
|
|
151
|
+
Gecode::FlatZinc::Option<std::vector<Gecode::FlatZinc::VarSpec*>* > oVarSpecVec;
|
|
152
|
+
Gecode::FlatZinc::AST::Node* arg;
|
|
153
|
+
Gecode::FlatZinc::AST::Array* argVec;
|
|
154
|
+
}
|
|
155
|
+
/* Line 1529 of yacc.c. */
|
|
156
|
+
#line 157 "gecode/flatzinc/parser.tab.hpp"
|
|
157
|
+
YYSTYPE;
|
|
158
|
+
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
159
|
+
# define YYSTYPE_IS_DECLARED 1
|
|
160
|
+
# define YYSTYPE_IS_TRIVIAL 1
|
|
161
|
+
#endif
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
@@ -0,0 +1,1604 @@
|
|
|
1
|
+
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
|
2
|
+
/*
|
|
3
|
+
* Main authors:
|
|
4
|
+
* Guido Tack <tack@gecode.org>
|
|
5
|
+
*
|
|
6
|
+
* Copyright:
|
|
7
|
+
* Guido Tack, 2007
|
|
8
|
+
*
|
|
9
|
+
* Last modified:
|
|
10
|
+
* $Date: 2006-12-11 03:27:31 +1100 (Mon, 11 Dec 2006) $ by $Author: schulte $
|
|
11
|
+
* $Revision: 4024 $
|
|
12
|
+
*
|
|
13
|
+
* This file is part of Gecode, the generic constraint
|
|
14
|
+
* development environment:
|
|
15
|
+
* http://www.gecode.org
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
18
|
+
* a copy of this software and associated documentation files (the
|
|
19
|
+
* "Software"), to deal in the Software without restriction, including
|
|
20
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
21
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
22
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
23
|
+
* the following conditions:
|
|
24
|
+
*
|
|
25
|
+
* The above copyright notice and this permission notice shall be
|
|
26
|
+
* included in all copies or substantial portions of the Software.
|
|
27
|
+
*
|
|
28
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
29
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
30
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
31
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
32
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
33
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
34
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
%pure-parser
|
|
39
|
+
%parse-param {void *parm}
|
|
40
|
+
%{
|
|
41
|
+
#define YYPARSE_PARAM parm
|
|
42
|
+
#define YYLEX_PARAM static_cast<ParserState*>(parm)->yyscanner
|
|
43
|
+
#include <gecode/flatzinc.hh>
|
|
44
|
+
#include <gecode/flatzinc/parser.hh>
|
|
45
|
+
#include <iostream>
|
|
46
|
+
#include <fstream>
|
|
47
|
+
|
|
48
|
+
#ifdef HAVE_MMAP
|
|
49
|
+
#include <stdio.h>
|
|
50
|
+
#include <stdlib.h>
|
|
51
|
+
#include <fcntl.h>
|
|
52
|
+
#include <unistd.h>
|
|
53
|
+
#include <sys/types.h>
|
|
54
|
+
#include <sys/mman.h>
|
|
55
|
+
#include <sys/stat.h>
|
|
56
|
+
#endif
|
|
57
|
+
|
|
58
|
+
using namespace std;
|
|
59
|
+
|
|
60
|
+
int yyparse(void*);
|
|
61
|
+
int yylex(YYSTYPE*, void* scanner);
|
|
62
|
+
int yylex_init (void** scanner);
|
|
63
|
+
int yylex_destroy (void* scanner);
|
|
64
|
+
int yyget_lineno (void* scanner);
|
|
65
|
+
void yyset_extra (void* user_defined ,void* yyscanner );
|
|
66
|
+
|
|
67
|
+
extern int yydebug;
|
|
68
|
+
|
|
69
|
+
using namespace Gecode;
|
|
70
|
+
using namespace Gecode::FlatZinc;
|
|
71
|
+
|
|
72
|
+
void yyerror(void* parm, const char *str) {
|
|
73
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
74
|
+
pp->err << "Error: " << str
|
|
75
|
+
<< " in line no. " << yyget_lineno(pp->yyscanner)
|
|
76
|
+
<< std::endl;
|
|
77
|
+
pp->hadError = true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
void yyassert(ParserState* pp, bool cond, const char* str)
|
|
81
|
+
{
|
|
82
|
+
if (!cond) {
|
|
83
|
+
pp->err << "Error: " << str
|
|
84
|
+
<< " in line no. " << yyget_lineno(pp->yyscanner)
|
|
85
|
+
<< std::endl;
|
|
86
|
+
pp->hadError = true;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*
|
|
91
|
+
* The symbol tables
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
AST::Node* getArrayElement(ParserState* pp, string id, int offset) {
|
|
96
|
+
if (offset > 0) {
|
|
97
|
+
SymbolEntry e;
|
|
98
|
+
if (pp->symbols.get(id,e)) {
|
|
99
|
+
switch (e.t) {
|
|
100
|
+
case ST_INTVARARRAY:
|
|
101
|
+
if (offset > pp->arrays[e.i])
|
|
102
|
+
goto error;
|
|
103
|
+
return new AST::IntVar(pp->arrays[e.i+offset]);
|
|
104
|
+
case ST_BOOLVARARRAY:
|
|
105
|
+
if (offset > pp->arrays[e.i])
|
|
106
|
+
goto error;
|
|
107
|
+
return new AST::BoolVar(pp->arrays[e.i+offset]);
|
|
108
|
+
case ST_SETVARARRAY:
|
|
109
|
+
if (offset > pp->arrays[e.i])
|
|
110
|
+
goto error;
|
|
111
|
+
return new AST::SetVar(pp->arrays[e.i+offset]);
|
|
112
|
+
case ST_INTVALARRAY:
|
|
113
|
+
if (offset > pp->arrays[e.i])
|
|
114
|
+
goto error;
|
|
115
|
+
return new AST::IntLit(pp->arrays[e.i+offset]);
|
|
116
|
+
case ST_SETVALARRAY:
|
|
117
|
+
if (offset > pp->arrays[e.i])
|
|
118
|
+
goto error;
|
|
119
|
+
return new AST::SetLit(pp->setvals[pp->arrays[e.i+1]+offset-1]);
|
|
120
|
+
default:
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
error:
|
|
126
|
+
pp->err << "Error: array access to " << id << " invalid"
|
|
127
|
+
<< " in line no. "
|
|
128
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
129
|
+
pp->hadError = true;
|
|
130
|
+
return new AST::IntVar(0); // keep things consistent
|
|
131
|
+
}
|
|
132
|
+
AST::Node* getVarRefArg(ParserState* pp, string id, bool annotation = false) {
|
|
133
|
+
SymbolEntry e;
|
|
134
|
+
if (pp->symbols.get(id, e)) {
|
|
135
|
+
switch (e.t) {
|
|
136
|
+
case ST_INTVAR: return new AST::IntVar(e.i);
|
|
137
|
+
case ST_BOOLVAR: return new AST::BoolVar(e.i);
|
|
138
|
+
case ST_SETVAR: return new AST::SetVar(e.i);
|
|
139
|
+
default: break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (annotation)
|
|
144
|
+
return new AST::Atom(id);
|
|
145
|
+
pp->err << "Error: undefined variable " << id
|
|
146
|
+
<< " in line no. "
|
|
147
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
148
|
+
pp->hadError = true;
|
|
149
|
+
return new AST::IntVar(0); // keep things consistent
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
void addDomainConstraint(ParserState* pp, std::string id, AST::Node* var,
|
|
153
|
+
Option<AST::SetLit* >& dom) {
|
|
154
|
+
if (!dom())
|
|
155
|
+
return;
|
|
156
|
+
AST::Array* args = new AST::Array(2);
|
|
157
|
+
args->a[0] = var;
|
|
158
|
+
args->a[1] = dom.some();
|
|
159
|
+
pp->domainConstraints.push_back(new ConExpr(id, args));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/*
|
|
163
|
+
* Initialize the root gecode space
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
void initfg(ParserState* pp) {
|
|
168
|
+
if (!pp->hadError)
|
|
169
|
+
pp->fg->init(pp->intvars.size(),
|
|
170
|
+
pp->boolvars.size(),
|
|
171
|
+
pp->setvars.size());
|
|
172
|
+
|
|
173
|
+
for (unsigned int i=0; i<pp->intvars.size(); i++) {
|
|
174
|
+
if (!pp->hadError) {
|
|
175
|
+
try {
|
|
176
|
+
pp->fg->newIntVar(static_cast<IntVarSpec*>(pp->intvars[i].second));
|
|
177
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
178
|
+
yyerror(pp, e.toString().c_str());
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
if (pp->intvars[i].first[0] != '[') {
|
|
182
|
+
delete pp->intvars[i].second;
|
|
183
|
+
pp->intvars[i].second = NULL;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
for (unsigned int i=0; i<pp->boolvars.size(); i++) {
|
|
187
|
+
if (!pp->hadError) {
|
|
188
|
+
try {
|
|
189
|
+
pp->fg->newBoolVar(
|
|
190
|
+
static_cast<BoolVarSpec*>(pp->boolvars[i].second));
|
|
191
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
192
|
+
yyerror(pp, e.toString().c_str());
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (pp->boolvars[i].first[0] != '[') {
|
|
196
|
+
delete pp->boolvars[i].second;
|
|
197
|
+
pp->boolvars[i].second = NULL;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
for (unsigned int i=0; i<pp->setvars.size(); i++) {
|
|
201
|
+
if (!pp->hadError) {
|
|
202
|
+
try {
|
|
203
|
+
pp->fg->newSetVar(static_cast<SetVarSpec*>(pp->setvars[i].second));
|
|
204
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
205
|
+
yyerror(pp, e.toString().c_str());
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (pp->setvars[i].first[0] != '[') {
|
|
209
|
+
delete pp->setvars[i].second;
|
|
210
|
+
pp->setvars[i].second = NULL;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
for (unsigned int i=pp->domainConstraints.size(); i--;) {
|
|
214
|
+
if (!pp->hadError) {
|
|
215
|
+
try {
|
|
216
|
+
assert(pp->domainConstraints[i]->args->a.size() == 2);
|
|
217
|
+
pp->fg->postConstraint(*pp->domainConstraints[i], NULL);
|
|
218
|
+
delete pp->domainConstraints[i];
|
|
219
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
220
|
+
yyerror(pp, e.toString().c_str());
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
void fillPrinter(ParserState& pp, Gecode::FlatZinc::Printer& p) {
|
|
227
|
+
p.init(pp.getOutput());
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
AST::Node* arrayOutput(AST::Call* ann) {
|
|
231
|
+
AST::Array* a = NULL;
|
|
232
|
+
|
|
233
|
+
if (ann->args->isArray()) {
|
|
234
|
+
a = ann->args->getArray();
|
|
235
|
+
} else {
|
|
236
|
+
a = new AST::Array(ann->args);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
std::ostringstream oss;
|
|
240
|
+
|
|
241
|
+
oss << "array" << a->a.size() << "d(";
|
|
242
|
+
for (unsigned int i=0; i<a->a.size(); i++) {
|
|
243
|
+
AST::SetLit* s = a->a[i]->getSet();
|
|
244
|
+
if (s->empty())
|
|
245
|
+
oss << "{}, ";
|
|
246
|
+
else if (s->interval)
|
|
247
|
+
oss << s->min << ".." << s->max << ", ";
|
|
248
|
+
else {
|
|
249
|
+
oss << "{";
|
|
250
|
+
for (unsigned int j=0; j<s->s.size(); j++) {
|
|
251
|
+
oss << s->s[j];
|
|
252
|
+
if (j<s->s.size()-1)
|
|
253
|
+
oss << ",";
|
|
254
|
+
}
|
|
255
|
+
oss << "}, ";
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (!ann->args->isArray()) {
|
|
260
|
+
a->a[0] = NULL;
|
|
261
|
+
delete a;
|
|
262
|
+
}
|
|
263
|
+
return new AST::String(oss.str());
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* The main program
|
|
268
|
+
*
|
|
269
|
+
*/
|
|
270
|
+
|
|
271
|
+
namespace Gecode { namespace FlatZinc {
|
|
272
|
+
|
|
273
|
+
FlatZincSpace* parse(const std::string& filename, Printer& p, std::ostream& err,
|
|
274
|
+
FlatZincSpace* fzs) {
|
|
275
|
+
#ifdef HAVE_MMAP
|
|
276
|
+
int fd;
|
|
277
|
+
char* data;
|
|
278
|
+
struct stat sbuf;
|
|
279
|
+
fd = open(filename.c_str(), O_RDONLY);
|
|
280
|
+
if (fd == -1) {
|
|
281
|
+
err << "Cannot open file " << filename << endl;
|
|
282
|
+
return NULL;
|
|
283
|
+
}
|
|
284
|
+
if (stat(filename.c_str(), &sbuf) == -1) {
|
|
285
|
+
err << "Cannot stat file " << filename << endl;
|
|
286
|
+
return NULL;
|
|
287
|
+
}
|
|
288
|
+
data = (char*)mmap((caddr_t)0, sbuf.st_size, PROT_READ, MAP_SHARED, fd,0);
|
|
289
|
+
if (data == (caddr_t)(-1)) {
|
|
290
|
+
err << "Cannot mmap file " << filename << endl;
|
|
291
|
+
return NULL;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (fzs == NULL) {
|
|
295
|
+
fzs = new FlatZincSpace();
|
|
296
|
+
}
|
|
297
|
+
ParserState pp(data, sbuf.st_size, err, fzs);
|
|
298
|
+
#else
|
|
299
|
+
std::ifstream file;
|
|
300
|
+
file.open(filename.c_str());
|
|
301
|
+
if (!file.is_open()) {
|
|
302
|
+
err << "Cannot open file " << filename << endl;
|
|
303
|
+
return NULL;
|
|
304
|
+
}
|
|
305
|
+
std::string s = string(istreambuf_iterator<char>(file),
|
|
306
|
+
istreambuf_iterator<char>());
|
|
307
|
+
if (fzs == NULL) {
|
|
308
|
+
fzs = new FlatZincSpace();
|
|
309
|
+
}
|
|
310
|
+
ParserState pp(s, err, fzs);
|
|
311
|
+
#endif
|
|
312
|
+
yylex_init(&pp.yyscanner);
|
|
313
|
+
yyset_extra(&pp, pp.yyscanner);
|
|
314
|
+
// yydebug = 1;
|
|
315
|
+
yyparse(&pp);
|
|
316
|
+
fillPrinter(pp, p);
|
|
317
|
+
|
|
318
|
+
if (pp.yyscanner)
|
|
319
|
+
yylex_destroy(pp.yyscanner);
|
|
320
|
+
return pp.hadError ? NULL : pp.fg;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
FlatZincSpace* parse(std::istream& is, Printer& p, std::ostream& err,
|
|
324
|
+
FlatZincSpace* fzs) {
|
|
325
|
+
std::string s = string(istreambuf_iterator<char>(is),
|
|
326
|
+
istreambuf_iterator<char>());
|
|
327
|
+
|
|
328
|
+
if (fzs == NULL) {
|
|
329
|
+
fzs = new FlatZincSpace();
|
|
330
|
+
}
|
|
331
|
+
ParserState pp(s, err, fzs);
|
|
332
|
+
yylex_init(&pp.yyscanner);
|
|
333
|
+
yyset_extra(&pp, pp.yyscanner);
|
|
334
|
+
// yydebug = 1;
|
|
335
|
+
yyparse(&pp);
|
|
336
|
+
fillPrinter(pp, p);
|
|
337
|
+
|
|
338
|
+
if (pp.yyscanner)
|
|
339
|
+
yylex_destroy(pp.yyscanner);
|
|
340
|
+
return pp.hadError ? NULL : pp.fg;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
}}
|
|
344
|
+
|
|
345
|
+
%}
|
|
346
|
+
|
|
347
|
+
%union { int iValue; char* sValue; bool bValue; double dValue;
|
|
348
|
+
std::vector<int>* setValue;
|
|
349
|
+
Gecode::FlatZinc::AST::SetLit* setLit;
|
|
350
|
+
std::vector<double>* floatSetValue;
|
|
351
|
+
std::vector<Gecode::FlatZinc::AST::SetLit>* setValueList;
|
|
352
|
+
Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::SetLit* > oSet;
|
|
353
|
+
Gecode::FlatZinc::VarSpec* varSpec;
|
|
354
|
+
Gecode::FlatZinc::Option<Gecode::FlatZinc::AST::Node*> oArg;
|
|
355
|
+
std::vector<Gecode::FlatZinc::VarSpec*>* varSpecVec;
|
|
356
|
+
Gecode::FlatZinc::Option<std::vector<Gecode::FlatZinc::VarSpec*>* > oVarSpecVec;
|
|
357
|
+
Gecode::FlatZinc::AST::Node* arg;
|
|
358
|
+
Gecode::FlatZinc::AST::Array* argVec;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
%error-verbose
|
|
362
|
+
|
|
363
|
+
%token <iValue> FZ_INT_LIT FZ_BOOL_LIT
|
|
364
|
+
%token <dValue> FZ_FLOAT_LIT
|
|
365
|
+
%token <sValue> FZ_ID FZ_U_ID FZ_STRING_LIT
|
|
366
|
+
|
|
367
|
+
%token <bValue> FZ_VAR FZ_PAR
|
|
368
|
+
|
|
369
|
+
%token FZ_ANNOTATION
|
|
370
|
+
%token FZ_ANY
|
|
371
|
+
%token FZ_ARRAY
|
|
372
|
+
%token FZ_BOOL
|
|
373
|
+
%token FZ_CASE
|
|
374
|
+
%token FZ_COLONCOLON
|
|
375
|
+
%token FZ_CONSTRAINT
|
|
376
|
+
%token FZ_DEFAULT
|
|
377
|
+
%token FZ_DOTDOT
|
|
378
|
+
%token FZ_ELSE
|
|
379
|
+
%token FZ_ELSEIF
|
|
380
|
+
%token FZ_ENDIF
|
|
381
|
+
%token FZ_ENUM
|
|
382
|
+
%token FZ_FLOAT
|
|
383
|
+
%token FZ_FUNCTION
|
|
384
|
+
%token FZ_IF
|
|
385
|
+
%token FZ_INCLUDE
|
|
386
|
+
%token FZ_INT
|
|
387
|
+
%token FZ_LET
|
|
388
|
+
%token <bValue> FZ_MAXIMIZE
|
|
389
|
+
%token <bValue> FZ_MINIMIZE
|
|
390
|
+
%token FZ_OF
|
|
391
|
+
%token FZ_SATISFY
|
|
392
|
+
%token FZ_OUTPUT
|
|
393
|
+
%token FZ_PREDICATE
|
|
394
|
+
%token FZ_RECORD
|
|
395
|
+
%token FZ_SET
|
|
396
|
+
%token FZ_SHOW
|
|
397
|
+
%token FZ_SHOWCOND
|
|
398
|
+
%token FZ_SOLVE
|
|
399
|
+
%token FZ_STRING
|
|
400
|
+
%token FZ_TEST
|
|
401
|
+
%token FZ_THEN
|
|
402
|
+
%token FZ_TUPLE
|
|
403
|
+
%token FZ_TYPE
|
|
404
|
+
%token FZ_VARIANT_RECORD
|
|
405
|
+
%token FZ_WHERE
|
|
406
|
+
|
|
407
|
+
%type <sValue> var_par_id
|
|
408
|
+
%type <setLit> set_literal
|
|
409
|
+
|
|
410
|
+
%type <varSpec> int_init bool_init set_init float_init
|
|
411
|
+
%type <oSet> int_ti_expr_tail bool_ti_expr_tail
|
|
412
|
+
|
|
413
|
+
%type <oVarSpecVec> vardecl_int_var_array_init
|
|
414
|
+
%type <oVarSpecVec> vardecl_bool_var_array_init
|
|
415
|
+
%type <oVarSpecVec> vardecl_float_var_array_init
|
|
416
|
+
%type <oVarSpecVec> vardecl_set_var_array_init
|
|
417
|
+
%type <varSpecVec> int_var_array_literal
|
|
418
|
+
%type <varSpecVec> bool_var_array_literal
|
|
419
|
+
%type <varSpecVec> float_var_array_literal
|
|
420
|
+
%type <varSpecVec> set_var_array_literal
|
|
421
|
+
%type <varSpecVec> int_init_list int_init_list_head
|
|
422
|
+
%type <varSpecVec> bool_init_list bool_init_list_head
|
|
423
|
+
%type <varSpecVec> float_init_list float_init_list_head
|
|
424
|
+
%type <varSpecVec> set_init_list set_init_list_head
|
|
425
|
+
|
|
426
|
+
%type <setValue> int_list int_list_head
|
|
427
|
+
%type <setValue> bool_list bool_list_head
|
|
428
|
+
%type <setValueList> set_literal_list set_literal_list_head
|
|
429
|
+
%type <floatSetValue> float_list float_list_head
|
|
430
|
+
|
|
431
|
+
%type <arg> flat_expr non_array_expr annotation_expr ann_non_array_expr
|
|
432
|
+
%type <oArg> non_array_expr_opt
|
|
433
|
+
%type <argVec> flat_expr_list non_array_expr_list non_array_expr_list_head
|
|
434
|
+
|
|
435
|
+
%type <iValue> solve_expr
|
|
436
|
+
%type <bValue> minmax
|
|
437
|
+
|
|
438
|
+
%type <argVec> annotations annotations_head
|
|
439
|
+
%type <arg> annotation annotation_list
|
|
440
|
+
|
|
441
|
+
%%
|
|
442
|
+
|
|
443
|
+
/********************************/
|
|
444
|
+
/* main goal and item lists */
|
|
445
|
+
/********************************/
|
|
446
|
+
|
|
447
|
+
model : preddecl_items vardecl_items constraint_items solve_item ';'
|
|
448
|
+
|
|
449
|
+
preddecl_items:
|
|
450
|
+
/* empty */
|
|
451
|
+
| preddecl_items_head
|
|
452
|
+
|
|
453
|
+
preddecl_items_head:
|
|
454
|
+
preddecl_item ';'
|
|
455
|
+
| preddecl_items_head preddecl_item ';'
|
|
456
|
+
|
|
457
|
+
vardecl_items:
|
|
458
|
+
/* emtpy */
|
|
459
|
+
{ initfg(static_cast<ParserState*>(parm)); }
|
|
460
|
+
| vardecl_items_head
|
|
461
|
+
{ initfg(static_cast<ParserState*>(parm)); }
|
|
462
|
+
|
|
463
|
+
vardecl_items_head:
|
|
464
|
+
vardecl_item ';'
|
|
465
|
+
| vardecl_items_head vardecl_item ';'
|
|
466
|
+
|
|
467
|
+
constraint_items:
|
|
468
|
+
/* emtpy */
|
|
469
|
+
| constraint_items_head
|
|
470
|
+
|
|
471
|
+
constraint_items_head:
|
|
472
|
+
constraint_item ';'
|
|
473
|
+
| constraint_items_head constraint_item ';'
|
|
474
|
+
|
|
475
|
+
/********************************/
|
|
476
|
+
/* predicate declarations */
|
|
477
|
+
/********************************/
|
|
478
|
+
|
|
479
|
+
preddecl_item:
|
|
480
|
+
FZ_PREDICATE FZ_ID '(' pred_arg_list ')'
|
|
481
|
+
|
|
482
|
+
pred_arg_list:
|
|
483
|
+
/* empty */
|
|
484
|
+
| pred_arg_list_head list_tail
|
|
485
|
+
|
|
486
|
+
pred_arg_list_head:
|
|
487
|
+
pred_arg
|
|
488
|
+
| pred_arg_list_head ',' pred_arg
|
|
489
|
+
|
|
490
|
+
pred_arg:
|
|
491
|
+
pred_arg_type ':' FZ_ID
|
|
492
|
+
|
|
493
|
+
pred_arg_type:
|
|
494
|
+
FZ_ARRAY '[' pred_array_init ']' FZ_OF pred_arg_simple_type
|
|
495
|
+
| FZ_ARRAY '[' pred_array_init ']' FZ_OF FZ_VAR pred_arg_simple_type
|
|
496
|
+
| FZ_VAR pred_arg_simple_type
|
|
497
|
+
| pred_arg_simple_type
|
|
498
|
+
|
|
499
|
+
pred_arg_simple_type:
|
|
500
|
+
int_ti_expr_tail
|
|
501
|
+
| FZ_SET FZ_OF int_ti_expr_tail
|
|
502
|
+
| FZ_BOOL
|
|
503
|
+
| FZ_FLOAT
|
|
504
|
+
|
|
505
|
+
pred_array_init:
|
|
506
|
+
pred_array_init_arg
|
|
507
|
+
| pred_array_init ',' pred_array_init_arg
|
|
508
|
+
|
|
509
|
+
pred_array_init_arg:
|
|
510
|
+
FZ_INT
|
|
511
|
+
| FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT
|
|
512
|
+
|
|
513
|
+
/********************************/
|
|
514
|
+
/* variable declarations */
|
|
515
|
+
/********************************/
|
|
516
|
+
|
|
517
|
+
var_par_id : FZ_ID | FZ_U_ID
|
|
518
|
+
|
|
519
|
+
vardecl_item:
|
|
520
|
+
FZ_VAR int_ti_expr_tail ':' var_par_id annotations non_array_expr_opt
|
|
521
|
+
{
|
|
522
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
523
|
+
bool print = $5->hasAtom("output_var");
|
|
524
|
+
bool introduced = $5->hasAtom("var_is_introduced");
|
|
525
|
+
yyassert(pp,
|
|
526
|
+
pp->symbols.put($4, se_iv(pp->intvars.size())),
|
|
527
|
+
"Duplicate symbol");
|
|
528
|
+
if (print) {
|
|
529
|
+
pp->output(std::string($4), new AST::IntVar(pp->intvars.size()));
|
|
530
|
+
}
|
|
531
|
+
if ($6()) {
|
|
532
|
+
AST::Node* arg = $6.some();
|
|
533
|
+
if (arg->isInt()) {
|
|
534
|
+
pp->intvars.push_back(varspec($4,
|
|
535
|
+
new IntVarSpec(arg->getInt(),introduced)));
|
|
536
|
+
} else if (arg->isIntVar()) {
|
|
537
|
+
pp->intvars.push_back(varspec($4,
|
|
538
|
+
new IntVarSpec(Alias(arg->getIntVar()),introduced)));
|
|
539
|
+
} else {
|
|
540
|
+
yyassert(pp, false, "Invalid var int initializer");
|
|
541
|
+
}
|
|
542
|
+
if (!pp->hadError)
|
|
543
|
+
addDomainConstraint(pp, "int_in",
|
|
544
|
+
new AST::IntVar(pp->intvars.size()-1), $2);
|
|
545
|
+
delete arg;
|
|
546
|
+
} else {
|
|
547
|
+
pp->intvars.push_back(varspec($4, new IntVarSpec($2,introduced)));
|
|
548
|
+
}
|
|
549
|
+
delete $5; free($4);
|
|
550
|
+
}
|
|
551
|
+
| FZ_VAR bool_ti_expr_tail ':' var_par_id annotations non_array_expr_opt
|
|
552
|
+
{
|
|
553
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
554
|
+
bool print = $5->hasAtom("output_var");
|
|
555
|
+
bool introduced = $5->hasAtom("var_is_introduced");
|
|
556
|
+
yyassert(pp,
|
|
557
|
+
pp->symbols.put($4, se_bv(pp->boolvars.size())),
|
|
558
|
+
"Duplicate symbol");
|
|
559
|
+
if (print) {
|
|
560
|
+
pp->output(std::string($4), new AST::BoolVar(pp->boolvars.size()));
|
|
561
|
+
}
|
|
562
|
+
if ($6()) {
|
|
563
|
+
AST::Node* arg = $6.some();
|
|
564
|
+
if (arg->isBool()) {
|
|
565
|
+
pp->boolvars.push_back(varspec($4,
|
|
566
|
+
new BoolVarSpec(arg->getBool(),introduced)));
|
|
567
|
+
} else if (arg->isBoolVar()) {
|
|
568
|
+
pp->boolvars.push_back(varspec($4,
|
|
569
|
+
new BoolVarSpec(Alias(arg->getBoolVar()),introduced)));
|
|
570
|
+
} else {
|
|
571
|
+
yyassert(pp, false, "Invalid var bool initializer");
|
|
572
|
+
}
|
|
573
|
+
if (!pp->hadError)
|
|
574
|
+
addDomainConstraint(pp, "int_in",
|
|
575
|
+
new AST::BoolVar(pp->boolvars.size()-1), $2);
|
|
576
|
+
delete arg;
|
|
577
|
+
} else {
|
|
578
|
+
pp->boolvars.push_back(varspec($4, new BoolVarSpec($2,introduced)));
|
|
579
|
+
}
|
|
580
|
+
delete $5; free($4);
|
|
581
|
+
}
|
|
582
|
+
| FZ_VAR float_ti_expr_tail ':' var_par_id annotations non_array_expr_opt
|
|
583
|
+
{ ParserState* pp = static_cast<ParserState*>(parm);
|
|
584
|
+
yyassert(pp, false, "Floats not supported");
|
|
585
|
+
delete $5; free($4);
|
|
586
|
+
}
|
|
587
|
+
| FZ_VAR FZ_SET FZ_OF int_ti_expr_tail ':' var_par_id annotations non_array_expr_opt
|
|
588
|
+
{
|
|
589
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
590
|
+
bool print = $7->hasAtom("output_var");
|
|
591
|
+
bool introduced = $7->hasAtom("var_is_introduced");
|
|
592
|
+
yyassert(pp,
|
|
593
|
+
pp->symbols.put($6, se_sv(pp->setvars.size())),
|
|
594
|
+
"Duplicate symbol");
|
|
595
|
+
if (print) {
|
|
596
|
+
pp->output(std::string($6), new AST::SetVar(pp->setvars.size()));
|
|
597
|
+
}
|
|
598
|
+
if ($8()) {
|
|
599
|
+
AST::Node* arg = $8.some();
|
|
600
|
+
if (arg->isSet()) {
|
|
601
|
+
pp->setvars.push_back(varspec($6,
|
|
602
|
+
new SetVarSpec(arg->getSet(),introduced)));
|
|
603
|
+
} else if (arg->isSetVar()) {
|
|
604
|
+
pp->setvars.push_back(varspec($6,
|
|
605
|
+
new SetVarSpec(Alias(arg->getSetVar()),introduced)));
|
|
606
|
+
delete arg;
|
|
607
|
+
} else {
|
|
608
|
+
yyassert(pp, false, "Invalid var set initializer");
|
|
609
|
+
delete arg;
|
|
610
|
+
}
|
|
611
|
+
if (!pp->hadError)
|
|
612
|
+
addDomainConstraint(pp, "set_subset",
|
|
613
|
+
new AST::SetVar(pp->setvars.size()-1), $4);
|
|
614
|
+
} else {
|
|
615
|
+
pp->setvars.push_back(varspec($6, new SetVarSpec($4,introduced)));
|
|
616
|
+
}
|
|
617
|
+
delete $7; free($6);
|
|
618
|
+
}
|
|
619
|
+
| FZ_INT ':' var_par_id annotations '=' non_array_expr
|
|
620
|
+
{
|
|
621
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
622
|
+
yyassert(pp, $6->isInt(), "Invalid int initializer");
|
|
623
|
+
yyassert(pp,
|
|
624
|
+
pp->symbols.put($3, se_i($6->getInt())),
|
|
625
|
+
"Duplicate symbol");
|
|
626
|
+
delete $4; free($3);
|
|
627
|
+
}
|
|
628
|
+
| FZ_BOOL ':' var_par_id annotations '=' non_array_expr
|
|
629
|
+
{
|
|
630
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
631
|
+
yyassert(pp, $6->isBool(), "Invalid bool initializer");
|
|
632
|
+
yyassert(pp,
|
|
633
|
+
pp->symbols.put($3, se_b($6->getBool())),
|
|
634
|
+
"Duplicate symbol");
|
|
635
|
+
delete $4; free($3);
|
|
636
|
+
}
|
|
637
|
+
| FZ_SET FZ_OF FZ_INT ':' var_par_id annotations '=' non_array_expr
|
|
638
|
+
{
|
|
639
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
640
|
+
yyassert(pp, $8->isSet(), "Invalid set initializer");
|
|
641
|
+
AST::SetLit* set = $8->getSet();
|
|
642
|
+
pp->setvals.push_back(*set);
|
|
643
|
+
yyassert(pp,
|
|
644
|
+
pp->symbols.put($5, se_s(pp->setvals.size()-1)),
|
|
645
|
+
"Duplicate symbol");
|
|
646
|
+
delete set;
|
|
647
|
+
delete $6; free($5);
|
|
648
|
+
}
|
|
649
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR int_ti_expr_tail ':'
|
|
650
|
+
var_par_id annotations vardecl_int_var_array_init
|
|
651
|
+
{
|
|
652
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
653
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
654
|
+
if (!pp->hadError) {
|
|
655
|
+
bool print = $12->hasCall("output_array");
|
|
656
|
+
vector<int> vars($5);
|
|
657
|
+
if (!pp->hadError) {
|
|
658
|
+
if ($13()) {
|
|
659
|
+
vector<VarSpec*>* vsv = $13.some();
|
|
660
|
+
yyassert(pp, vsv->size() == static_cast<unsigned int>($5),
|
|
661
|
+
"Initializer size does not match array dimension");
|
|
662
|
+
if (!pp->hadError) {
|
|
663
|
+
for (int i=0; i<$5; i++) {
|
|
664
|
+
IntVarSpec* ivsv = static_cast<IntVarSpec*>((*vsv)[i]);
|
|
665
|
+
if (ivsv->alias) {
|
|
666
|
+
vars[i] = ivsv->i;
|
|
667
|
+
} else {
|
|
668
|
+
vars[i] = pp->intvars.size();
|
|
669
|
+
pp->intvars.push_back(varspec($11, ivsv));
|
|
670
|
+
}
|
|
671
|
+
if (!pp->hadError && $9()) {
|
|
672
|
+
Option<AST::SetLit*> opt =
|
|
673
|
+
Option<AST::SetLit*>::some(new AST::SetLit(*$9.some()));
|
|
674
|
+
addDomainConstraint(pp, "int_in",
|
|
675
|
+
new AST::IntVar(vars[i]),
|
|
676
|
+
opt);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
delete vsv;
|
|
681
|
+
} else {
|
|
682
|
+
if ($5>0) {
|
|
683
|
+
IntVarSpec* ispec = new IntVarSpec($9,!print);
|
|
684
|
+
string arrayname = "["; arrayname += $11;
|
|
685
|
+
for (int i=0; i<$5-1; i++) {
|
|
686
|
+
vars[i] = pp->intvars.size();
|
|
687
|
+
pp->intvars.push_back(varspec(arrayname, ispec));
|
|
688
|
+
}
|
|
689
|
+
vars[$5-1] = pp->intvars.size();
|
|
690
|
+
pp->intvars.push_back(varspec($11, ispec));
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (print) {
|
|
695
|
+
AST::Array* a = new AST::Array();
|
|
696
|
+
a->a.push_back(arrayOutput($12->getCall("output_array")));
|
|
697
|
+
AST::Array* output = new AST::Array();
|
|
698
|
+
for (int i=0; i<$5; i++)
|
|
699
|
+
output->a.push_back(new AST::IntVar(vars[i]));
|
|
700
|
+
a->a.push_back(output);
|
|
701
|
+
a->a.push_back(new AST::String(")"));
|
|
702
|
+
pp->output(std::string($11), a);
|
|
703
|
+
}
|
|
704
|
+
int iva = pp->arrays.size();
|
|
705
|
+
pp->arrays.push_back(vars.size());
|
|
706
|
+
for (unsigned int i=0; i<vars.size(); i++)
|
|
707
|
+
pp->arrays.push_back(vars[i]);
|
|
708
|
+
yyassert(pp,
|
|
709
|
+
pp->symbols.put($11, se_iva(iva)),
|
|
710
|
+
"Duplicate symbol");
|
|
711
|
+
}
|
|
712
|
+
delete $12; free($11);
|
|
713
|
+
}
|
|
714
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR bool_ti_expr_tail ':'
|
|
715
|
+
var_par_id annotations vardecl_bool_var_array_init
|
|
716
|
+
{
|
|
717
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
718
|
+
bool print = $12->hasCall("output_array");
|
|
719
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
720
|
+
if (!pp->hadError) {
|
|
721
|
+
vector<int> vars($5);
|
|
722
|
+
if ($13()) {
|
|
723
|
+
vector<VarSpec*>* vsv = $13.some();
|
|
724
|
+
yyassert(pp, vsv->size() == static_cast<unsigned int>($5),
|
|
725
|
+
"Initializer size does not match array dimension");
|
|
726
|
+
if (!pp->hadError) {
|
|
727
|
+
for (int i=0; i<$5; i++) {
|
|
728
|
+
BoolVarSpec* bvsv = static_cast<BoolVarSpec*>((*vsv)[i]);
|
|
729
|
+
if (bvsv->alias)
|
|
730
|
+
vars[i] = bvsv->i;
|
|
731
|
+
else {
|
|
732
|
+
vars[i] = pp->boolvars.size();
|
|
733
|
+
pp->boolvars.push_back(varspec($11, (*vsv)[i]));
|
|
734
|
+
}
|
|
735
|
+
if (!pp->hadError && $9()) {
|
|
736
|
+
Option<AST::SetLit*> opt =
|
|
737
|
+
Option<AST::SetLit*>::some(new AST::SetLit(*$9.some()));
|
|
738
|
+
addDomainConstraint(pp, "int_in",
|
|
739
|
+
new AST::BoolVar(vars[i]),
|
|
740
|
+
opt);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
delete vsv;
|
|
745
|
+
} else {
|
|
746
|
+
for (int i=0; i<$5; i++) {
|
|
747
|
+
vars[i] = pp->boolvars.size();
|
|
748
|
+
pp->boolvars.push_back(varspec($11,
|
|
749
|
+
new BoolVarSpec($9,!print)));
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
if (print) {
|
|
753
|
+
AST::Array* a = new AST::Array();
|
|
754
|
+
a->a.push_back(arrayOutput($12->getCall("output_array")));
|
|
755
|
+
AST::Array* output = new AST::Array();
|
|
756
|
+
for (int i=0; i<$5; i++)
|
|
757
|
+
output->a.push_back(new AST::BoolVar(vars[i]));
|
|
758
|
+
a->a.push_back(output);
|
|
759
|
+
a->a.push_back(new AST::String(")"));
|
|
760
|
+
pp->output(std::string($11), a);
|
|
761
|
+
}
|
|
762
|
+
int bva = pp->arrays.size();
|
|
763
|
+
pp->arrays.push_back(vars.size());
|
|
764
|
+
for (unsigned int i=0; i<vars.size(); i++)
|
|
765
|
+
pp->arrays.push_back(vars[i]);
|
|
766
|
+
yyassert(pp,
|
|
767
|
+
pp->symbols.put($11, se_bva(bva)),
|
|
768
|
+
"Duplicate symbol");
|
|
769
|
+
}
|
|
770
|
+
delete $12; free($11);
|
|
771
|
+
}
|
|
772
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR float_ti_expr_tail ':'
|
|
773
|
+
var_par_id annotations vardecl_float_var_array_init
|
|
774
|
+
{
|
|
775
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
776
|
+
yyassert(pp, false, "Floats not supported");
|
|
777
|
+
delete $12; free($11);
|
|
778
|
+
}
|
|
779
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_VAR FZ_SET FZ_OF int_ti_expr_tail ':'
|
|
780
|
+
var_par_id annotations vardecl_set_var_array_init
|
|
781
|
+
{
|
|
782
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
783
|
+
bool print = $14->hasCall("output_array");
|
|
784
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
785
|
+
if (!pp->hadError) {
|
|
786
|
+
vector<int> vars($5);
|
|
787
|
+
if ($15()) {
|
|
788
|
+
vector<VarSpec*>* vsv = $15.some();
|
|
789
|
+
yyassert(pp, vsv->size() == static_cast<unsigned int>($5),
|
|
790
|
+
"Initializer size does not match array dimension");
|
|
791
|
+
if (!pp->hadError) {
|
|
792
|
+
for (int i=0; i<$5; i++) {
|
|
793
|
+
SetVarSpec* svsv = static_cast<SetVarSpec*>((*vsv)[i]);
|
|
794
|
+
if (svsv->alias)
|
|
795
|
+
vars[i] = svsv->i;
|
|
796
|
+
else {
|
|
797
|
+
vars[i] = pp->setvars.size();
|
|
798
|
+
pp->setvars.push_back(varspec($13, (*vsv)[i]));
|
|
799
|
+
}
|
|
800
|
+
if (!pp->hadError && $11()) {
|
|
801
|
+
Option<AST::SetLit*> opt =
|
|
802
|
+
Option<AST::SetLit*>::some(new AST::SetLit(*$11.some()));
|
|
803
|
+
addDomainConstraint(pp, "set_subset",
|
|
804
|
+
new AST::SetVar(vars[i]),
|
|
805
|
+
opt);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
delete vsv;
|
|
810
|
+
} else {
|
|
811
|
+
if ($5>0) {
|
|
812
|
+
SetVarSpec* ispec = new SetVarSpec($11,!print);
|
|
813
|
+
string arrayname = "["; arrayname += $13;
|
|
814
|
+
for (int i=0; i<$5-1; i++) {
|
|
815
|
+
vars[i] = pp->setvars.size();
|
|
816
|
+
pp->setvars.push_back(varspec(arrayname, ispec));
|
|
817
|
+
}
|
|
818
|
+
vars[$5-1] = pp->setvars.size();
|
|
819
|
+
pp->setvars.push_back(varspec($13, ispec));
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
if (print) {
|
|
823
|
+
AST::Array* a = new AST::Array();
|
|
824
|
+
a->a.push_back(arrayOutput($14->getCall("output_array")));
|
|
825
|
+
AST::Array* output = new AST::Array();
|
|
826
|
+
for (int i=0; i<$5; i++)
|
|
827
|
+
output->a.push_back(new AST::SetVar(vars[i]));
|
|
828
|
+
a->a.push_back(output);
|
|
829
|
+
a->a.push_back(new AST::String(")"));
|
|
830
|
+
pp->output(std::string($13), a);
|
|
831
|
+
}
|
|
832
|
+
int sva = pp->arrays.size();
|
|
833
|
+
pp->arrays.push_back(vars.size());
|
|
834
|
+
for (unsigned int i=0; i<vars.size(); i++)
|
|
835
|
+
pp->arrays.push_back(vars[i]);
|
|
836
|
+
yyassert(pp,
|
|
837
|
+
pp->symbols.put($13, se_sva(sva)),
|
|
838
|
+
"Duplicate symbol");
|
|
839
|
+
}
|
|
840
|
+
delete $14; free($13);
|
|
841
|
+
}
|
|
842
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_INT ':'
|
|
843
|
+
var_par_id annotations '=' '[' int_list ']'
|
|
844
|
+
{
|
|
845
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
846
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
847
|
+
yyassert(pp, $14->size() == static_cast<unsigned int>($5),
|
|
848
|
+
"Initializer size does not match array dimension");
|
|
849
|
+
|
|
850
|
+
if (!pp->hadError) {
|
|
851
|
+
int ia = pp->arrays.size();
|
|
852
|
+
pp->arrays.push_back($14->size());
|
|
853
|
+
for (unsigned int i=0; i<$14->size(); i++)
|
|
854
|
+
pp->arrays.push_back((*$14)[i]);
|
|
855
|
+
yyassert(pp,
|
|
856
|
+
pp->symbols.put($10, se_ia(ia)),
|
|
857
|
+
"Duplicate symbol");
|
|
858
|
+
}
|
|
859
|
+
delete $14;
|
|
860
|
+
free($10);
|
|
861
|
+
delete $11;
|
|
862
|
+
}
|
|
863
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_BOOL ':'
|
|
864
|
+
var_par_id annotations '=' '[' bool_list ']'
|
|
865
|
+
{
|
|
866
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
867
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
868
|
+
yyassert(pp, $14->size() == static_cast<unsigned int>($5),
|
|
869
|
+
"Initializer size does not match array dimension");
|
|
870
|
+
if (!pp->hadError) {
|
|
871
|
+
int ia = pp->arrays.size();
|
|
872
|
+
pp->arrays.push_back($14->size());
|
|
873
|
+
for (unsigned int i=0; i<$14->size(); i++)
|
|
874
|
+
pp->arrays.push_back((*$14)[i]);
|
|
875
|
+
yyassert(pp,
|
|
876
|
+
pp->symbols.put($10, se_ba(ia)),
|
|
877
|
+
"Duplicate symbol");
|
|
878
|
+
}
|
|
879
|
+
delete $14;
|
|
880
|
+
free($10);
|
|
881
|
+
delete $11;
|
|
882
|
+
}
|
|
883
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_FLOAT ':'
|
|
884
|
+
var_par_id annotations '=' '[' float_list ']'
|
|
885
|
+
{
|
|
886
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
887
|
+
yyassert(pp, false, "Floats not supported");
|
|
888
|
+
delete $11; free($10);
|
|
889
|
+
}
|
|
890
|
+
| FZ_ARRAY '[' FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT ']' FZ_OF FZ_SET FZ_OF FZ_INT ':'
|
|
891
|
+
var_par_id annotations '=' '[' set_literal_list ']'
|
|
892
|
+
{
|
|
893
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
894
|
+
yyassert(pp, $3==1, "Arrays must start at 1");
|
|
895
|
+
yyassert(pp, $16->size() == static_cast<unsigned int>($5),
|
|
896
|
+
"Initializer size does not match array dimension");
|
|
897
|
+
if (!pp->hadError) {
|
|
898
|
+
int sa = pp->arrays.size();
|
|
899
|
+
pp->arrays.push_back($16->size());
|
|
900
|
+
pp->arrays.push_back(pp->setvals.size());
|
|
901
|
+
for (unsigned int i=0; i<$16->size(); i++)
|
|
902
|
+
pp->setvals.push_back((*$16)[i]);
|
|
903
|
+
yyassert(pp,
|
|
904
|
+
pp->symbols.put($12, se_sa(sa)),
|
|
905
|
+
"Duplicate symbol");
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
delete $16;
|
|
909
|
+
delete $13; free($12);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
int_init :
|
|
913
|
+
FZ_INT_LIT
|
|
914
|
+
{
|
|
915
|
+
$$ = new IntVarSpec($1,false);
|
|
916
|
+
}
|
|
917
|
+
| var_par_id
|
|
918
|
+
{
|
|
919
|
+
SymbolEntry e;
|
|
920
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
921
|
+
if (pp->symbols.get($1, e) && e.t == ST_INTVAR)
|
|
922
|
+
$$ = new IntVarSpec(Alias(e.i),false);
|
|
923
|
+
else {
|
|
924
|
+
pp->err << "Error: undefined identifier " << $1
|
|
925
|
+
<< " in line no. "
|
|
926
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
927
|
+
pp->hadError = true;
|
|
928
|
+
$$ = new IntVarSpec(0,false); // keep things consistent
|
|
929
|
+
}
|
|
930
|
+
free($1);
|
|
931
|
+
}
|
|
932
|
+
| var_par_id '[' FZ_INT_LIT ']'
|
|
933
|
+
{
|
|
934
|
+
vector<int> v;
|
|
935
|
+
SymbolEntry e;
|
|
936
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
937
|
+
if (pp->symbols.get($1, e) && e.t == ST_INTVARARRAY) {
|
|
938
|
+
yyassert(pp,$3 > 0 && $3 <= pp->arrays[e.i],
|
|
939
|
+
"array access out of bounds");
|
|
940
|
+
if (!pp->hadError)
|
|
941
|
+
$$ = new IntVarSpec(Alias(pp->arrays[e.i+$3]),false);
|
|
942
|
+
else
|
|
943
|
+
$$ = new IntVarSpec(0,false); // keep things consistent
|
|
944
|
+
} else {
|
|
945
|
+
pp->err << "Error: undefined array identifier " << $1
|
|
946
|
+
<< " in line no. "
|
|
947
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
948
|
+
pp->hadError = true;
|
|
949
|
+
$$ = new IntVarSpec(0,false); // keep things consistent
|
|
950
|
+
}
|
|
951
|
+
free($1);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
int_init_list :
|
|
955
|
+
/* empty */
|
|
956
|
+
{ $$ = new vector<VarSpec*>(0); }
|
|
957
|
+
| int_init_list_head list_tail
|
|
958
|
+
{ $$ = $1; }
|
|
959
|
+
|
|
960
|
+
int_init_list_head :
|
|
961
|
+
int_init
|
|
962
|
+
{ $$ = new vector<VarSpec*>(1); (*$$)[0] = $1; }
|
|
963
|
+
| int_init_list_head ',' int_init
|
|
964
|
+
{ $$ = $1; $$->push_back($3); }
|
|
965
|
+
|
|
966
|
+
list_tail : | ','
|
|
967
|
+
|
|
968
|
+
int_var_array_literal : '[' int_init_list ']'
|
|
969
|
+
{ $$ = $2; }
|
|
970
|
+
|
|
971
|
+
float_init :
|
|
972
|
+
FZ_FLOAT_LIT
|
|
973
|
+
{ $$ = new FloatVarSpec($1,false); }
|
|
974
|
+
| var_par_id
|
|
975
|
+
{
|
|
976
|
+
SymbolEntry e;
|
|
977
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
978
|
+
if (pp->symbols.get($1, e) && e.t == ST_FLOATVAR)
|
|
979
|
+
$$ = new FloatVarSpec(Alias(e.i),false);
|
|
980
|
+
else {
|
|
981
|
+
pp->err << "Error: undefined identifier " << $1
|
|
982
|
+
<< " in line no. "
|
|
983
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
984
|
+
pp->hadError = true;
|
|
985
|
+
$$ = new FloatVarSpec(0.0,false);
|
|
986
|
+
}
|
|
987
|
+
free($1);
|
|
988
|
+
}
|
|
989
|
+
| var_par_id '[' FZ_INT_LIT ']'
|
|
990
|
+
{
|
|
991
|
+
SymbolEntry e;
|
|
992
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
993
|
+
if (pp->symbols.get($1, e) && e.t == ST_FLOATVARARRAY) {
|
|
994
|
+
yyassert(pp,$3 > 0 && $3 <= pp->arrays[e.i],
|
|
995
|
+
"array access out of bounds");
|
|
996
|
+
if (!pp->hadError)
|
|
997
|
+
$$ = new FloatVarSpec(Alias(pp->arrays[e.i+$3]),false);
|
|
998
|
+
else
|
|
999
|
+
$$ = new FloatVarSpec(0.0,false);
|
|
1000
|
+
} else {
|
|
1001
|
+
pp->err << "Error: undefined array identifier " << $1
|
|
1002
|
+
<< " in line no. "
|
|
1003
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1004
|
+
pp->hadError = true;
|
|
1005
|
+
$$ = new FloatVarSpec(0.0,false);
|
|
1006
|
+
}
|
|
1007
|
+
free($1);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
float_init_list :
|
|
1011
|
+
/* empty */
|
|
1012
|
+
{ $$ = new vector<VarSpec*>(0); }
|
|
1013
|
+
| float_init_list_head list_tail
|
|
1014
|
+
{ $$ = $1; }
|
|
1015
|
+
|
|
1016
|
+
float_init_list_head :
|
|
1017
|
+
float_init
|
|
1018
|
+
{ $$ = new vector<VarSpec*>(1); (*$$)[0] = $1; }
|
|
1019
|
+
| float_init_list_head ',' float_init
|
|
1020
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1021
|
+
|
|
1022
|
+
float_var_array_literal :
|
|
1023
|
+
'[' float_init_list ']'
|
|
1024
|
+
{ $$ = $2; }
|
|
1025
|
+
|
|
1026
|
+
bool_init :
|
|
1027
|
+
FZ_BOOL_LIT
|
|
1028
|
+
{ $$ = new BoolVarSpec($1,false); }
|
|
1029
|
+
| var_par_id
|
|
1030
|
+
{
|
|
1031
|
+
SymbolEntry e;
|
|
1032
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1033
|
+
if (pp->symbols.get($1, e) && e.t == ST_BOOLVAR)
|
|
1034
|
+
$$ = new BoolVarSpec(Alias(e.i),false);
|
|
1035
|
+
else {
|
|
1036
|
+
pp->err << "Error: undefined identifier " << $1
|
|
1037
|
+
<< " in line no. "
|
|
1038
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1039
|
+
pp->hadError = true;
|
|
1040
|
+
$$ = new BoolVarSpec(false,false);
|
|
1041
|
+
}
|
|
1042
|
+
free($1);
|
|
1043
|
+
}
|
|
1044
|
+
| var_par_id '[' FZ_INT_LIT ']'
|
|
1045
|
+
{
|
|
1046
|
+
SymbolEntry e;
|
|
1047
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1048
|
+
if (pp->symbols.get($1, e) && e.t == ST_BOOLVARARRAY) {
|
|
1049
|
+
yyassert(pp,$3 > 0 && $3 <= pp->arrays[e.i],
|
|
1050
|
+
"array access out of bounds");
|
|
1051
|
+
if (!pp->hadError)
|
|
1052
|
+
$$ = new BoolVarSpec(Alias(pp->arrays[e.i+$3]),false);
|
|
1053
|
+
else
|
|
1054
|
+
$$ = new BoolVarSpec(false,false);
|
|
1055
|
+
} else {
|
|
1056
|
+
pp->err << "Error: undefined array identifier " << $1
|
|
1057
|
+
<< " in line no. "
|
|
1058
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1059
|
+
pp->hadError = true;
|
|
1060
|
+
$$ = new BoolVarSpec(false,false);
|
|
1061
|
+
}
|
|
1062
|
+
free($1);
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
bool_init_list :
|
|
1066
|
+
/* empty */
|
|
1067
|
+
{ $$ = new vector<VarSpec*>(0); }
|
|
1068
|
+
| bool_init_list_head list_tail
|
|
1069
|
+
{ $$ = $1; }
|
|
1070
|
+
|
|
1071
|
+
bool_init_list_head :
|
|
1072
|
+
bool_init
|
|
1073
|
+
{ $$ = new vector<VarSpec*>(1); (*$$)[0] = $1; }
|
|
1074
|
+
| bool_init_list_head ',' bool_init
|
|
1075
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1076
|
+
|
|
1077
|
+
bool_var_array_literal : '[' bool_init_list ']' { $$ = $2; }
|
|
1078
|
+
|
|
1079
|
+
set_init :
|
|
1080
|
+
set_literal
|
|
1081
|
+
{ $$ = new SetVarSpec($1,false); }
|
|
1082
|
+
| var_par_id
|
|
1083
|
+
{
|
|
1084
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1085
|
+
SymbolEntry e;
|
|
1086
|
+
if (pp->symbols.get($1, e) && e.t == ST_SETVAR)
|
|
1087
|
+
$$ = new SetVarSpec(Alias(e.i),false);
|
|
1088
|
+
else {
|
|
1089
|
+
pp->err << "Error: undefined identifier " << $1
|
|
1090
|
+
<< " in line no. "
|
|
1091
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1092
|
+
pp->hadError = true;
|
|
1093
|
+
$$ = new SetVarSpec(Alias(0),false);
|
|
1094
|
+
}
|
|
1095
|
+
free($1);
|
|
1096
|
+
}
|
|
1097
|
+
| var_par_id '[' FZ_INT_LIT ']'
|
|
1098
|
+
{
|
|
1099
|
+
SymbolEntry e;
|
|
1100
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1101
|
+
if (pp->symbols.get($1, e) && e.t == ST_SETVARARRAY) {
|
|
1102
|
+
yyassert(pp,$3 > 0 && $3 <= pp->arrays[e.i],
|
|
1103
|
+
"array access out of bounds");
|
|
1104
|
+
if (!pp->hadError)
|
|
1105
|
+
$$ = new SetVarSpec(Alias(pp->arrays[e.i+$3]),false);
|
|
1106
|
+
else
|
|
1107
|
+
$$ = new SetVarSpec(Alias(0),false);
|
|
1108
|
+
} else {
|
|
1109
|
+
pp->err << "Error: undefined array identifier " << $1
|
|
1110
|
+
<< " in line no. "
|
|
1111
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1112
|
+
pp->hadError = true;
|
|
1113
|
+
$$ = new SetVarSpec(Alias(0),false);
|
|
1114
|
+
}
|
|
1115
|
+
free($1);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
set_init_list :
|
|
1119
|
+
/* empty */
|
|
1120
|
+
{ $$ = new vector<VarSpec*>(0); }
|
|
1121
|
+
| set_init_list_head list_tail
|
|
1122
|
+
{ $$ = $1; }
|
|
1123
|
+
|
|
1124
|
+
set_init_list_head :
|
|
1125
|
+
set_init
|
|
1126
|
+
{ $$ = new vector<VarSpec*>(1); (*$$)[0] = $1; }
|
|
1127
|
+
| set_init_list_head ',' set_init
|
|
1128
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1129
|
+
|
|
1130
|
+
set_var_array_literal : '[' set_init_list ']'
|
|
1131
|
+
{ $$ = $2; }
|
|
1132
|
+
|
|
1133
|
+
vardecl_int_var_array_init :
|
|
1134
|
+
/* empty */
|
|
1135
|
+
{ $$ = Option<vector<VarSpec*>* >::none(); }
|
|
1136
|
+
| '=' int_var_array_literal
|
|
1137
|
+
{ $$ = Option<vector<VarSpec*>* >::some($2); }
|
|
1138
|
+
|
|
1139
|
+
vardecl_bool_var_array_init :
|
|
1140
|
+
/* empty */
|
|
1141
|
+
{ $$ = Option<vector<VarSpec*>* >::none(); }
|
|
1142
|
+
| '=' bool_var_array_literal
|
|
1143
|
+
{ $$ = Option<vector<VarSpec*>* >::some($2); }
|
|
1144
|
+
|
|
1145
|
+
vardecl_float_var_array_init :
|
|
1146
|
+
/* empty */
|
|
1147
|
+
{ $$ = Option<vector<VarSpec*>* >::none(); }
|
|
1148
|
+
| '=' float_var_array_literal
|
|
1149
|
+
{ $$ = Option<vector<VarSpec*>* >::some($2); }
|
|
1150
|
+
|
|
1151
|
+
vardecl_set_var_array_init :
|
|
1152
|
+
/* empty */
|
|
1153
|
+
{ $$ = Option<vector<VarSpec*>* >::none(); }
|
|
1154
|
+
| '=' set_var_array_literal
|
|
1155
|
+
{ $$ = Option<vector<VarSpec*>* >::some($2); }
|
|
1156
|
+
|
|
1157
|
+
constraint_item :
|
|
1158
|
+
FZ_CONSTRAINT FZ_ID '(' flat_expr_list ')' annotations
|
|
1159
|
+
{
|
|
1160
|
+
ParserState *pp = static_cast<ParserState*>(parm);
|
|
1161
|
+
if (!pp->hadError) {
|
|
1162
|
+
ConExpr c($2, $4);
|
|
1163
|
+
try {
|
|
1164
|
+
pp->fg->postConstraint(c, $6);
|
|
1165
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
1166
|
+
yyerror(pp, e.toString().c_str());
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
delete $6; free($2);
|
|
1170
|
+
}
|
|
1171
|
+
solve_item :
|
|
1172
|
+
FZ_SOLVE annotations FZ_SATISFY
|
|
1173
|
+
{
|
|
1174
|
+
ParserState *pp = static_cast<ParserState*>(parm);
|
|
1175
|
+
if (!pp->hadError) {
|
|
1176
|
+
try {
|
|
1177
|
+
pp->fg->solve($2);
|
|
1178
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
1179
|
+
yyerror(pp, e.toString().c_str());
|
|
1180
|
+
}
|
|
1181
|
+
} else {
|
|
1182
|
+
delete $2;
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
| FZ_SOLVE annotations minmax solve_expr
|
|
1186
|
+
{
|
|
1187
|
+
ParserState *pp = static_cast<ParserState*>(parm);
|
|
1188
|
+
if (!pp->hadError) {
|
|
1189
|
+
try {
|
|
1190
|
+
if ($3)
|
|
1191
|
+
pp->fg->minimize($4,$2);
|
|
1192
|
+
else
|
|
1193
|
+
pp->fg->maximize($4,$2);
|
|
1194
|
+
} catch (Gecode::FlatZinc::Error& e) {
|
|
1195
|
+
yyerror(pp, e.toString().c_str());
|
|
1196
|
+
}
|
|
1197
|
+
} else {
|
|
1198
|
+
delete $2;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/********************************/
|
|
1203
|
+
/* type-insts */
|
|
1204
|
+
/********************************/
|
|
1205
|
+
|
|
1206
|
+
int_ti_expr_tail :
|
|
1207
|
+
FZ_INT
|
|
1208
|
+
{ $$ = Option<AST::SetLit* >::none(); }
|
|
1209
|
+
| '{' int_list '}'
|
|
1210
|
+
{ $$ = Option<AST::SetLit* >::some(new AST::SetLit(*$2)); }
|
|
1211
|
+
| FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT
|
|
1212
|
+
{
|
|
1213
|
+
$$ = Option<AST::SetLit* >::some(new AST::SetLit($1, $3));
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
bool_ti_expr_tail :
|
|
1217
|
+
FZ_BOOL
|
|
1218
|
+
{ $$ = Option<AST::SetLit* >::none(); }
|
|
1219
|
+
| '{' bool_list_head list_tail '}'
|
|
1220
|
+
{ bool haveTrue = false;
|
|
1221
|
+
bool haveFalse = false;
|
|
1222
|
+
for (int i=$2->size(); i--;) {
|
|
1223
|
+
haveTrue |= ((*$2)[i] == 1);
|
|
1224
|
+
haveFalse |= ((*$2)[i] == 0);
|
|
1225
|
+
}
|
|
1226
|
+
delete $2;
|
|
1227
|
+
$$ = Option<AST::SetLit* >::some(
|
|
1228
|
+
new AST::SetLit(!haveFalse,haveTrue));
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
float_ti_expr_tail :
|
|
1232
|
+
FZ_FLOAT
|
|
1233
|
+
| '{' float_list_head list_tail '}'
|
|
1234
|
+
|
|
1235
|
+
/********************************/
|
|
1236
|
+
/* literals */
|
|
1237
|
+
/********************************/
|
|
1238
|
+
|
|
1239
|
+
set_literal :
|
|
1240
|
+
'{' int_list '}'
|
|
1241
|
+
{ $$ = new AST::SetLit(*$2); }
|
|
1242
|
+
| FZ_INT_LIT FZ_DOTDOT FZ_INT_LIT
|
|
1243
|
+
{ $$ = new AST::SetLit($1, $3); }
|
|
1244
|
+
|
|
1245
|
+
/* list containing only primitive literals */
|
|
1246
|
+
|
|
1247
|
+
int_list :
|
|
1248
|
+
/* empty */
|
|
1249
|
+
{ $$ = new vector<int>(0); }
|
|
1250
|
+
| int_list_head list_tail
|
|
1251
|
+
{ $$ = $1; }
|
|
1252
|
+
|
|
1253
|
+
int_list_head :
|
|
1254
|
+
FZ_INT_LIT
|
|
1255
|
+
{ $$ = new vector<int>(1); (*$$)[0] = $1; }
|
|
1256
|
+
| int_list_head ',' FZ_INT_LIT
|
|
1257
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1258
|
+
|
|
1259
|
+
bool_list :
|
|
1260
|
+
/* empty */
|
|
1261
|
+
{ $$ = new vector<int>(0); }
|
|
1262
|
+
| bool_list_head list_tail
|
|
1263
|
+
{ $$ = $1; }
|
|
1264
|
+
|
|
1265
|
+
bool_list_head :
|
|
1266
|
+
FZ_BOOL_LIT
|
|
1267
|
+
{ $$ = new vector<int>(1); (*$$)[0] = $1; }
|
|
1268
|
+
| bool_list_head ',' FZ_BOOL_LIT
|
|
1269
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1270
|
+
|
|
1271
|
+
float_list :
|
|
1272
|
+
/* empty */
|
|
1273
|
+
{ $$ = new vector<double>(0); }
|
|
1274
|
+
| float_list_head list_tail
|
|
1275
|
+
{ $$ = $1; }
|
|
1276
|
+
|
|
1277
|
+
float_list_head:
|
|
1278
|
+
FZ_FLOAT_LIT
|
|
1279
|
+
{ $$ = new vector<double>(1); (*$$)[0] = $1; }
|
|
1280
|
+
| float_list_head ',' FZ_FLOAT_LIT
|
|
1281
|
+
{ $$ = $1; $$->push_back($3); }
|
|
1282
|
+
|
|
1283
|
+
set_literal_list :
|
|
1284
|
+
/* empty */
|
|
1285
|
+
{ $$ = new vector<AST::SetLit>(0); }
|
|
1286
|
+
| set_literal_list_head list_tail
|
|
1287
|
+
{ $$ = $1; }
|
|
1288
|
+
|
|
1289
|
+
set_literal_list_head :
|
|
1290
|
+
set_literal
|
|
1291
|
+
{ $$ = new vector<AST::SetLit>(1); (*$$)[0] = *$1; delete $1; }
|
|
1292
|
+
| set_literal_list_head ',' set_literal
|
|
1293
|
+
{ $$ = $1; $$->push_back(*$3); delete $3; }
|
|
1294
|
+
|
|
1295
|
+
/********************************/
|
|
1296
|
+
/* constraint expressions */
|
|
1297
|
+
/********************************/
|
|
1298
|
+
|
|
1299
|
+
flat_expr_list :
|
|
1300
|
+
flat_expr
|
|
1301
|
+
{ $$ = new AST::Array($1); }
|
|
1302
|
+
| flat_expr_list ',' flat_expr
|
|
1303
|
+
{ $$ = $1; $$->append($3); }
|
|
1304
|
+
|
|
1305
|
+
flat_expr :
|
|
1306
|
+
non_array_expr
|
|
1307
|
+
{ $$ = $1; }
|
|
1308
|
+
| '[' non_array_expr_list ']'
|
|
1309
|
+
{ $$ = $2; }
|
|
1310
|
+
|
|
1311
|
+
non_array_expr_opt :
|
|
1312
|
+
/* empty */
|
|
1313
|
+
{ $$ = Option<AST::Node*>::none(); }
|
|
1314
|
+
| '=' non_array_expr
|
|
1315
|
+
{ $$ = Option<AST::Node*>::some($2); }
|
|
1316
|
+
|
|
1317
|
+
non_array_expr :
|
|
1318
|
+
FZ_BOOL_LIT
|
|
1319
|
+
{ $$ = new AST::BoolLit($1); }
|
|
1320
|
+
| FZ_INT_LIT
|
|
1321
|
+
{ $$ = new AST::IntLit($1); }
|
|
1322
|
+
| FZ_FLOAT_LIT
|
|
1323
|
+
{ $$ = new AST::FloatLit($1); }
|
|
1324
|
+
| set_literal
|
|
1325
|
+
{ $$ = $1; }
|
|
1326
|
+
| var_par_id /* variable, possibly array */
|
|
1327
|
+
{
|
|
1328
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1329
|
+
SymbolEntry e;
|
|
1330
|
+
if (pp->symbols.get($1, e)) {
|
|
1331
|
+
switch (e.t) {
|
|
1332
|
+
case ST_INTVARARRAY:
|
|
1333
|
+
{
|
|
1334
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1335
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1336
|
+
v->a[i] = new AST::IntVar(pp->arrays[e.i+i+1]);
|
|
1337
|
+
$$ = v;
|
|
1338
|
+
}
|
|
1339
|
+
break;
|
|
1340
|
+
case ST_BOOLVARARRAY:
|
|
1341
|
+
{
|
|
1342
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1343
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1344
|
+
v->a[i] = new AST::BoolVar(pp->arrays[e.i+i+1]);
|
|
1345
|
+
$$ = v;
|
|
1346
|
+
}
|
|
1347
|
+
break;
|
|
1348
|
+
case ST_SETVARARRAY:
|
|
1349
|
+
{
|
|
1350
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1351
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1352
|
+
v->a[i] = new AST::SetVar(pp->arrays[e.i+i+1]);
|
|
1353
|
+
$$ = v;
|
|
1354
|
+
}
|
|
1355
|
+
break;
|
|
1356
|
+
case ST_INTVALARRAY:
|
|
1357
|
+
{
|
|
1358
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1359
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1360
|
+
v->a[i] = new AST::IntLit(pp->arrays[e.i+i+1]);
|
|
1361
|
+
$$ = v;
|
|
1362
|
+
}
|
|
1363
|
+
break;
|
|
1364
|
+
case ST_BOOLVALARRAY:
|
|
1365
|
+
{
|
|
1366
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1367
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1368
|
+
v->a[i] = new AST::BoolLit(pp->arrays[e.i+i+1]);
|
|
1369
|
+
$$ = v;
|
|
1370
|
+
}
|
|
1371
|
+
break;
|
|
1372
|
+
case ST_SETVALARRAY:
|
|
1373
|
+
{
|
|
1374
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1375
|
+
int idx = pp->arrays[e.i+1];
|
|
1376
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1377
|
+
v->a[i] = new AST::SetLit(pp->setvals[idx+i]);
|
|
1378
|
+
$$ = v;
|
|
1379
|
+
}
|
|
1380
|
+
break;
|
|
1381
|
+
case ST_INT:
|
|
1382
|
+
$$ = new AST::IntLit(e.i);
|
|
1383
|
+
break;
|
|
1384
|
+
case ST_BOOL:
|
|
1385
|
+
$$ = new AST::BoolLit(e.i);
|
|
1386
|
+
break;
|
|
1387
|
+
case ST_SET:
|
|
1388
|
+
$$ = new AST::SetLit(pp->setvals[e.i]);
|
|
1389
|
+
break;
|
|
1390
|
+
default:
|
|
1391
|
+
$$ = getVarRefArg(pp,$1);
|
|
1392
|
+
}
|
|
1393
|
+
} else {
|
|
1394
|
+
pp->err << "Error: undefined identifier " << $1
|
|
1395
|
+
<< " in line no. "
|
|
1396
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1397
|
+
pp->hadError = true;
|
|
1398
|
+
$$ = NULL;
|
|
1399
|
+
}
|
|
1400
|
+
free($1);
|
|
1401
|
+
}
|
|
1402
|
+
| var_par_id '[' non_array_expr ']' /* array access */
|
|
1403
|
+
{
|
|
1404
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1405
|
+
int i = -1;
|
|
1406
|
+
yyassert(pp, $3->isInt(i), "Non-integer array index");
|
|
1407
|
+
if (!pp->hadError)
|
|
1408
|
+
$$ = getArrayElement(static_cast<ParserState*>(parm),$1,i);
|
|
1409
|
+
else
|
|
1410
|
+
$$ = new AST::IntLit(0); // keep things consistent
|
|
1411
|
+
free($1);
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
non_array_expr_list :
|
|
1415
|
+
/* empty */
|
|
1416
|
+
{ $$ = new AST::Array(0); }
|
|
1417
|
+
| non_array_expr_list_head list_tail
|
|
1418
|
+
{ $$ = $1; }
|
|
1419
|
+
|
|
1420
|
+
non_array_expr_list_head :
|
|
1421
|
+
non_array_expr
|
|
1422
|
+
{ $$ = new AST::Array($1); }
|
|
1423
|
+
| non_array_expr_list_head ',' non_array_expr
|
|
1424
|
+
{ $$ = $1; $$->append($3); }
|
|
1425
|
+
|
|
1426
|
+
/********************************/
|
|
1427
|
+
/* solve expressions */
|
|
1428
|
+
/********************************/
|
|
1429
|
+
|
|
1430
|
+
solve_expr:
|
|
1431
|
+
var_par_id
|
|
1432
|
+
{
|
|
1433
|
+
ParserState *pp = static_cast<ParserState*>(parm);
|
|
1434
|
+
SymbolEntry e;
|
|
1435
|
+
if (pp->symbols.get($1,e) && e.t == ST_INTVAR) {
|
|
1436
|
+
$$ = e.i;
|
|
1437
|
+
} else {
|
|
1438
|
+
pp->err << "Error: unknown integer variable " << $1
|
|
1439
|
+
<< " in line no. "
|
|
1440
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1441
|
+
pp->hadError = true;
|
|
1442
|
+
}
|
|
1443
|
+
free($1);
|
|
1444
|
+
}
|
|
1445
|
+
| var_par_id '[' FZ_INT_LIT ']'
|
|
1446
|
+
{
|
|
1447
|
+
SymbolEntry e;
|
|
1448
|
+
ParserState *pp = static_cast<ParserState*>(parm);
|
|
1449
|
+
if ( (!pp->symbols.get($1, e)) || e.t != ST_INTVARARRAY) {
|
|
1450
|
+
pp->err << "Error: unknown integer variable array " << $1
|
|
1451
|
+
<< " in line no. "
|
|
1452
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1453
|
+
pp->hadError = true;
|
|
1454
|
+
}
|
|
1455
|
+
if ($3 == 0 || $3 > pp->arrays[e.i]) {
|
|
1456
|
+
pp->err << "Error: array index out of bounds for array " << $1
|
|
1457
|
+
<< " in line no. "
|
|
1458
|
+
<< yyget_lineno(pp->yyscanner) << std::endl;
|
|
1459
|
+
pp->hadError = true;
|
|
1460
|
+
} else {
|
|
1461
|
+
$$ = pp->arrays[e.i+$3];
|
|
1462
|
+
}
|
|
1463
|
+
free($1);
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
minmax:
|
|
1467
|
+
FZ_MINIMIZE
|
|
1468
|
+
| FZ_MAXIMIZE
|
|
1469
|
+
|
|
1470
|
+
/********************************/
|
|
1471
|
+
/* annotation expresions */
|
|
1472
|
+
/********************************/
|
|
1473
|
+
|
|
1474
|
+
annotations :
|
|
1475
|
+
/* empty */
|
|
1476
|
+
{ $$ = NULL; }
|
|
1477
|
+
| annotations_head
|
|
1478
|
+
{ $$ = $1; }
|
|
1479
|
+
|
|
1480
|
+
annotations_head :
|
|
1481
|
+
FZ_COLONCOLON annotation
|
|
1482
|
+
{ $$ = new AST::Array($2); }
|
|
1483
|
+
| annotations_head FZ_COLONCOLON annotation
|
|
1484
|
+
{ $$ = $1; $$->append($3); }
|
|
1485
|
+
|
|
1486
|
+
annotation :
|
|
1487
|
+
FZ_ID '(' annotation_list ')'
|
|
1488
|
+
{
|
|
1489
|
+
$$ = new AST::Call($1, AST::extractSingleton($3)); free($1);
|
|
1490
|
+
}
|
|
1491
|
+
| annotation_expr
|
|
1492
|
+
{ $$ = $1; }
|
|
1493
|
+
|
|
1494
|
+
annotation_list:
|
|
1495
|
+
annotation
|
|
1496
|
+
{ $$ = new AST::Array($1); }
|
|
1497
|
+
| annotation_list ',' annotation
|
|
1498
|
+
{ $$ = $1; $$->append($3); }
|
|
1499
|
+
|
|
1500
|
+
annotation_expr :
|
|
1501
|
+
ann_non_array_expr
|
|
1502
|
+
{ $$ = $1; }
|
|
1503
|
+
| '[' annotation_list ']'
|
|
1504
|
+
{ $$ = $2; }
|
|
1505
|
+
|
|
1506
|
+
ann_non_array_expr :
|
|
1507
|
+
FZ_BOOL_LIT
|
|
1508
|
+
{ $$ = new AST::BoolLit($1); }
|
|
1509
|
+
| FZ_INT_LIT
|
|
1510
|
+
{ $$ = new AST::IntLit($1); }
|
|
1511
|
+
| FZ_FLOAT_LIT
|
|
1512
|
+
{ $$ = new AST::FloatLit($1); }
|
|
1513
|
+
| set_literal
|
|
1514
|
+
{ $$ = $1; }
|
|
1515
|
+
| var_par_id /* variable, possibly array */
|
|
1516
|
+
{
|
|
1517
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1518
|
+
SymbolEntry e;
|
|
1519
|
+
bool gotSymbol = false;
|
|
1520
|
+
if (pp->symbols.get($1, e)) {
|
|
1521
|
+
gotSymbol = true;
|
|
1522
|
+
switch (e.t) {
|
|
1523
|
+
case ST_INTVARARRAY:
|
|
1524
|
+
{
|
|
1525
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1526
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1527
|
+
v->a[i] = new AST::IntVar(pp->arrays[e.i+i+1]);
|
|
1528
|
+
$$ = v;
|
|
1529
|
+
}
|
|
1530
|
+
break;
|
|
1531
|
+
case ST_BOOLVARARRAY:
|
|
1532
|
+
{
|
|
1533
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1534
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1535
|
+
v->a[i] = new AST::BoolVar(pp->arrays[e.i+i+1]);
|
|
1536
|
+
$$ = v;
|
|
1537
|
+
}
|
|
1538
|
+
break;
|
|
1539
|
+
case ST_SETVARARRAY:
|
|
1540
|
+
{
|
|
1541
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1542
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1543
|
+
v->a[i] = new AST::SetVar(pp->arrays[e.i+i+1]);
|
|
1544
|
+
$$ = v;
|
|
1545
|
+
}
|
|
1546
|
+
break;
|
|
1547
|
+
case ST_INTVALARRAY:
|
|
1548
|
+
{
|
|
1549
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1550
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1551
|
+
v->a[i] = new AST::IntLit(pp->arrays[e.i+i+1]);
|
|
1552
|
+
$$ = v;
|
|
1553
|
+
}
|
|
1554
|
+
break;
|
|
1555
|
+
case ST_BOOLVALARRAY:
|
|
1556
|
+
{
|
|
1557
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1558
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1559
|
+
v->a[i] = new AST::BoolLit(pp->arrays[e.i+i+1]);
|
|
1560
|
+
$$ = v;
|
|
1561
|
+
}
|
|
1562
|
+
break;
|
|
1563
|
+
case ST_SETVALARRAY:
|
|
1564
|
+
{
|
|
1565
|
+
AST::Array *v = new AST::Array(pp->arrays[e.i]);
|
|
1566
|
+
int idx = pp->arrays[e.i+1];
|
|
1567
|
+
for (int i=pp->arrays[e.i]; i--;)
|
|
1568
|
+
v->a[i] = new AST::SetLit(pp->setvals[idx+i]);
|
|
1569
|
+
$$ = v;
|
|
1570
|
+
}
|
|
1571
|
+
break;
|
|
1572
|
+
case ST_INT:
|
|
1573
|
+
$$ = new AST::IntLit(e.i);
|
|
1574
|
+
break;
|
|
1575
|
+
case ST_BOOL:
|
|
1576
|
+
$$ = new AST::BoolLit(e.i);
|
|
1577
|
+
break;
|
|
1578
|
+
case ST_SET:
|
|
1579
|
+
$$ = new AST::SetLit(pp->setvals[e.i]);
|
|
1580
|
+
break;
|
|
1581
|
+
default:
|
|
1582
|
+
gotSymbol = false;
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
if (!gotSymbol)
|
|
1586
|
+
$$ = getVarRefArg(pp,$1,true);
|
|
1587
|
+
free($1);
|
|
1588
|
+
}
|
|
1589
|
+
| var_par_id '[' ann_non_array_expr ']' /* array access */
|
|
1590
|
+
{
|
|
1591
|
+
ParserState* pp = static_cast<ParserState*>(parm);
|
|
1592
|
+
int i = -1;
|
|
1593
|
+
yyassert(pp, $3->isInt(i), "Non-integer array index");
|
|
1594
|
+
if (!pp->hadError)
|
|
1595
|
+
$$ = getArrayElement(static_cast<ParserState*>(parm),$1,i);
|
|
1596
|
+
else
|
|
1597
|
+
$$ = new AST::IntLit(0); // keep things consistent
|
|
1598
|
+
free($1);
|
|
1599
|
+
}
|
|
1600
|
+
| FZ_STRING_LIT
|
|
1601
|
+
{
|
|
1602
|
+
$$ = new AST::String($1);
|
|
1603
|
+
free($1);
|
|
1604
|
+
}
|