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 verification with usize/isize #316

Open
eternaleye opened this issue Jan 22, 2017 · 0 comments
Open

Support verification with usize/isize #316

eternaleye opened this issue Jan 22, 2017 · 0 comments

Comments

@eternaleye
Copy link

eternaleye commented Jan 22, 2017

One valid approach would be checking that the verification holds for all instantiations of (usize, isize) as (u16, i16), (u32, i32), (u64, i64), and (once [iu]usize supports it, since the integer types have landed) (u128, i128).

This potentially multiplies verification runtime by three, but as this only applies to functions which currently cannot be verified (those which use usize or isize) this seems relatively minor.

More concretely:

  1. If S or Q contains values of type usize or isize, generate a list of (S, Q)_{i6,32,64} pairs, and calculate the corresponding weakest postcondition for each
  2. If neither contains such values, simply generate a single weakest postcondition (as now)
  3. If P contains values of type usize or isize and multiple weakest postconditions were generated, generate a list of P_{16,32,64}, and prove that for all X in {16, 32, 64}, P_X -> WP_X
  4. If P contains values of type usize or isize and only one weakest postcondition was generated, generate a list of P_{16,32,64} and show that for all X in {16, 32, 64}, P_X -> WP
  5. If P does not contain values of type usize or isize, then show that all weakest postconditions are implied by the precondition.
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

No branches or pull requests

1 participant