PyEDA - replace node in expression

87 Views Asked by At

Consider the following piece of PyEDA:

a, b, c = map(exprvar, 'abc')
f1 = And(a,Or(~a,b))
print(f1)

outputs:

And(a, Or(~a, b))

How can I replace the first a with c? compose replaces all instances of a:

f1.compose({a: c})

outputs:

And(c, Or(~c, b))
0

There are 0 best solutions below