Skip to main content

Proof–Based Synthesis of Sorting Algorithms for Trees

  • Conference paper
  • First Online:
Language and Automata Theory and Applications (LATA 2016)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9618))

Included in the following conference series:

Abstract

We develop various proof techniques for the synthesis of sorting algorithms on binary trees, by extending our previous work on the synthesis of algorithms on lists. Appropriate induction principles are designed and various specific prove-solve methods are experimented, mixing rewriting with assumption-based forward reasoning and goal-based backward reasoning à la Prolog. The proof techniques are implemented in the Theorema system and are used for the automatic synthesis of several algorithms for sorting and for the auxiliary functions, from which we present few here. Moreover we formalize and check some of the algorithms and some of the properties in the Coq system.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    The square brackets have been used for function and predicate applications instead of round brackets.

  2. 2.

    https://www.risc.jku.at/research/theorema/software/.

  3. 3.

    Each predicate and function symbol applies to a certain combination of types of argument.

  4. 4.

    The full Coq script is available at: http://web.info.uvt.ro/~idramnesc/LATA2016/coq.v.

References

  1. Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)

    Book  Google Scholar 

  2. Back, R.J., von Wright, J.: Refinement Calculus. Springer Verlag, New York (1998)

    Book  MATH  Google Scholar 

  3. Bertot, Y., Casteran, P.: Interactive theorem proving and program development Coq’Art: the calculus of inductive constructions. Texts in Theoretical Computer Science An EATCS, vol. XXV. Springer, Heidelberg (2004)

    Book  Google Scholar 

  4. Buchberger, B., Craciun, A., Jebelean, T., Kovacs, L., Kutsia, T., Nakagawa, K., Piroi, F., Popov, N., Robu, J., Rosenkranz, M., Windsteiger, W.: Theorema: towards computer-aided mathematical theory exploration. J. Appl. Logic 4(4), 470–504 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  5. Bundy, A., Dixon, L., Gow, J., Fleuriot, J.: Constructing induction rules for deductive synthesis proofs. Electron. Notes Theor. Comput. Sci. 153, 3–21 (2006)

    Article  Google Scholar 

  6. Cohen, C., Dénès, M., Mörtberg, A.: Refinements for free!. In: Gonthier, G., Norrish, M. (eds.) CPP 2013. LNCS, vol. 8307, pp. 147–162. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  7. Delaware, B., Claudel, C.P., Gross, J., Chlipala, A.: Fiat: deductive synthesis of abstract data types in a proof assistant. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, pp. 689–700. ACM, New York (2015)

    Google Scholar 

  8. Dramnesc, I., Jebelean, T.: Synthesis of list algorithms by mechanical proving. J. Symbolic Comput. 68, 61–92 (2015)

    Article  MathSciNet  Google Scholar 

  9. Dramnesc, I., Jebelean, T., Stratulat, S.: Synthesis of some algorithms for trees: experiments in Theorema. Technical report 15–04, RISC Report Series, Johannes Kepler University, Linz, Austria (2015)

    Google Scholar 

  10. Dramnesc, I., Jebelean, T., Stratulat, S.: Theory exploration of binary trees. In: 13th IEEE International Symposium on Intelligent Systems and Informatics (SISY 2015), pp. 139–144. IEEE Publishing (2015)

    Google Scholar 

  11. Dramnesc, I., Jebelean, T., Stratulat, S.: Combinatorial techniques for proof-based synthesis of sorting algorithms. In: Proceedings of the 17th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, SYNASC 2015 (to appear)

    Google Scholar 

  12. Gulwani, S.: Dimensions in program synthesis. In: Proceedings of the 12th International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming, PPDP 2010, pp. 13–24. ACM, New York (2010)

    Google Scholar 

  13. Kneuss, E., Kuraj, I., Kuncak, V., Suter, P.: Synthesis modulo recursive functions. In: Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2013, pp. 407–426. ACM, New York (2013)

    Google Scholar 

  14. Knuth, D.E.: The Art of Computer Programming, Volume 3: Sorting and Searching, 2nd edn. Addison Wesley Longman Publishing, Redwood City (1998)

    Google Scholar 

  15. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  16. Smith, D.R.: Generating programs plus proofs by refinement. In: Meyer, B., Woodcock, J. (eds.) VSTTE 2005. LNCS, vol. 4171, pp. 182–188. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  17. Stratulat, S.: A unified view of induction reasoning for first-order logic. In: Voronkov, A. (ed.) Turing-100 (The Alan Turing Centenary Conference). EPiC Series, vol. 10, pp. 326–352. EasyChair (2012)

    Google Scholar 

  18. Stratulat, S.: Mechanically certifying formula-based noetherian induction reasoning. J. Symbolic Comput. (accepted). http://lita.univ-lorraine.fr/~stratula/jsc2016.pdf

  19. Wirth, N.: Program development by stepwise refinement. Commun. ACM 14(4), 221–227 (1971)

    Article  MATH  Google Scholar 

  20. Wolfram, S.: The Mathematica Book. Wolfram Media Inc., Champaign (2003)

    Google Scholar 

Download references

Acknowledgments

Isabela Drămnesc: This work was partially supported by the strategic grant POSDRU/159/1.5/S/137750, Project Doctoral and Postdoctoral programs support for increased competitiveness in Exact Sciences research cofinanced by the European Social Fund within the Sectoral Operational Programme Human Resources Development 2007–2013.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sorin Stratulat .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Drămnesc, I., Jebelean, T., Stratulat, S. (2016). Proof–Based Synthesis of Sorting Algorithms for Trees. In: Dediu, AH., Janoušek, J., Martín-Vide, C., Truthe, B. (eds) Language and Automata Theory and Applications. LATA 2016. Lecture Notes in Computer Science(), vol 9618. Springer, Cham. https://doi.org/10.1007/978-3-319-30000-9_43

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-30000-9_43

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-29999-0

  • Online ISBN: 978-3-319-30000-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics