zell
zell

Reputation: 10204

How to get the variable list from a z3 formula?

I have a Z3 formula (in Z3py)

i=z3.Int('x')+z3.Int('y')<2

How can I get the variable list x and y?

Upvotes: 0

Views: 1004

Answers (1)

Nikolaj Bjorner
Nikolaj Bjorner

Reputation: 8359

I added an example to Z3 to illustrate walking subexpressions in Python. https://github.com/Z3Prover/z3/blob/master/examples/python/visitor.py

Upvotes: 1

Related Questions