-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix env usage #700
base: master
Are you sure you want to change the base?
Fix env usage #700
Conversation
Replace calls to FNode member functions `substitute`, `simplify` and `get_free_variables` with corresponding calls to the `substituter`, `fvo` and `simplifier` objects in the environment.
…ce different from the one at the top of the stack. Remove direct calls to `get_free_variables`, `simplify` and `substitute` of FNode.
Replace calls to `get_free_variables`, `simplify` and `substitute` on FNode with the corresponding calls on the `fvo`, `simplifier`, `substituter` instances in the environment.
Minor change in walker/generic.
👋 Is this something that we still want to do? If so, I would probably separate the "cosmetic" breaking change of renaming We can also look into making the rename non-breaking by introducing a secondary keyword argument, but I am not sure this is worth the effort. |
I second @marcogario: the aesthetic fix is secondary compared to add the customizability of the environment. I think very few users are using custom environments, so the breaking change should not be too disruptive |
At the moment I don't exactly remember the status of this PR. In the next few days I will try to check its status and update it. |
It appears there is at least 1 test case failing: yices on macos. I am unable to reproduce the error on my linux machine. Any suggestions? |
I tried to make the naming of
environment
more uniform: now it should always appear asenv
.This breaks backward compatibility since a call like
pippo(environment=my_env)
should be modified topippo(env=my_env)
.In addition, I tried to reduce the number of places where the code ends up calling
get_env
to obtain an environment.I am using multiple environments and this behavior was causing some issues.
In some classes and methods I have added an optional
env
parameter so that they should work within the given environment if any.I should have "fixed" al the calls to
get_free_variables
,simplify
andsubstitute
, and most of the calls toget_type
.