Debian Codegraph @

test-suite/primitive/sint63/signed.v

raw
1 (* This file checks that operations over sint63 are signed. *)
2 Require Import TestSuite.sint63.
3
4 Open Scope sint63_scope.
5
6 (* (0-1) must be negative 1 and not the maximum integer value *)
7
8 Check (eq_refl : divs 1 (sub 0 1) = -1).
9 Check (eq_refl (-1) <: divs 1 (sub 0 1) = -1).
10 Check (eq_refl (-1) <<: divs 1 (sub 0 1) = -1).
11 Definition compute1 := Eval compute in divs 1 (sub 0 1).
12 Check (eq_refl compute1 : -1 = -1).
13
14 Check (eq_refl : mods 3 (sub 0 1) = 0).
15 Check (eq_refl 0 <: mods 3 (sub 0 1) = 0).
16 Check (eq_refl 0 <<: mods 3 (sub 0 1) = 0).
17 Definition compute2 := Eval compute in mods 3 (sub 0 1).
18 Check (eq_refl compute2 : 0 = 0).