Study of Isabelle/HOL on Formal Algorithm Analysis and Code Generation

2Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Mechanical theorem proving is especially advantageous on formal verification of algorithms manipulating complicated data structures. Some proof assistants such as Isabelle/HOL also enable users to extract executable code from verified specification, pushing the correctness assurance from algorithm level forward to code level. As a long-standing active research area, file comparison algorithms have extensive applications involving molecular biology, information processing, data retrieval and network security. In this paper, the formalization of fcomp, an efficient line oriented file comparison algorithm suggested by Miller and Myers, is modeled in the interactive theorem prover Isabelle/HOL. A small bug in fcomp's bound variable iteration is identified and the fixed algorithm's termination and correctness is established. Formal analysis of time complexity is also performed which coincides with the algorithm designers' own results. Using Isabelle's code generation tool a credible OCaml program is extracted further. This program's efficiency is compared to another hand-written OCaml program as well as to a C program through a set of experiments. Analysis results show that the generated program's efficiency still needs much improvement to be practically usable. Our work lays foundation for subsequent rigorous check of more file comparison algorithms.

Cite

CITATION STYLE

APA

Wang, H., & Song, L. (2021). Study of Isabelle/HOL on Formal Algorithm Analysis and Code Generation. IEEE Access, 9, 25002–25013. https://doi.org/10.1109/ACCESS.2021.3057398

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free