Skip to content
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

Duplicate sub expressions (introduced during normalization) are problematic for "stateful" functions #17

Open
danmatichuk opened this issue Apr 7, 2020 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@danmatichuk
Copy link
Collaborator

Certain functions get translated into "stateful" operations in macaw, e.g. write_mem or gpr_set. During normalization, functions are split into a distinct function representing each (sub)-field of its result type. This splitting is sound from a functional interpretation, but can introduce duplicate expressions if they are shared in the computation of each out put.

When these "stateful" function are duplicated, however, the resulting action occurs multiple times, and also is not necessary evaluated in the correct order.

This indicates that some structs should be retained in the normalized spec, which are exclusively used to manage the control flow of stateful operations. These don't require a logical representation in the expressions outputted by macaw, but instead would be translated into haskell-level tuples.

@danmatichuk danmatichuk added bug Something isn't working enhancement New feature or request labels Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant