[gecode-users] SUBSCRIBE modification event required?

Joseph Scott joseph.scott at it.uu.se
Thu Sep 17 16:54:23 CEST 2015


Hi,

I was just rebuilding Gecode with an included .vis file for a variable
type, and I neglected to designate one of the modification events as the
SUBSCRIBE event, resulting in the error message included below[1].
Adding "=SUBSCRIBE" to one of the ModEvent definitions makes it go away,
as one would expect.

But now I'm curious. MPG very carefully does not state that one must
define a modification event for new subscriptions. Quite the opposite,
really: of the four special modification events, the other three are
explicitly stated to be required (p. 403). What is more, it seems that
bool.vis does not specify a subscription event for Boolean variables
(upon reflection, this is unsurprising).  So it seems like I should be
able to omit this specification — although, I admit, I can't see why I
would want to do so for anything other than a Boolean.

So my question is this: am I required to specify a modification event
for subscriptions to (non-assigned) variables? And if so, is this
requirement somehow waived for Booleans?

Thanks!
Joe

[1] using g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2:
g++ -I. -fcx-limited-range -fno-signaling-nans -fno-rounding-math
-ffinite-math-only -fno-math-errno -fno-strict-aliasing -O3
-fvisibility=hidden -ggdb -pipe -Wall -Wextra -fPIC -pthread -DNDEBUG   \
        -c -o gecode/kernel/archive.o  gecode/kernel/archive.cpp
In file included from ./gecode/kernel.hh:228:0,
                 from gecode/kernel/archive.cpp:38:
./gecode/kernel/var-imp.hpp: In member function ‘void
StrVars::Str::StrVarImpBase::subscribe(Gecode::Space&,
Gecode::Propagator&, Gecode::PropCond, bool, bool)’:
./gecode/kernel/var-imp.hpp:463:79: error: expected primary-expression
before ‘,’ token
    
Gecode::VarImp<StrVars::Str::StrVarImpConf>::subscribe(home,p,pc,assigned,,schedule);
                                                                                                                           
^



More information about the users mailing list