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

Add conversions of num/int/rat/real/word that evaluate expressions using Compute #119

Merged
merged 1 commit into from
Nov 20, 2024

Commits on Nov 18, 2024

  1. Add conversions of num/int/rat/real/word that evaluate expressions us…

    …ing Compute
    
    This patch adds conversions of num/int/rat/real/word that use the Compute module to
    evaluate expressions.
    They are named `*_COMPUTE_CONV` and uses the 'weak' reduction (`Compute.WEAK_CBV_CONV`).
    Additionally, an if-then-else expression is configured to be reduced only when the branch is constant.
    
    These new conversions are different from
    
    - `*_RED_CONV` because `*_RED_CONV` cannot
      recursively traverse subexpression (e.g., `NUM_RED_CONV` cannot reduce `` `1 + (2 + 3)` ``)
    - Also different from `*_REDUCE_CONV` because `*_REDUCE_CONV` tries to
      recursively reduce every subexpression (e.g.,
      `` `if unknown_cond then 1 + 2 else 3 + 4` ``, `` `\x. x + (1 + 2)` ``).
    
    This also makes github workflow fail if any command fails.
    aqjune-aws authored and aqjune committed Nov 18, 2024
    Configuration menu
    Copy the full SHA
    7915d48 View commit details
    Browse the repository at this point in the history