Functional formal methods

  • Authors:
  • J Strother Moore

  • Affiliations:
  • University of Texas at Austin, Austin, Texas

  • Venue:
  • Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Some functional programming languages are also mathematical logics. One can reason formally, traditionally, and directly about programs in such languages. This is driving a new application area for functional programming: modeling microarchitectures, hardware design languages, and imperative programming languages. Such models serve the dual purposes of simulation and formal analysis.ACL2, "A Computational Logic for Applicative Common Lisp," is a functional programming language that is also a first-order mathematical logic supported by a Boyer-Moore style mechanical theorem prover [5]. It is being used to model and verify artifacts of commercial and industrial interest. The register-transfer level circuit descriptions for the elementary floating-point arithmetic on the AMD Athlon microprocessor were modeled in ACL2. These models were tested on millions of floating-point test vectors as part of the Athlon validation. In addition, the models were mechanically proved to satisfy the IEEE floating-point specifications. Bugs were found before fabrication. The Athlon that you buy has verified floating-point circuitry in it [7]. Avionics microprocessors produced by Rockwell Collins have been modeled in ACL2. Those models have been used as pre-fabrication simulation test benches. In addition, theorems relating various microprocessor models have been proved mechanically [3]. An executable pipeline-level model of the Motorola CAP digital signal processor was proved to implement a sequential microcode engine and microcoded DSP programs were verified [2]. An executable model of the Java Virtual Machine has been used to prove functional correctness of some simple Java classes, including a safety property for a multi-threaded class [6]..Other examples are reported in [4].Execution efficiency for industrial-scale simulators, in combination with adherence to an axiomatic semantics, has forced some novel implementation features [1]. In addition, the ACL2 theorem prover is coded in ACL2 and so represents a significant application of functional programming.