Abstract
A typed \(\lambda \)-calculus, \(\lambda ^{\cap \Box }\), is introduced, combining intersection types and modal types. We develop the metatheory of \(\lambda ^{\cap \Box }\), with particular emphasis on the theory of subtyping and distributivity of the modal and intersection type operators. We describe how a stratification of \(\lambda ^{\cap \Box }\) leads to a multi-linguistic framework for staged program synthesis, where metaprograms are automatically synthesized which, when executed, generate code in a target language. We survey the basic theory of staged synthesis and illustrate by example how a two-level language theory specialized from \(\lambda ^{\cap \Box }\) can be used to understand the process of staged synthesis.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The literature on various fragments and interpretations of modal logic is enormous, and we can not attempt here to do any justice to that broader context of related work. For the immediate context of staged computation the reader is referred to [4], and for comparison with other interpretations related to staging we refer to [5].
- 2.
In the following we will sometimes write explicit type annotations in terms in order to indicate particular typings.
- 3.
In some variants of the intersection type theory there is a special type \(\omega \) which we leave out here.
References
Jones, N.D.: Efficient algebraic operations on programs. In: Proceedings of AMAST 1992, Algebraic Methodology and Software Technology, pp. 393–420. Springer (1992)
Nielson, F., Nielson, H.R.: Two-Level Functional Languages. Cambridge University Press, New York (1992)
Barendregt, H., Coppo, M., Dezani-Ciancaglini, M.: A filter lambda model and the completeness of type assignment. J. Symb. Log. 48(4), 931–940 (1983)
Davies, R., Pfenning, F.: A modal analysis of staged computation. J. ACM 48(3), 555–604 (2001)
Pfenning, F., Davies, R.: A judgmental reconstruction of modal logic. Math. Struct. Comput. Sci. 11(04), 511–540 (2001)
Düdder, B., Martens, M., Rehof, J.: Staged composition synthesis. In: Shao, Z. (ed.) ESOP 2014 (ETAPS). LNCS, vol. 8410, pp. 67–86. Springer, Heidelberg (2014)
Rehof, J., Vardi, M.Y.: Design and synthesis from components. In: Dagstuhl Seminar 14232. Dagstuhl Reports, vol. 7941 (2014). http://dx.doi.org/10.4230/DagRep.4.6.29
Hindley, J.R., Seldin, J.P.: Lambda-Calculus and Combinators, an Introduction. Cambridge University Press, New York (2008)
Barendregt, H., Dekkers, W., Statman, R.: Lambda Calculus with Types. Perspectives in Logic. Cambridge University Press, New York (2013)
Boolos, G.: The Logic of Provability. Cambridge University Press, New York (1995)
Ghilezan, S.: Strong normalization and typability with intersection types. Notre Dame J. Form. Log. 37(1), 44–52 (1996)
Rehof, J.: Towards combinatory logic synthesis. In: BEAT 2013, 1st International Workshop on Behavioural Types. ACM (2013)
Düdder, B., Martens, M., Rehof, J., Urzyczyn, P.: Bounded combinatory logic. In: Proceedings of CSL 2012, vol. 16, pp. 243–258. LIPIcs, Schloss Dagstuhl (2012)
Statman, R.: Intuitionistic propositional logic is polynomial-space complete. Theor. Comput. Sci. 9, 67–72 (1979)
Bessai, J., Dudenhefner, A., Düdder, B., Martens, M., Rehof, J.: Combinatory logic synthesizer. In: Margaria, T., Steffen, B. (eds.) ISoLA 2014, Part I. LNCS, vol. 8802, pp. 26–40. Springer, Heidelberg (2014)
Düdder, B., Garbe, O., Martens, M., Rehof, J., Urzyczyn, P.: Using inhabitation in bounded combinatory logic with intersection types for GUI synthesis. In: Proceedings of ITRS (2012)
Düdder, B.: Automatic synthesis of component & connector-software architectures with bounded combinatory logic, Ph.D. thesis, Technische Universitt Dortmund, Fakultät fr Informatik, Dortmund (2014)
Düdder, B., Bessai, J., Dudenhefner, A., Chen, T.C., de’Liguoro, U.: Typing classes and mixins with intersection types. In: Proceedings of ITRS 2014, Intersection Types and Related Systems. EPTCS Electronic Proceedings in Theoretical Computer Science, vol. 177, pp. 79–93. Springer (2014)
Bessai, J., Dudenhefner, A., Duedder, B., De’Liguoro, U., Chen, T.C., Rehof, J.: Mixin composition synthesis based on intersection types. In: Proceedings of TLCA 2015, Typed Lambda Calculi and Applications, Warsaw, June 29–July 3 2015. To appear
Düdder, B., Heineman, G.T., Rehof, J.: Towards migrating object-oriented frameworks to enable synthesis of product line members. In: Proceedings of SPLC 2015, 19th International Software Product Line Conference: New Directions in Systems and Software Product Line Engineering. ACM International Conference Proceeding Series (2015)
Haack, C., Howard, B., Stoughton, A., Wells, J.B.: Fully automatic adaptation of software components based on semantic specifications. In: Kirchner, H., Ringeissen, C. (eds.) AMAST 2002. LNCS, vol. 2422, pp. 83–98. Springer, Heidelberg (2002)
Wells, J.B., Yakobowski, B.: Graph-based proof counting and enumeration with applications for program fragment synthesis. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 262–277. Springer, Heidelberg (2005)
Davies, R., Pfenning, F.: Intersection types and computational effects. In: ICFP, pp. 198–208 (2000)
Dezani-Ciancaglini, M., Giannini, P., Della Rocca, S.R.: Intersection, universally quantified, and reference types. In: Grädel, E., Kahle, R. (eds.) CSL 2009. LNCS, vol. 5771, pp. 209–224. Springer, Heidelberg (2009)
Dezani-Ciangaglini, M., Ronchi Della Rocca, S.: Intersection and Reference Types. Essays dedicated to Henk Barendregt on the occasion of his 60th birthday, pp. 77–86 (2007)
Rehof, J., Urzyczyn, P.: The complexity of inhabitation with explicit intersection. In: Constable, R.L., Silva, A. (eds.) Logic and Program Semantics, Kozen Festschrift. LNCS, vol. 7230, pp. 256–270. Springer, Heidelberg (2012)
Acknowledgement
The authors should like to thank Dominic Orchard, Jan Bessai, Boris Düdder and Andrej Dudenhefner for very helpful discussions and comments on the paper.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Henglein, F., Rehof, J. (2016). Modal Intersection Types, Two-Level Languages, and Staged Synthesis. In: Probst, C., Hankin, C., Hansen, R. (eds) Semantics, Logics, and Calculi. Lecture Notes in Computer Science(), vol 9560. Springer, Cham. https://doi.org/10.1007/978-3-319-27810-0_15
Download citation
DOI: https://doi.org/10.1007/978-3-319-27810-0_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-27809-4
Online ISBN: 978-3-319-27810-0
eBook Packages: Computer ScienceComputer Science (R0)