Ejemplo n.º 1
0
def constraints_to_constraintset(constupl):
    # originally those constraints belonged to a different ConstraintSet
    # This is a hack
    x = ConstraintSet()

    declarations = GetDeclarations()
    for a in constupl:
        declarations.visit(a)
        x.add(a)
    for d in declarations.result:
        x._declare(d)

    return x
Ejemplo n.º 2
0
def constraints_to_constraintset(constupl):
    x = ConstraintSet()
    x._constraints = list(constupl)
    return x