Abstract
We propose a new library to model and verify hardware circuits in the Coq proof assistant. This library allows one to easily build circuits by following the usual pen-and-paper diagrams. We define a deep-embedding: we use a (dependently typed) data-type that models the architecture of circuits, and a meaning function. We propose tactics that ease the reasoning about the behavior of the circuits, and we demonstrate that our approach is practicable by proving the correctness of various circuits: a text-book divide and conquer adder of parametric size, some higher-order combinators of circuits, and some sequential circuits: a buffer, and a register.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aho, A.V., Ullman, J.D.: Foundations of Computer Science. Computer Science Press, W. H. Freeman and Company (1992)
Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: Hardware Design in Haskell. In: Proc. ICFP, pp. 174–184. ACM Press (1998)
Braibant, T.: http://sardes.inrialpes.fr/~braibant/coquet (June 2011)
Brock, B., Hunt Jr., W.A.: The DUAL-EVAL Hardware Description Language and Its Use in the Formal Specification and Verification of the FM9001 Microprocessor. Formal Methods in System Design 11(1), 71–104 (1997)
Brown, C., Hutton, G.: Categories, allegories and circuit design. In: Proc. LICS, pp. 372–381. IEEE Computer Society (1994)
Coupet-Grimal, S., Jakubiec, L.: Certifying circuits in type theory. Formal Asp. Comput. 16(4), 352–373 (2004)
Ghica, D.R.: Geometry of synthesis: a structured approach to VLSI design. In: Proc. POPL, pp. 363–375 (2007)
Gonthier, G., Mahboubi, A.: An introduction to small scale reflection in Coq. Journal of Formalized Reasoning 3(2), 95–152 (2010)
Gordon, M.: Why Higher-Order Logic is a Good Formalism for Specifying and Verifying Hardware. Technical Report UCAM-CL-TR-77, Cambridge Univ., Computer Lab (1985)
Hanna, F.K., Daeche, N., Longley, M.: Veritas + : A Specification Language Based on Type Theory. In: Leeser, M., Brown, G. (eds.) Hardware Specification, Verification and Synthesis: Mathematical Aspects. LNCS, vol. 408, pp. 358–379. Springer, Heidelberg (1990)
Harrison, J.: A HOL Theory of Euclidean Space. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 114–129. Springer, Heidelberg (2005)
Hinze, R.: An Algebra of Scans. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 186–210. Springer, Heidelberg (2004)
Iyoda, J.: Translating HOL functions to hardware. Technical Report UCAM-CL-TR-682, Cambridge Univ., Computer Lab (April 2007)
Hunt Jr., W.A., Brock, B.: The Verification of a Bit-slice ALU. In: Leeser, M., Brown, G. (eds.) Hardware Specification, Verification and Synthesis: Mathematical Aspects. LNCS, vol. 408, pp. 282–306. Springer, Heidelberg (1990)
Lafont, Y.: Towards an algebraic theory of boolean circuits. Journal of Pure and Applied Algebra 184, 257–310 (2003)
Leroy, X.: A formally verified compiler back-end. Journal of Automated Reasoning 43(4), 363–446 (2009)
Melham, T.: Higher Order Logic and Hardware Verification. Cambridge Tracts in Theoretical Computer Science, vol. 31. Cambridge University Press (1993)
Paulin-Mohring, C.: Circuits as Streams in Coq: Verification of a Sequential Multiplier. In: Berardi, S., Coppo, M. (eds.) TYPES 1995. LNCS, vol. 1158, pp. 216–230. Springer, Heidelberg (1996)
Sheeran, M.: μFP, A Language for VLSI Design. In: LISP and Functional Programming, pp. 104–112 (1984)
Sheeran, M.: Hardware Design and Functional Programming: a Perfect Match. J. UCS 11(7), 1135–1158 (2005)
Slind, K., Owens, S., Iyoda, J., Gordon, M.: Proof producing synthesis of arithmetic and cryptographic hardware. Formal Asp. Comput. 19(3), 343–362 (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Braibant, T. (2011). Coquet: A Coq Library for Verifying Hardware. In: Jouannaud, JP., Shao, Z. (eds) Certified Programs and Proofs. CPP 2011. Lecture Notes in Computer Science, vol 7086. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-25379-9_24
Download citation
DOI: https://doi.org/10.1007/978-3-642-25379-9_24
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-25378-2
Online ISBN: 978-3-642-25379-9
eBook Packages: Computer ScienceComputer Science (R0)