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

conjuncts() and disjuncts() need to be recursive #10

Closed
GoogleCodeExporter opened this issue Aug 29, 2015 · 2 comments
Closed

conjuncts() and disjuncts() need to be recursive #10

GoogleCodeExporter opened this issue Aug 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I was playing with the Criminal(West) example and the new fol_bc_ask()
stuff, couldn't get it to work unless I changed conjuncts() as follows:

def conjuncts(s):
    if isinstance(s, Expr) and s.op == '&':
        r = []
        for arg in s.args:
            r.extend (conjuncts (arg))
        return r
    else:
        return [s]

Without this change, conjuncts() will do this:
>>> conjuncts (sar.args[0])
[((American(v_1) & Weapon(v_2)) & Sells(v_1, v_2, v_3)), Hostile(v_3)]

Original issue reported on code.google.com by rushing....@gmail.com on 2 Mar 2009 at 6:53

@GoogleCodeExporter
Copy link
Author

r87 gets Criminal(West) working in a different way. It's possible other uses of 
conjuncts()/disjuncts() may need to be recursive, since I don't understand all 
this code, so I'm leaving the bug open.

Original comment by wit...@gmail.com on 4 Oct 2011 at 3:05

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r99.

Original comment by wit...@gmail.com on 5 Oct 2011 at 5:58

  • Changed state: Fixed

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

1 participant