Skip to content

Commit ed5d8f9

Browse files
committed
Add support for the experimental MiniZinc black-box propagator interface
1 parent d86ed2f commit ed5d8f9

9 files changed

Lines changed: 1091 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,7 @@ list(APPEND GECODE_EXPORT_TARGETS gecode)
11871187
# Executables / tests
11881188
# ---------------------------------------------------------------------------
11891189
if(GECODE_ENABLE_FLATZINC)
1190+
target_link_libraries(gecodeflatzinc ${CMAKE_DL_LIBS})
11901191
add_executable(fzn-gecode ${GECODE_FLATZINC_EXE_SOURCE})
11911192
target_link_libraries(fzn-gecode PRIVATE gecodeflatzinc)
11921193
if(APPLE)

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,11 +819,11 @@ endif
819819
# FLATZINC
820820
#
821821

822-
FLATZINCSRC0 = flatzinc.cpp registry.cpp branch.cpp
822+
FLATZINCSRC0 = flatzinc.cpp registry.cpp branch.cpp blackbox.cpp
823823
FLATZINC_GENSRC0 = parser.tab.cpp lexer.yy.cpp
824824
FLATZINCHDR0 = ast.hh conexpr.hh option.hh parser.hh \
825825
plugin.hh registry.hh symboltable.hh varspec.hh \
826-
branch.hh branch.hpp lastval.hh complete.hh
826+
branch.hh branch.hpp lastval.hh complete.hh blackbox.hh
827827

828828
FLATZINCSRC = $(FLATZINCSRC0:%=gecode/flatzinc/%)
829829
FLATZINC_GENSRC = $(FLATZINC_GENSRC0:%=gecode/flatzinc/%)

changelog.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ This release modernizes the Gecode build infrastructure, adds a
7575
first-class CMake package for downstream consumers, refreshes the
7676
autoconf build path, and updates CI coverage for current platforms.
7777

78+
[ENTRY]
79+
Module: flatzinc
80+
What: new
81+
Rank: minor
82+
[DESCRIPTION]
83+
Add support for the experimental MiniZinc black-box propagator interface. A
84+
FlatZinc model can request propagation using an external function, implemented
85+
either as a shared library or as a subprocess, through two generic propagators:
86+
gecode_blackbox (value propagation, scheduled once all inputs are fixed) and
87+
gecode_blackbox_bounds (bounds propagation, scheduled on bound changes).The
88+
blackbox_exec and blackbox_dll annotations select the execution mode and pass
89+
through extra arguments.
90+
7891
[ENTRY]
7992
Module: minimodel
8093
What: bug

cmake/GecodeSources.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ set(GECODE_GIST_SOURCES
232232
)
233233

234234
set(GECODE_FLATZINC_SOURCES
235+
gecode/flatzinc/blackbox.cpp
235236
gecode/flatzinc/branch.cpp
236237
gecode/flatzinc/flatzinc.cpp
237238
gecode/flatzinc/lexer.yy.cpp

0 commit comments

Comments
 (0)