Skip to content

Error with external example: Term::simplify must be called after Term::unpool #179

@d4hines

Description

@d4hines

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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions