Advertisement

The Computational Relevance of Formal Logic Through Formal Proofs

  • Ariane A. Almeida
  • Ana Cristina Rocha-Oliveira
  • Thiago M. Ferreira Ramos
  • Flávio L. C. de Moura
  • Mauricio Ayala-RincónEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11758)

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.

References

  1. 1.
    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)Google Scholar
  2. 2.
    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
  3. 3.
    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-0CrossRefzbMATHGoogle Scholar
  4. 4.
    Barwise, J., Etchemendy, J.: The Language of First-Order Logic Including the Macintosh Version of Tarski’s World 4.0. Monograph Collection (1993)Google Scholar
  5. 5.
    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_41CrossRefGoogle Scholar
  6. 6.
    Chlipala, A.: Certified Programming with Dependent Types. MIT Press, Cambridge (2017)zbMATHGoogle Scholar
  7. 7.
    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_2CrossRefGoogle Scholar
  8. 8.
    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)Google Scholar
  9. 9.
    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
  10. 10.
    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_11CrossRefGoogle Scholar
  11. 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_16CrossRefGoogle Scholar
  12. 12.
    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)Google Scholar
  13. 13.
    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_52CrossRefGoogle Scholar
  14. 14.
    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_217CrossRefGoogle Scholar
  15. 15.
    Owre, S., Shankar, N.: The formal semantics of PVS. Technical Report CR-1999-209321, NASA Scientific and Technical Information (STI) (1999)Google Scholar
  16. 16.
    Pierce, B.C.: Lambda, the Ultimate TA: Using a Proof Assistant to Teach Programming Language Foundations. In: SIGPLAN Not., pp. 121–122 (2009)CrossRefGoogle Scholar
  17. 17.
    Pierce, B.C., et al.: Software Foundations. Electronic textbook (2014). https://softwarefoundations.cis.upenn.edu
  18. 18.
    Ranta, A.: PESCA - A Proof Editor for Sequent Calculus (2000). http://www.cse.chalmers.se/~aarne/old/pesca
  19. 19.
    Seligman, J., Thompson, D.: Teaching natural deduction in the right order with natural deduction planner. In: TTL (2015). https://arxiv.org/abs/1507.03681
  20. 20.
    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_18CrossRefGoogle Scholar
  21. 21.
    Terrematte, P., Marcos, J.: TryLogic tutorial: an approach to Learning Logic by proving and refuting. TTL (2015). https://arxiv.org/abs/1507.03685
  22. 22.
    Troelstra, A.S., Schwichtenberg, H.: Basic Proof Theory. Cambridge UP, Cambridge (2000)CrossRefGoogle Scholar
  23. 23.
    Walther, C., Schweitzer, S.: Verification in the classroom. J. Autom. Reasoning 32(1), 35–73 (2004)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  • Ariane A. Almeida
    • 1
  • Ana Cristina Rocha-Oliveira
    • 1
  • Thiago M. Ferreira Ramos
    • 1
  • Flávio L. C. de Moura
    • 1
  • Mauricio Ayala-Rincón
    • 1
    • 2
    Email author
  1. 1.Departamento de Ciência da ComputaçãoUniversidade de BrasíliaBrasíliaBrazil
  2. 2.Departamento de MatemáticaUniversidade de BrasíliaBrasíliaBrazil

Personalised recommendations