Abstract
Logic is the basis for almost all formal methods in computer science. In this chapter, we introduce some of the most commonly used logics by examples. It serves as a reference for subsequent chapters. We start with propositional logic, introduce its syntax, semantics, and calculus. Then we extend our view of propositional logic as a so-called institution, discuss model transformations and modular specifications. Subsequently, we turn to first- and second-order logic and show how these can be obtained as natural extensions of propositional logic. Finally, we discuss non-classical logics: multimodal and deontic logics to deal with alternative and subjective viewpoints, respectively, and dynamic and temporal logics for reasoning about time. The chapter concludes with an elaborate example of how to transform an informal natural language description into a formal specification in linear temporal logic.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Change history
20 December 2022
.
Notes
- 1.
Here, we use the symbol \(\Vdash \) for the semantic consequence relation between formulae, which is different from the symbol \(\models \) for the satisfaction relation between a model and a formula. For universal validity, the notions coincide: \(\models \varphi \) if and only if \(\{\}\Vdash \varphi \).
- 2.
In this book, the words “sort” and “type” are mutually exchangeable. Historically, logicians prefer the word “type”, whereas computer scientists prefer to use the word “sort”.
- 3.
In Casl, the word “predicate” is used instead of the word “relation”. Thus, in algebraic specifications we will use the words “relation” and “predicate” interchangeably.
- 4.
Due to this axiom, the logic sometimes is called “modal logic K".
- 5.
Some authors and most tools use F and G as a notation instead of \(\Diamond \) and \(\square \). In some papers, F and G are used in addition to \(\Diamond \) and \(\square \), which then have a different meaning.
- 6.
Some authors write \(\textbf{X}\varphi \) instead of \(\bigcirc \varphi \).
References
Samson Abramsky, Dov M. Gabbay, and T. S. E. Maibaum, editors. Handbook of Logic in Computer Science (Vol. 3): Semantic Structures. Oxford University Press, Inc., 1995.
A. Biere, A. Biere, M. Heule, H. van Maaren, and T. Walsh. Handbook of Satisfiability: Volume 185 Frontiers in Artificial Intelligence and Applications. IOS Press, NLD, 2009.
Patrick Blackburn, Maarten de Rijke, and Yde Venema. Modal Logic, volume 53 of Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2001.
Christel Baier and Joost-Pieter Katoen. Principles of model checking. MIT Press, 2008.
Michel Bidoit and Peter D. Mosses. CASL User Manual – Introduction to Using the Common Algebraic Specification Language. Springer, 2004.
George Boole. The Mathematical Analysis of Logic: Being an Essay Towards a Calculus of Deductive Reasoning. Cambridge Library Collection - Mathematics. Cambridge University Press, 1847.
J.A. Bergstra and J.V. Tucker. Algebraic specifications of computable and semicomputable data types. Theoretical Computer Science, 50(2):137–181, 1987.
Patrick Blackburn, J. F. A. K. van Benthem, and Frank Wolter, editors. Handbook of Modal Logic, volume 3 of Studies in logic and practical reasoning. North-Holland, 2007.
Edmund M. Clarke, Orna Grumberg, and Doron A. Peled. Model checking. MIT Press, 2001.
Roderick M. Chisholm. Contrary-to-duty imperatives and deontic logic. Analysis, 24:33–36, 1963.
A. Church. Introduction to Mathematical Logic. Annals of Mathematics Studies. Princeton University Press, reprint, revised edition, 1996.
Edmund M. Clarke, Thomas A. Henzinger, Helmut Veith, and Roderick Bloem, editors. Handbook of Model Checking. Springer, 2018.
Edsger W. Dijkstra. Hierarchical ordering of sequential processes. Acta Informatica, 1:115–138, 1971.
José Luiz Fiadeiro. Categories for software engineering. Springer, 2005.
Peter Forrest. The Identity of Indiscernibles. In Edward N. Zalta, editor, The Stanford Encyclopedia of Philosophy. Metaphysics Research Lab, Stanford University, winter 2016 edition, 2016.
J.A. Goguen and R.M. Burstall. Institutions: Abstract model theory for specification and programming. Journal of the ACM, 39:95–146, 1992.
Dov M. Gabbay and Franz Guenthner, editors. Handbook of Philosophical Logic, volume 11. Springer, 2004.
Dov M. Gabbay and John Woods, editors. Handbook of the History of Logic, volume 5. Elsevier, 2009.
David Harel, Jerzy Tiuryn, and Dexter Kozen. Dynamic Logic. MIT Press, Cambridge, MA, USA, 2000.
Johan Anthony Willem Kamp. Tense logic and the theory of linear order, 1968. PhD Thesis.
Fred Kröger and Stephan Merz. Temporal Logic and State Systems. Texts in Theoretical Computer Science. An EATCS Series. Springer, 2008.
Saul Kripke. A completeness theorem in modal logic. J. Symb. Log., 24(1):1–14, 1959.
Fred Kröger. Logical rules of natural reasoning about programs. In Third International Colloquium on Automata, Languages and Programming, pages 87–98. Edinburgh University Press, 1976.
Peter D. Mosses. CoFI: The common framework initiative for algebraic specification and development. In TAPSOFT’97, LNCS 1214, pages 115–137. Springer, 1997.
Peter D. Mosses. CASL Reference Manual: The Complete Documentation Of The Common Algebraic Specification Language. Springer, 2004.
Zohar Manna and Amir Pnueli. Temporal Logic of Reactive and Concurrent Systems: Specification, The. Springer-Verlag New York, Inc., 1992.
Till Mossakowski, Lutz Schröder, Markus Roggenbach, and Horst Reichel. Algebraic-coalgebraic specification in CoCasl. J. Log. Algebraic Methods Program., 67(1-2):146–197, 2006.
Process analysis toolkit (PAT) 3.5 user manual, 2012. https://www.comp.nus.edu.sg/~pat/OnlineHelp/index.htm.
Process analysis toolkit (PAT) 3.5 user manual, 2020. https://pat.comp.nus.edu.sge.
Doron A. Peled, David Gries, and Fred B. Schneider. Software Reliability Methods. Springer-Verlag, 2001.
Amir Pnueli. The temporal logic of programs. In FOCS’77, pages 46–57. IEEE Computer Society Press, 1977.
Raymond R. Smullyan. First-Order Logic, volume 43 of Ergebnisse der Mathematik und ihrer Grenzgebiete. 2. Folge. Springer, 1968.
Volkswagen, https://www.volkswagen.co.uk/en/configurator.html, Last accessed: August 2021.
Georg Henrik Von Wright. Deontic logic. Mind, 60:1–15, 1951.
Georg Henrik Von Wright. Deontic logic: A personal view. Ratio Juris, 12(1):26–38, 1999.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Schlingloff, BH., Roggenbach, M., Schneider, G., Cerone, A. (2022). Logics for Software Engineering. In: Formal Methods for Software Engineering. Texts in Theoretical Computer Science. An EATCS Series. Springer, Cham. https://doi.org/10.1007/978-3-030-38800-3_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-38800-3_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-38799-0
Online ISBN: 978-3-030-38800-3
eBook Packages: Computer ScienceComputer Science (R0)