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 tactics in impconv.ml to raise Failure rather than Unchanged #109

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

aqjune-aws
Copy link
Contributor

Tactics in impconv.ml may raise Unchanged rather than Failure if they fail. This makes ORELSE unable to use because ORELSE only catches Failure but not Unchanged:

 # g `1 + 1 = 2`;;
val it : goalstack = 1 subgoal (1 total)

`1 + 1 = 2`

 # e(IMP_REWRITE_TAC[MOD_LT] ORELSE ARITH_TAC);;
Exception: Unchanged.

This patch fixes the tactics to raise Failure to enable this.

Tactics in impconv.ml may raise `Unchanged` rather than `Failure` if they fail.
This makes `ORELSE` unable to use because `ORELSE` only catches `Failure` but not `Unchanged`:

```
 # g `1 + 1 = 2`;;
val it : goalstack = 1 subgoal (1 total)

`1 + 1 = 2`

 # e(IMP_REWRITE_TAC[MOD_LT] ORELSE ARITH_TAC);;
Exception: Unchanged.
```

This patch fixes the tactics to raise `Failure` to enable this.
@aqjune-aws aqjune-aws marked this pull request as ready for review September 14, 2024 15:52
@aqjune-aws
Copy link
Contributor Author

Passed s2n-bignum and holtest

Copy link
Owner

@jrh13 jrh13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching and fixing this!

@jrh13 jrh13 merged commit 413e41a into jrh13:master Sep 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants