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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The square brackets have been used for function and predicate applications instead of round brackets.
- 2.
- 3.
Each predicate and function symbol applies to a certain combination of types of argument.
- 4.
The full Coq script is available at: http://web.info.uvt.ro/~idramnesc/LATA2016/coq.v.
References
Baader, F., Nipkow, T.: Term Rewriting and All That. Cambridge University Press, Cambridge (1998)
Back, R.J., von Wright, J.: Refinement Calculus. Springer Verlag, New York (1998)
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)
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)
Bundy, A., Dixon, L., Gow, J., Fleuriot, J.: Constructing induction rules for deductive synthesis proofs. Electron. Notes Theor. Comput. Sci. 153, 3–21 (2006)
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)
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)
Dramnesc, I., Jebelean, T.: Synthesis of list algorithms by mechanical proving. J. Symbolic Comput. 68, 61–92 (2015)
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)
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)
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)
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)
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)
Knuth, D.E.: The Art of Computer Programming, Volume 3: Sorting and Searching, 2nd edn. Addison Wesley Longman Publishing, Redwood City (1998)
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)
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)
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)
Stratulat, S.: Mechanically certifying formula-based noetherian induction reasoning. J. Symbolic Comput. (accepted). http://lita.univ-lorraine.fr/~stratula/jsc2016.pdf
Wirth, N.: Program development by stepwise refinement. Commun. ACM 14(4), 221–227 (1971)
Wolfram, S.: The Mathematica Book. Wolfram Media Inc., Champaign (2003)
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
Corresponding author
Editor information
Editors and Affiliations
Rights 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)