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

Support imaxabs for SV-COMP #1519

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Support imaxabs for SV-COMP #1519

wants to merge 5 commits into from

Conversation

sim642
Copy link
Member

@sim642 sim642 commented Jun 20, 2024

This extends #1254 to support imaxabs on the intmax_t type, which some Juliet tasks in SV-COMP use.

Changes

Actually verifying those Juliet tasks required a bit more changes:

  1. The type (and thus ikind) of intmax_t is looked up from the typedef in the program. So this can bypass make sizes of primitive types configurable with current machine as default #54.
  2. ana.float.evaluate_math_functions is enabled in svcomp24 and svcomp confs. We used the C stubs to evaluate sqrt and friends in SV-COMP 2024, but More precise abstractions of trigonometric functions using c-stubs #1277 added this option, which is off by default. So right now we couldn't even solve the similar tasks on smaller types that we could verify at SV-COMP 2024. I don't know if this will be a problem for soundness in SV-COMP. If so, then we'll need some non-stub implementation of floating point sqrt to solve these tasks, of which there is a lot of.
  3. Casts around the refinement are somehow different in these tasks, which required handling of float-integer casts in BaseInvariant. I don't know if this is correct because previously only various float-float casts were supported and everything else was considered "incompatible types". It's not clear whether these are supposed to be impossible in the AST according to the standard or just were unsupported in the initial implementation.

TODO

  • Fix MacOS.

@sim642 sim642 added feature sv-comp SV-COMP (analyses, results), witnesses precision labels Jun 20, 2024
@sim642 sim642 added this to the SV-COMP 2025 milestone Jun 20, 2024
@@ -785,7 +785,8 @@ struct
| TFloat (fk, _), FLongDouble
| TFloat (FDouble as fk, _), FDouble
| TFloat (FFloat as fk, _), FFloat -> inv_exp (Float (FD.cast_to fk c)) e st
| _ -> fallback (fun () -> Pretty.text "CastE: incompatible types") st)
| TInt (ik, _), _ -> inv_exp (Int (FD.to_int ik c)) e st (* TODO: is this cast refinement correct? *)
Copy link
Member

Choose a reason for hiding this comment

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

Potentially dubious...

@sim642 sim642 marked this pull request as draft July 5, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature precision sv-comp SV-COMP (analyses, results), witnesses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants