FLOC 2018: FEDERATED LOGIC CONFERENCE 2018
Fast machine words in Isabelle/HOL

Author: Andreas Lochbihler

Paper Information

Title:Fast machine words in Isabelle/HOL
Authors:Andreas Lochbihler
Proceedings:ITP Papers
Editors: Jeremy Avigad and Assia Mahboubi
Keywords:code generation, machine words, model-based testing, Isabelle/HOL, validation
Abstract:

ABSTRACT. Code generated from a verified formalisation typically runs faster when it uses machine words instead of a syntactic representation of integers. This paper presents a library for Isabelle/HOL that links the existing formalisation of words to the machine words that the four target languages of Isabelle/HOL’s code generator provide. Our design ensures that (i) Isabelle/HOL machine words can be mapped soundly and efficiently to all target languages despite the differences in the APIs; (ii) they can be used uniformly with the three evaluation engines in Isabelle/HOL, namely code generation, normalisation by evaluation, and term rewriting; and (iii) they blend in with the existing formalisations of machine words. Several large-scale formalisation projects use our library to speed up their generated code.

To validate the unverified link between machine words in the logic and those in the target languages, we extended Isabelle/HOL with a general-purpose testing facility that compiles test cases expressed within Isabelle/HOL to the four target languages and runs them with the most common implementations of each language. When we applied this to our library of machine words, we discovered miscomputations in the 64-bit word library of one of the target-language implementations.

Pages:19
Talk:Jul 12 11:30 (Session 74C)
Paper: