Abstract
This paper addresses the question “what is a digital circuit?” in relation to the fundamentally analog nature of actual (physical) circuits. A simple informal definition is given and then formalized in the proof assistant Agda. At the heart of this definition is the
timely
embedding of
discrete
information in temporally
continuous
signals. Once this embedding is defined (in constructive logic, i.e., type theory), it is extended in a generic fashion from one signal to many and from simple boolean operations (logic gates) to arbitrarily sophisticated sequential and parallel compositions, i.e., to computational circuits.
Rather than constructing circuits and
then
trying to prove their correctness, a
compositionally correct
methodology maintains specification, implementation, timing, and correctness proofs at every step. Compositionality of each aspect and of their combination is supported by a single, shared algebraic vocabulary and related by homomorphisms. After formally defining and proving these notions, a few key transformations are applied to reveal the
linearity
of circuit timing (over a suitable semiring), thus enabling practical, modular, and fully verified timing analysis as linear maps over higher-dimensional time intervals.
An emphasis throughout the paper is simplicity and generality of specification, minimizing circuit-specific definitions and proofs while highlighting a broadly applicable methodology of scalable, compositionally correct engineering through simple denotations and homomorphisms.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference39 articles.
1. Agda Team. 2022. https://github.com/agda/agda-stdlib
2. John Baez and Mike Stay. 2010. arxiv:0903.0340 New Structures for Physics. 95–172.
3. Ana Bove Peter Dybjer and Ulf Norell. 2009. http://www.cse.chalmers.se/ ulfn/papers/tphols09/tutorial.pdf Theorem Proving in Higher Order Logics.
4. Venanzio Capretta, Graham Hutton, and Mauro Jaskelioff. 2016. https://www.fceia.unr.edu.ar/ mauro/pubs/contractions.pdf Proceedings of the 28th Symposium on the Implementation and Application of Functional Programming Languages.
5. Edsger W. Dijkstra. 1972. https://www.cs.utexas.edu/ EWD/transcriptions/EWD03xx/EWD340.html Communications of the ACM, 15, 10 (1972), Turing award lecture