I’m trying to declare a constraint variable to be in one of two intervals, say [0…3] or [5…6]. I imagined that I should be able to do this:
?- X in 0..3 #\/ X in 5..6, label([X]).
ERROR: Arguments are not sufficiently instantiated
ERROR: In:
ERROR: [14] throw(error(instantiation_error,_29172))
ERROR: [11] clpfd:'__aux_maplist/2_must_be_finite_fdvar+0'([_29206]) at /usr/lib/swi-prolog/library/clp/clpfd.pl:1745
ERROR: [10] clpfd:labeling([],[_29244]) at /usr/lib/swi-prolog/library/clp/clpfd.pl:1748
ERROR: [7] <user>
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
Am I misunderstanding something, or is this a limitation in SWI Prolog?