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

Constant propagation #16

Open
nielstron opened this issue Dec 12, 2023 · 0 comments
Open

Constant propagation #16

nielstron opened this issue Dec 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@nielstron
Copy link
Contributor

The pluto language is a suitable place to allow for constant propagation where applicable. Concretely

  • ITE can be evaluated if the condition is known
  • apply(y, x) can be skipped if x has no side effects (i.e. errors or traces) and is discarded in y (concrete use case: constants in opshin are generated by applying the state monad to a function that just returns a constant)
  • builtins can be evaluated if all inputs are known

This complements the higher level constant propagation on the opshin/python level and the lower level constant propagation in UPLC which is not aware of patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant