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

&hexInspection does not evaluate to true for strong negated atoms #1

Open
tonico opened this issue Nov 17, 2016 · 1 comment
Open

Comments

@tonico
Copy link

tonico commented Nov 17, 2016

The program a v -a has two answer sets {a} and {-a}. Now consider the following program (inspect.hex), which inspects the answer sets of the subprogram a v -a:

subprog("a v -a.").

answer_set(AnswerSet) :-
    subprog(P),
    &hexInspection[string, P, inp, program](AnswerSet, C).

atom(AnswerSet, Atom) :-
    subprog(P),
    answer_set(AnswerSet),
    &hexInspection[string, P, inp, answerset, AnswerSet](Atom, C).

term(AnswerSet, Atom, Index, Term) :-
    subprog(P),
    atom(AnswerSet, Atom),
    &hexInspection[string, P, inp, atom, Atom](Index, Term).

The answer set of this program does not contain a term atom corresponding to the -a atom in one of the two answer sets of the subprogram:

$ dlvhex2 inspect.hex -f term
{term(0,3,0,a)}

I would expect term(1,_,0,-a) to be in the answer set as well.

@tonico
Copy link
Author

tonico commented Nov 17, 2016

I'm not sure about the semantics of the Atom query type. Maybe we could add a different query type for strong negated atoms?

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

No branches or pull requests

1 participant