Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-642-39038-8_2guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Feature-Oriented programming with object algebras

Published: 01 July 2013 Publication History

Abstract

Object algebras are a new programming technique that enables a simple solution to basic extensibility and modularity issues in programming languages. While object algebras excel at defining modular features, the composition mechanisms for object algebras (and features) are still cumbersome and limited in expressiveness. In this paper we leverage two well-studied type system features, intersection types and type-constructor polymorphism, to provide object algebras with expressive and practical composition mechanisms. Intersection types are used for defining expressive run-time composition operators (combinators) that produce objects with multiple (feature) interfaces. Type-constructor polymorphism enables generic interfaces for the various object algebra combinators. Such generic interfaces can be used as a type-safe front end for a generic implementation of the combinators based on reflection. Additionally, we also provide a modular mechanism to allow different forms of self-references in the presence of delegation-based combinators. The result is an expressive, type-safe, dynamic, delegation-based composition technique for object algebras, implemented in Scala, which effectively enables a form of Feature-Oriented Programming using object algebras.

References

[1]
Apel, S., Kästner, C., Grösslinger, A., Lengauer, C.: Type safety for featureoriented product lines. Automated Software Engg. 17(3) (September 2010)
[2]
Apel, S., Kastner, C., Lengauer, C.: Featurehouse: Language-independent, automated software composition. In: ICSE 2009 (2009)
[3]
Apel, S., Leich, T., Rosenmüller, M., Saake, G.: Featurec++: On the symbiosis of feature-oriented and aspect-oriented programming. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 125-140. Springer, Heidelberg (2005)
[4]
Apel, S., Leich, T., Saake, G.: Aspectual mixin layers: aspects and features in concert. In: ICSE 2006 (2006)
[5]
Apel, S., Kästner, C.: An overview of feature-oriented software development. Journal of Object Technology 8(5), 49-84 (2009)
[6]
Batory, D., Sarvela, J., Rauschmayer, A.: Scaling step-wise refinement. IEEE Trans. on Softw. Eng. 30(6), 355-371 (2004)
[7]
Böhm, C., Berarducci, A.: Automatic synthesis of typed lambda-programs on term algebras. Theor. Comput. Sci., 135-154 (1985)
[8]
Bracha, G., Ungar, D.: Mirrors: design principles for meta-level facilities of objectoriented programming languages. In: OOPSLA 2004 (2004)
[9]
Bruce, K. B., Odersky, M., Wadler, P.: A statically safe alternative to virtual types. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 523-549. Springer, Heidelberg (1998)
[10]
Carette, J., Kiselyov, O., Shan, C.C.: Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages. J. Funct. Program. 19, 509-543 (2009)
[11]
Clifton, C., Leavens, G. T., Chambers, C., Millstein, T.: MultiJava: modular open classes and symmetric multiple dispatch for java. In: OOPSLA 2000 (2000)
[12]
Compagnoni, A. B., Pierce, B.C.: Higher-order intersection types and multiple inheritance. Math. Structures Comput. Sci. 6(5), 469-501 (1996)
[13]
Cook, W. R., Palsberg, J.: A denotational semantics of inheritance and its correctness. In: OOPSLA 1989 (1989)
[14]
Cook, W. R.: Object-oriented programming versus abstract data types. In: de Bakker, J. W., Rozenberg, G., de Roever, W.-P. (eds.) REX 1990. LNCS, vol. 489, pp. 151-178. Springer, Heidelberg (1991)
[15]
Coppo, M., Dezani-Ciancaglini, M.: A new type-assignment for λ-terms. Archiv. Math. Logik 19, 139-156 (1978)
[16]
Damiani, F., Padovani, L., Schaefer, I.: A formal foundation for dynamic deltaoriented software product lines. In: GPCE 2012 (2012)
[17]
Ernst, E.: Family polymorphism. In: Lindskov Knudsen, J. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 303-326. Springer, Heidelberg (2001)
[18]
Ernst, E.: Safe dynamic multiple inheritance. Nordic J. of Computing 9(3) (2002)
[19]
Ernst, E., Ostermann, K., Cook, W. R.: A virtual class calculus. In: POPL 2006 (2006)
[20]
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addisson-Wesley professional computing series. Addisson-Wesley (1994)
[21]
van Gurp, J., Bosch, J., Svahnberg, M.: On the notion of variability in software product lines. In: Proceedings of the Working IEEE/IFIP Conference on Software Architecture (WICSA 2001). IEEE Computer Society (2001)
[22]
Guttag, J. V., Horning, J. J.: The algebraic specification of abstract data types. Acta Informatica (1978)
[23]
Harrison, W., Ossher, H.: Subject-oriented programming (A critique of pure objects). In: OOPSLA 1993 (1993)
[24]
Hinze, R.: Generics for the masses. Journal of Functional Programming 16(4-5), 451-483 (2006)
[25]
Hofer, C., Ostermann, K., Rendel, T., Moors, A.: Polymorphic embedding of DSLs. In: GPCE 2008 (2008)
[26]
Jones, P., Wollrath, A., Scheifler, R., et al.: Method and system for dynamic proxy classes, US Patent 6,877,163 (2005)
[27]
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220-242. Springer, Heidelberg (1997)
[28]
Lopez-Herrejon, R. E., Batory, D., Cook, W.: Evaluating support for features in advanced modularization technologies. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 169-194. Springer, Heidelberg (2005)
[29]
McBride, C., Paterson, R.: Applicative programming with effects. Journal of Functional Programming 18(1), 1-13 (2008)
[30]
McDirmid, S., Flatt, M., Hsieh, W.C.: Jiazzi: new-age components for old-fashioned java. In: OOPSLA 2001 (2001)
[31]
Moors, A., Piessens, F., Odersky, M.: Generics of a higher kind. In: OOPSLA 2008 (2008)
[32]
Nystrom, N., Qi, X., Myers, A.C.: J&: nested intersection for scalable software composition. In: OOPSLA 2006 (2006)
[33]
Odersky, M.: The Scala Language Specification, Version 2.9. EPFL (2011), http://www.scala-lang.org/docu/files/ScalaReference.pdf
[34]
Odersky, M., Zenger, M.: Scalable component abstractions. In: OOPSLA 2005 (2005)
[35]
Oliveira, B.C.d. S., Schrijvers, T., Cook, W. R.: Mri: Modular reasoning about interference in incremental programming. Journal of Functional Programming 22, 797-852 (2012)
[36]
Oliveira, B.C.d. S.: Modular visitor components. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 269-293. Springer, Heidelberg (2009)
[37]
Oliveira, B.C.d. S., Cook, W. R.: Extensibility for the masses: Practical extensibility with object algebras. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 2-27. Springer, Heidelberg (2012)
[38]
Oliveira, B.C.d. S., Gibbons, J.: Typecase: a design pattern for type-indexed functions. In: Haskell 2005 (2005)
[39]
Oliveira, B.C.d. S., Hinze, R., Löh, A.: Extensible and modular generics for the masses. In: Trends in Functional Programming (2006)
[40]
Oliveira, B.C.d. S., Moors, A., Odersky, M.: Type classes as objects and implicits. In: OOPSLA 2010 (2010)
[41]
Oliveira, B.C.d. S., Wang, M., Gibbons, J.: The visitor pattern as a reusable, generic, type-safe component. In: OOPSLA 2008 (2008)
[42]
Ostermann, K.: Dynamically composable collaborations with delegation layers. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 89-110. Springer, Heidelberg (2002)
[43]
Prehofer, C.: Feature-oriented programming: A fresh look at objects. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 419-443. Springer, Heidelberg (1997)
[44]
Reynolds, J.C.: User-defined types and procedural data structures as complementary approaches to type abstraction. In: Schuman, S. A. (ed.) New Directions in Algorithmic Languages, pp. 157-168 (1975)
[45]
Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19, pp. 408-425. Springer, Heidelberg (1974)
[46]
Schaefer, I., Bettini, L., Damiani, F.: Compositional type-checking for deltaoriented programming. In: AOSD 2011 (2011)
[47]
Smaragdakis, Y., Batory, D.: Implementing layered designs with mixin layers. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 550-570. Springer, Heidelberg (1998)
[48]
Tarr, P., Ossher, H., Harrison, W., Sutton Jr., S. M.: N degrees of separation: multidimensional separation of concerns. In: ICSE 1999 (1999)
[49]
Thaker, S., Batory, D., Kitchin, D., Cook, W.: Safe composition of product lines. In: GPCE 2007 (2007)
[50]
Torgersen, M.: The expression problem revisited - four new solutions using generics. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 123-146. Springer, Heidelberg (2004)
[51]
Wadler, P.: The Expression Problem. Email, discussion on the Java Genericity mailing list (November 1998)
[52]
Wehr, S., Thiemann, P.: JavaGI: The interaction of type classes with interfaces and inheritance. ACM Trans. Program. Lang. Syst. 33 (July 2011)
[53]
Zenger, M., Odersky, M.: Extensible algebraic datatypes with defaults. In: ICFP 2001 (2001)
[54]
Zenger, M., Odersky, M.: Independently extensible solutions to the expression problem. In: FOOL 2005 (2005)

