Skip to content

Support Gurobi expression trees#912

Draft
hbierlee wants to merge 13 commits intomasterfrom
feature/add-grb-expression-trees
Draft

Support Gurobi expression trees#912
hbierlee wants to merge 13 commits intomasterfrom
feature/add-grb-expression-trees

Conversation

@hbierlee
Copy link
Copy Markdown
Contributor

@hbierlee hbierlee commented Apr 7, 2026

Initial draft for supporting expression trees. I've had to make many changes to flatten to prevent it from flattening expressions which are supported by the Gurobi expression trees. Now that the Gurobi side is working, I'm making a 2nd pass to make things more principled and stable again, as of course now the other solvers would break. However, it will remain difficult, as we no longer have Flat Normal Form for the later Gurobi transformations.

@hbierlee hbierlee force-pushed the feature/add-grb-expression-trees branch from 2996a21 to 439fcbb Compare April 7, 2026 14:53
@tias
Copy link
Copy Markdown
Collaborator

tias commented Apr 7, 2026

euh, I can not recommend changing flatten...

the way I think about it is that if it accepts expression trees (like z3), then it does not need flatten... flatten outputs FNF and expression trees are very much not FNF.

So... ideally you follow the same flow as Z3; and if there are things that gurobi does not accept then you create a new transformation for that... (which can call flatten if it wants to)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants