Logic provides the mathematical basis for hardware design and software development. In fact, digital circuits and computer programs are logic formulas expressed in a formal language. Accordingly, educated computer scientists should have experience in reasoning about the formulas that their digital circuits and programs represent. An exemplary way to get this experience is to use computational logic in support of such reasoning. This paper searches the typical undergraduate curriculum in computer science for opportunities to include material on computational logic in the context of hardware and software design and implementation. It explains how computational logic has been included as an element of two courses required in most computer science programs. It discusses some successes and a few missteps that the author has experienced over the past nine years in developing this material and using it in the classroom, and it suggests opportunities for similar efforts in other courses.
Categories and Subject Descriptors
General TermsDesign, Reliability, Languages, Verification.
KeywordsFormal methods, theorem provers, ACL2, software engineering, computer science curriculum.
RATIONALELogic provides the mathematical basis for hardware design and software development. In fact, digital circuits and computer programs are logic formulas expressed in a formal language.Accordingly, educated computer scientists should have experience in reasoning about the formulas that their digital circuits and programs represent. An exemplary way to get this experience is to use computational logic in support of such reasoning.Using ACL2 [10] as a computational logic engine for exposing students to this technology provides some advantages over other choices. It employs the widely used syntax of Common Lisp and smoothly integrates its theorem proving system within this syntax. This is important because it alleviates problems that come with introducing radically new elements into the curriculum. One such problem is resistance from students, computer science faculties, and outside advisors of academic programs. A programming notation in widespread use over a long period is easier to sell than one that has seen less use. Practical applications of ACL2 in industry and government are important in this regard.Another problem has to do with the steepness of the learning curve. Many computational logic systems require a substantial investment of intense study before they begin to pay off. ACL2 presents a relatively simple basis for stating properties of software (and of hardware models), one that most students recognize from their knowledge of predicate calculus. Furthermore, the reasoning engine of ACL2 automatically generates inductive proofs of many correctness properties. This makes it possible for students to succeed early. Once they understand how to state properties as formulas in logic, ACL2 delivers proofs of many of those properties without assistance.The following sections describe experience with computational logic in three cou...