Fast machine words in
λ → ∀
=
I s a b e l l e
β α
H O L
Andreas Lochbihler
Digital Asset (Switzerland) GmbH
Fast machine words in I = Andreas Lochbihler Digital - - PowerPoint PPT Presentation
e H l O l L e b a s Fast machine words in I = Andreas Lochbihler Digital Asset (Switzerland) GmbH e H O l l L e b Code generation in a s I = code executable generator
λ → ∀
=
I s a b e l l e
β α
H O L
Digital Asset (Switzerland) GmbH
λ → ∀
=
I s a b e l l e
β α
H O L
2
λ → ∀
=
I s a b e l l e
β α
H O L
3
λ → ∀
=
I s a b e l l e
β α
H O L
4
λ → ∀
=
I s a b e l l e
β α
H O L
5
λ → ∀
=
I s a b e l l e
β α
H O L
6
λ → ∀
=
I s a b e l l e
β α
H O L
7
λ → ∀
=
I s a b e l l e
β α
H O L
8
9
10
11
12
13
14
15
definition divmod-abs x y = (|x| div |y| , |x| mod |y|)
lemma [code]: divmod x y = . . . if sgn x = sgn y then divmod-abs x y else . . .
code-printing divmod-abs → (Haskell) divMod (abs ) (abs
)
(OCaml) . . . (Scala) . . . (SML) . . .
16
definition divmod-abs x y = (|x| div |y| , |x| mod |y|)
lemma [code]: divmod x y = . . . if sgn x = sgn y then divmod-abs x y else . . .
code-printing divmod-abs → (Haskell) divMod (abs ) (abs
)
(OCaml) . . . (Scala) . . . (SML) . . .
17
definition divmod-abs x y = (|x| div |y| , |x| mod |y|)
lemma [code]: divmod x y = . . . if sgn x = sgn y then divmod-abs x y else . . .
code-printing divmod-abs → (Haskell) divMod (abs ) (abs
)
(OCaml) . . . (Scala) . . . (SML) . . .
definition uint32-div x y = . . . definition uint32-sdiv x y = . . .
lemma [code]: div x y = . . . uint32-div . . . uint32-div x y = . . . uint32-sdiv . . .
code-printing uint32-div → (Haskell) Prelude.div code-printing uint32-sdiv → (OCaml) Int32.div code-printing . . . → . . .
definition divmod-abs x y = (|x| div |y| , |x| mod |y|)
lemma [code]: divmod x y = . . . if sgn x = sgn y then divmod-abs x y else . . .
code-printing divmod-abs → (Haskell) divMod (abs ) (abs
)
(OCaml) . . . (Scala) . . . (SML) . . .
definition uint32-div x y = . . . definition uint32-sdiv x y = . . .
lemma [code]: div x y = . . . uint32-div . . . uint32-div x y = . . . uint32-sdiv . . .
code-printing uint32-div → (Haskell) Prelude.div code-printing uint32-sdiv → (OCaml) Int32.div code-printing . . . → . . .
19
20
22
23
24
25
26
27
◮ hashing ◮ bit vectors ◮ dynamic implementation choices based on input size
28
◮ Framework to run test cases from within Isabelle/HOL
29
◮ Framework to run test cases from within Isabelle/HOL
◮ Test cases for all operations on uint∗
30
◮ Framework to run test cases from within Isabelle/HOL
◮ Test cases for all operations on uint∗ ◮ Revealed many errors in the FFI mapping – now fixed ◮ Found one error in PolyML 5.6 in 64-bit mode – fixed in 5.7
31
◮ IsaFoR (Berlekamp-Zassenhaus) ◮ Fleury’s verified SAT solver ◮ CAVA model checker ◮ Z¨
32
◮ IsaFoR (Berlekamp-Zassenhaus) ◮ Fleury’s verified SAT solver ◮ CAVA model checker ◮ Z¨
33
◮ IsaFoR (Berlekamp-Zassenhaus) ◮ Fleury’s verified SAT solver ◮ CAVA model checker ◮ Z¨
34
35
36