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

Projection not working correctly with multiple program parts #362

Closed
rkaminsk opened this issue Mar 9, 2022 · 0 comments · Fixed by #363
Closed

Projection not working correctly with multiple program parts #362

rkaminsk opened this issue Mar 9, 2022 · 0 comments · Fixed by #363
Assignees
Labels
Milestone

Comments

@rkaminsk
Copy link
Member

rkaminsk commented Mar 9, 2022

The following program fails to derive atom c.

#program a.
p.
#program b.
r :- q(_), p.
%r :- q(X), p.

#script(lua)

clingo = require("clingo")

function main(ctl)
    ctl:ground({{'a', {}}})
    ctl:solve()
                                                                                                                                            
    bck = ctl:backend()
    atm = bck:add_atom(clingo.Function('q', {clingo.Number(0)}))
    bck:add_rule{{atm}}
    bck:close()
    ctl:ground({{'b', {}}})
    ctl:solve()
end

#end.
@rkaminsk rkaminsk added the bug label Mar 9, 2022
@rkaminsk rkaminsk added this to the v5.5.2 milestone Mar 9, 2022
@rkaminsk rkaminsk self-assigned this Mar 9, 2022
@rkaminsk rkaminsk linked a pull request Mar 13, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant