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

Allow for hybrid custom constraints #88

Open
haz opened this issue May 2, 2021 · 0 comments
Open

Allow for hybrid custom constraints #88

haz opened this issue May 2, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@haz
Copy link
Contributor

haz commented May 2, 2021

If A and B are classes with a @proposition annotation, then we may want to be able to write a constraint like...

e = Encoding()

@proposition
class A:
    pass

@proposition
class B:
    pass

b = B()
e.add_constraint(~A | b)

Interpretation would be that every instance of A is substituted in for a new version of this constraint at compile time.

Probably needs some advanced handling of the operator overloading (so that the class is considered an nnf.Var object, and a regular nnf constraint is built no matter what the arguments are).

Note that this is a far more advanced version of #87

@haz haz added the enhancement New feature or request label May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant