Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domRec ignored for heuristic with external atom #467

Open
kherud opened this issue Nov 14, 2023 · 3 comments
Open

domRec ignored for heuristic with external atom #467

kherud opened this issue Nov 14, 2023 · 3 comments
Milestone

Comments

@kherud
Copy link

kherud commented Nov 14, 2023

Domain heuristics with external atoms are ignored when enumerating answer sets with solution recording.
I'm looking at example 10.6 of the potassco guide (see also the Python program attached):

1 {a(1..3)}. 
a(2) :- a(3). 
a(3) :- a(2).
{b(1)}. 

#show a/1.
#heuristic a(1..3). [1,false]

When called with --heuristic=Domain --enum-mode=domRec 0, the two answers a(1) and a(2) a(3) are correctly output.

However, if the last line is replaced with

#external e.
#heuristic a(1..3) : e. [1,false]

the warning domRec ignored: No domain atoms found. is printed and answers are enumerated without solution recording.
This is also the case if e was set to true in advance.

Is this intended?

domrec.zip

@rkaminsk
Copy link
Member

@BenKaufmann do you know what is happening here? Right now, I am not sure where clasp is taking the domain atoms from in this scenario.

@BenKaufmann
Copy link
Contributor

@rkaminsk For clasp, the "domain atoms" considered by "domRec" are the atoms that have an associated heuristic directive applying on the top-level. The mode was mostly intended to be used with a fixed set of atoms to minimize.

In the first example, the relevant atoms are a(1..3) because the heuristic directives are unconditionally true.

In the second example, there are no "domain atoms" because all heuristic directives depend on the external atom e, which is assumed to be false. Of course, one could argue that if e is assumed to be true, the relevant atoms again should be a(1..3) (i.e. heuristic is true wrt root- instead of top-level). However, this is currently not implemented.

@rkaminsk rkaminsk added this to the unknown milestone Nov 23, 2023
@rkaminsk
Copy link
Member

I'll postpone this one for the time being. Let's hope we'll find some time to improve the domain recording options in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants