Abstract
The construction of correct software, i.e. a computer program that meets a given specification, is an important goal in Computer Science. Nowadays, not only critical software (the ones used in aircraft, hospitals, banks, etc.) is supposed to provide additional guarantees of its correctness. Nevertheless, this is not an easy task because proofs are often long and full of details. In this sense, a strong background in logical deduction is essential to provide Computer Science (CS) professionals the necessary competencies to understand and provide mathematical proofs of their programs. Logic courses for CS tend to follow old precepts without emphasizing mastering deduction itself. In our institution, for several years we have followed a more pragmatical approach, in which the foundational aspects of both natural deduction and deduction à la Gentzen are taught and, in parallel, the operational premises of deduction are put into practice in proof assistants. Thus, CS students with a minimum knowledge in programming are challenged on providing correctness certificates for simple algorithms. “Putting their hands in the dough” they acquire a better understanding of the value and importance of deductive technologies in computing. Here we show how this is done relating natural deduction and sequent calculus deduction and using the proof assistant PVS in the simple context of a library of sorting algorithms.
Work supported by FAPDF grant 193001369/2016.
M. Ayala-Rincón—Partially supported by CNPq grant 307672/2017-4.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
This is a sixteen week (sixty four hour) course exceeding the contents of Basic Logic and whose requirements are courses on Data Structures and/or Discrete Structures according to the CS ACM curricula recommendation. Students typically attend this course on Computational Logic after the third semester and, after attending courses on integral and differential calculus, and algebra.
References
Aczel, J., Fung, P., Bornat, R., Oliver, M., O’Shea, T., Sufrin, B.: Using computers to learn logic: undergraduates’ experiences. In: Advanced Research in Computers and Communications in Education, pp. 875–882 (1999)
Almeida, A.A., Rocha-Oliveira, A.C., Ramos, T.M.F., de Moura, F.L.C., Ayala-Rincón, M.: sorting: a PVS Theory for sorting algorithms (2019). https://github.com/nasa/pvslib/tree/master/sorting - NASA Langley Research Center PVS libraries. Accessed Aug 2019
Ayala-Rincón, M., de Moura, F.L.C.: Applied Logic for Computer Scientists: Computational Deduction and Formal Proofs. UTCS. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-51653-0
Barwise, J., Etchemendy, J.: The Language of First-Order Logic Including the Macintosh Version of Tarski’s World 4.0. Monograph Collection (1993)
Bornat, R., Sufrin, B.: Jape: a calculator for animating proof-on-paper. In: McCune, W. (ed.) CADE 1997. LNCS, vol. 1249, pp. 412–415. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-63104-6_41
Chlipala, A.: Certified Programming with Dependent Types. MIT Press, Cambridge (2017)
Constable, R.L.: Formal systems, logics, and programs. In: Fitting, M., Rayman, B. (eds.) Raymond Smullyan on Self Reference. OCL, vol. 14, pp. 23–38. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-68732-2_2
Dillinger, P.C., Manolios, P., Vroon, D., Moore, J.S.: ACL2s: The ACL2 Sedan. In 29th International Conference on Software Engineering ICSE, pp. 59–60. IEEE CS (2007)
Ehle, A., Hundeshagen, N., Lange, M.: The sequent calculus trainer - helping students to correctly construct proofs. In: Fourth Internation Conference on Tools for Teaching Logic TTL (2015). https://arxiv.org/abs/1507.03666
Gasquet, O., Schwarzentruber, F., Strecker, M.: Panda: a proof assistant in natural deduction for all. A gentzen style proof assistant for undergraduate students. In: Blackburn, P., van Ditmarsch, H., Manzano, M., Soler-Toscano, F. (eds.) TICTTL 2011. LNCS (LNAI), vol. 6680, pp. 85–92. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21350-2_11
Huertas, A.: Ten years of computer-based tutors for teaching logic 2000–2010: lessons learned. In: Blackburn, P., van Ditmarsch, H., Manzano, M., Soler-Toscano, F. (eds.) TICTTL 2011. LNCS (LNAI), vol. 6680, pp. 131–140. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21350-2_16
Kaliszyk, C., Wiedijk, F., Hendriks, M., van Raamsdonk, F.: Teaching logic using a state-of-the-art proof assistant. In: Formal Methods in Computer Science Education FORMED, Satellite workshop of ETAPS 2008, pp. 111–120 (2008)
Lévy, M., Trilling, L.: A PVS-based approach for teaching constructing correct iterations. In: Wing, J.M., Woodcock, J., Davies, J. (eds.) FM 1999. LNCS, vol. 1709, pp. 1859–1860. Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48118-4_52
Owre, S., Rushby, J.M., Shankar, N.: PVS: a prototype verification system. In: Kapur, D. (ed.) CADE 1992. LNCS, vol. 607, pp. 748–752. Springer, Heidelberg (1992). https://doi.org/10.1007/3-540-55602-8_217
Owre, S., Shankar, N.: The formal semantics of PVS. Technical Report CR-1999-209321, NASA Scientific and Technical Information (STI) (1999)
Pierce, B.C.: Lambda, the Ultimate TA: Using a Proof Assistant to Teach Programming Language Foundations. In: SIGPLAN Not., pp. 121–122 (2009)
Pierce, B.C., et al.: Software Foundations. Electronic textbook (2014). https://softwarefoundations.cis.upenn.edu
Ranta, A.: PESCA - A Proof Editor for Sequent Calculus (2000). http://www.cse.chalmers.se/~aarne/old/pesca
Seligman, J., Thompson, D.: Teaching natural deduction in the right order with natural deduction planner. In: TTL (2015). https://arxiv.org/abs/1507.03681
Spichkova, M.: “Boring Formal Methods” or “Sherlock Holmes Deduction Methods”? In: Milazzo, P., Varró, D., Wimmer, M. (eds.) STAF 2016. LNCS, vol. 9946, pp. 242–252. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-50230-4_18
Terrematte, P., Marcos, J.: TryLogic tutorial: an approach to Learning Logic by proving and refuting. TTL (2015). https://arxiv.org/abs/1507.03685
Troelstra, A.S., Schwichtenberg, H.: Basic Proof Theory. Cambridge UP, Cambridge (2000)
Walther, C., Schweitzer, S.: Verification in the classroom. J. Autom. Reasoning 32(1), 35–73 (2004)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Almeida, A.A., Rocha-Oliveira, A.C., Ramos, T.M.F., de Moura, F.L.C., Ayala-Rincón, M. (2019). The Computational Relevance of Formal Logic Through Formal Proofs. In: Dongol, B., Petre, L., Smith, G. (eds) Formal Methods Teaching. FMTea 2019. Lecture Notes in Computer Science(), vol 11758. Springer, Cham. https://doi.org/10.1007/978-3-030-32441-4_6
Download citation
DOI: https://doi.org/10.1007/978-3-030-32441-4_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-32440-7
Online ISBN: 978-3-030-32441-4
eBook Packages: Computer ScienceComputer Science (R0)