Cited By

View all
  • (2023)Removing the Notional Machine Discrepancy (Doctoral Consortium)Proceedings of the 23rd Koli Calling International Conference on Computing Education Research10.1145/3631802.3631837(1-2)Online publication date: 13-Nov-2023
  • (2023)Modular Educational LanguagesCompanion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity10.1145/3618305.3623596(28-30)Online publication date: 22-Oct-2023
  • (2022)Compositional embeddings of domain-specific languagesProceedings of the ACM on Programming Languages10.1145/35632946:OOPSLA2(175-203)Online publication date: 31-Oct-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
ECOOP'13: Proceedings of the 27th European conference on Object-Oriented Programming
July 2013
731 pages
ISBN:9783642390371
  • Editor:
  • Giuseppe Castagna

Sponsors

  • Typesafe: Typesafe
  • BTelecom: Bouygues Telecom
  • IBMR: IBM Research
  • Microsoft Research: Microsoft Research
  • ORACLE: ORACLE

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 01 July 2013

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Removing the Notional Machine Discrepancy (Doctoral Consortium)Proceedings of the 23rd Koli Calling International Conference on Computing Education Research10.1145/3631802.3631837(1-2)Online publication date: 13-Nov-2023
  • (2023)Modular Educational LanguagesCompanion Proceedings of the 2023 ACM SIGPLAN International Conference on Systems, Programming, Languages, and Applications: Software for Humanity10.1145/3618305.3623596(28-30)Online publication date: 22-Oct-2023
  • (2022)Compositional embeddings of domain-specific languagesProceedings of the ACM on Programming Languages10.1145/35632946:OOPSLA2(175-203)Online publication date: 31-Oct-2022
  • (2020)Pattern matching in an open worldACM SIGPLAN Notices10.1145/3393934.327812453:9(134-146)Online publication date: 7-Apr-2020
  • (2019)Solving the Expression Problem in C++, á la LMSTheoretical Aspects of Computing – ICTAC 201910.1007/978-3-030-32505-3_20(353-371)Online publication date: 31-Oct-2019
  • (2018)Pattern matching in an open worldProceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3278122.3278124(134-146)Online publication date: 5-Nov-2018
  • (2018)Versatile event correlation with algebraic effectsProceedings of the ACM on Programming Languages10.1145/32367622:ICFP(1-31)Online publication date: 30-Jul-2018
  • (2018)Static analysis of Java dynamic proxiesProceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3213846.3213864(209-220)Online publication date: 12-Jul-2018
  • (2017)Models as self-aware cognitive agents and adaptive mediators for model-driven scienceProceedings of the 2017 Winter Simulation Conference10.5555/3242181.3242285(1-12)Online publication date: 3-Dec-2017
  • (2017)Models as autonomous adaptive mediators and cognitive instruments for systems scienceProceedings of the Summer Simulation Multi-Conference10.5555/3140065.3140086(1-12)Online publication date: 9-Jul-2017
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media