You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In trying to work with the external assignment examples, I've been hitting this error. It occurs both in Lua and Python (the output below is from Lua):
$ cd examples/clingo/external/ && clingo external.lp external-lua.lp
clingo version 5.4.0
Reading from external.lp ...
*** ERROR: (clingo): main: error: error calling main:
RuntimeError: [string "external-lua.lp:1:1-13:6"]:3: Term::simplify must be called after Term::unpool
stack traceback:
[C]: in method 'ground'
[string "external-lua.lp:1:1-13:6"]:3: in function 'main'
[C]: in ?
UNKNOWN
Models : 0+
Calls : 1
Time : 0.045s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
CPU Time : 0.000s
Here's my versions:
$ clingo --version
clingo version 5.4.0
Address model: 64-bit
libclingo version 5.4.0
Configuration: without Python, with Lua 5.3.4
libclasp version 3.3.5 (libpotassco version 1.1.0)
Configuration: WITH_THREADS=1
Copyright (C) Benjamin Kaufmann
License: The MIT License <https://opensource.org/licenses/MIT>
As an aside, I've got a question about external atoms for my use case. In external.lp, there's the fact #external p(1;2;3). That means the model will only be able to solve against one of those 3 values, right? My domain is dealing with monitor coordinates. Modeling a 4k monitor with coords(0..4096,0..2160) consumes about a gigabyte of memory, which is unacceptable for my application. Is there a way to use externals parameterized over unbounded domains? Alternatively, coords will only ever have one value at a time - is there some other way to incrementally ground against the one, changing value? Or am I really looking for lazy grounding at this point?
The text was updated successfully, but these errors were encountered:
This is a regression in clingo-5.4. As a workaround for now you can replace
#external p(1;2;3).
by
#external p(1..3).
I'll fix the issue for the next release.
Regarding your question. Maybe you should not use multi-shot solving at all or at least limit it to a small number of steps. Maybe you can delete your control object and create a new one after one action is processed. Also note that there is a small caveat, currently clingo does not free the memory it uses for its symbols until the application exits. Symbols will be reused but you might still end up having symbols for all coordinates. This is something I am planning to address but it won't happen anytime soon.
In trying to work with the external assignment examples, I've been hitting this error. It occurs both in Lua and Python (the output below is from Lua):
Here's my versions:
As an aside, I've got a question about external atoms for my use case. In external.lp, there's the fact
#external p(1;2;3)
. That means the model will only be able to solve against one of those 3 values, right? My domain is dealing with monitor coordinates. Modeling a 4k monitor withcoords(0..4096,0..2160)
consumes about a gigabyte of memory, which is unacceptable for my application. Is there a way to use externals parameterized over unbounded domains? Alternatively,coords
will only ever have one value at a time - is there some other way to incrementally ground against the one, changing value? Or am I really looking for lazy grounding at this point?The text was updated successfully, but these errors were encountered: