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

Fix unsound contract equality fast check #1703

Merged
merged 6 commits into from
Oct 29, 2023
Merged

Commits on Oct 27, 2023

  1. Fix unsound ptr eq check in contract equality

    For performance reason, the contract equality checker performs a quick
    pointer check to see if the two terms to compare are physically equal.
    In this case, it used to return `true` directly, eschewing more costly
    recursive checks.
    
    However, this is unsound, because the same term (physically) might be in two
    different environments, and have two different values. This is typically
    the case with function application: when evaluating `f 1` and `f 2`,
    both terms will physically point to the body of `f`, but in a different
    environment. Thus, we also need to ensure that environment are equals as
    well in this quick check.
    
    This commit adds a fast `ptr_eq` check to the environment as well, and
    now checks that both terms and their respective environments are
    pairwise physically equals.
    
    Passing by, this commits also fix unrelated clippy warning, after the
    udpate to clippy 1.73.
    yannham committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    620ddb2 View commit details
    Browse the repository at this point in the history
  2. Add regression test for #1700

    yannham committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    eaa8443 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2023

  1. Configuration menu
    Copy the full SHA
    3990748 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    592f7a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7c8f49d View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. Remove confusing comments

    yannham committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    e1c2be5 View commit details
    Browse the repository at this point in the history