Essential Logic for Computer Science (The MIT Press)

Rex Page, Ruben Gamboa



An introduction to applying predicate logic to testing and verification of software and digital circuits that focuses on applications rather than theory.


Computer scientists use logic for testing and verification of software and digital circuits, but many computer science students study logic only in the context of traditional mathematics, encountering the subject in a few lectures and a handful of problem sets in a discrete math course. This book offers a more substantive and rigorous approach to logic that focuses on applications in computer science. Topics covered include predicate logic, equation-based software, automated testing and theorem proving, and large-scale computation.

Formalism is emphasized, and the book employs three formal notations: traditional algebraic formulas of propositional and predicate logic; digital circuit diagrams; and the widely used partially automated theorem prover, ACL2, which provides an accessible introduction to mechanized formalism. For readers who want to see formalization in action, the text presents examples using Proof Pad, a lightweight ACL2 environment. Readers will not become ALC2 experts, but will learn how mechanized logic can benefit software and hardware engineers. In addition, 180 exercises, some of them extremely challenging, offer opportunities for problem solving. There are no prerequisites beyond high school algebra. Programming experience is not required to understand the book's equation-based approach. The book can be used in undergraduate courses in logic for computer science and introduction to computer science and in math courses for computer science students.




本書強調形式主義,使用三種形式化符號:傳統的命題和謂詞邏輯代數公式、數位電路圖和廣泛使用的部分自動化定理證明器ACL2,為機械化形式主義提供了易於理解的入門。對於希望看到形式化實例的讀者,本書使用了Proof Pad,一個輕量級的ACL2環境。讀者不會成為ACL2專家,但將學習到機械化邏輯如何使軟體和硬體工程師受益。此外,本書提供了180個練習題,其中一些非常具有挑戰性,提供了解決問題的機會。除了高中代數,本書無需任何先備知識。不需要程式設計經驗即可理解本書的基於方程的方法。本書可用於電腦科學邏輯、計算機科學入門和電腦科學學生的數學課程。