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 crash on high debug #26

Merged
merged 3 commits into from
Mar 25, 2025
Merged

Conversation

dc-mak
Copy link
Contributor

@dc-mak dc-mak commented Mar 24, 2025

No description provided.

dc-mak added 3 commits March 24, 2025 19:24
Cerb_frontend.Pp_symbol.to_string_pretty_cn was updated to (a)
not depend at all on the Cerberus debug level to decide whether or not
to print symbols with an "_{<num>}" suffix, and 9b) take an optional
named argument to control that instead.

This commit updates the CN usage of that API, and fixes a solver crash
in doing so. This is because the SMTLib2 simple-symbol token does not
accept braces as part of symbol names (it does as part of names quoted
with a |_| but that would have made the SMT output more noisy and harder
to read or the code more complex to check whether to escape or not).
It does so by using a separate API which never prints the
number-in-braces prefix for the uses in the solver, even if the flag for
doing so is set for CN.

It also does the same for auto-generated variables for unpacking
predicates and function calls, created in check.ml/typing.ml.

I also suspect a similar bug may affect the Coq output, and so that too
will be changed.
Not clear if this makes a observale difference with the current features
but it reduces the frontend API exposure surface.
@dc-mak dc-mak force-pushed the fix-crash-on-high-debug branch from d7880f0 to 9598b4d Compare March 24, 2025 22:59
@dc-mak dc-mak marked this pull request as ready for review March 25, 2025 09:49
@dc-mak dc-mak merged commit fc13c41 into rems-project:main Mar 25, 2025
3 checks passed
@dc-mak dc-mak deleted the fix-crash-on-high-debug branch March 25, 2025 09:54
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.

1 participant