Skip to content

Allow for hybrid custom constraints #88

@haz

Description

@haz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions