[gecode-users] SUBSCRIBE modification event required?

Christian Schulte cschulte at kth.se
Thu Sep 17 17:37:44 CEST 2015


Hi Joe,

Gosh, you have been digging deep, haven't you? So the thing is, if you only have a variable type with three modification events, then the SUBSCRIBE event becomes the ASSIGNED one. This I just reverse-engineered from some ultra-ugly perl script that generates the code from the .vis files. There I saw that the script even has a syntax error not caught by perl ;-)

And yes, of course this should be documented and the error should be caught. I will do it for the trunk soonish.

Today seems to be .vis day on this mailing list!

Cheers
Christian

--
Christian Schulte, www.gecode.org/~schulte 
Professor of Computer Science, KTH, cschulte at kth.se
Expert Researcher, SICS, cschulte at sics.se

-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf Of Joseph Scott
Sent: Thursday, September 17, 2015 04:54 PM
To: users at gecode.org
Subject: [gecode-users] SUBSCRIBE modification event required?

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);
                                                                                                                           
^

_______________________________________________
Gecode users mailing list
users at gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list