Abstract
Feature-oriented programming (FOP) is an extension of ob- ject-oriented programming to support software variability by refining existing classes and methods. In order to increase the reliability of all implemented program variants, we integrate design by contract (DbC) with FOP. DbC is an approach to build reliable object-oriented software by specifying methods with contracts. Contracts are annotations that document and formally specify behavior, and can be used for formal verification of correctness or as test oracles. We present and discuss five approaches to define contracts of methods and their refinements in FOP. Furthermore, we share our insights gained by performing five case studies. This work is a foundation for research on the analysis of feature-oriented programs (e.g., for verifying functional correctness or for detecting feature interactions).
Keywords
- Feature Module
- Software Product Line
- Java Modeling Language
- Code Clone
- Method Contract
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Download conference paper PDF
References
Agostinho, S., Moreira, A., Guerreiro, P.: Contracts for Aspect-Oriented Design. In: Proc. Workshop on Software Engineering Properties of Languages and Aspect Technologies (SPLAT). ACM (2008)
Apel, S., Kästner, C.: An Overview of Feature-Oriented Software Development. J. Object Technology (JOT) 8(5), 49–84 (2009)
Apel, S., Kästner, C., Größlinger, A., Lengauer, C.: Type Safety for Feature-Oriented Product Lines. Automated Software Engineering (ASE) 17(3), 251–300 (2010)
Apel, S., Leich, T., Saake, G.: Aspectual Feature Modules. IEEE Trans. Software Engineering (TSE) 34(2), 162–180 (2008)
Apel, S., Scholz, W., Lengauer, C., Kästner, C.: Detecting Dependences and Interactions in Feature-Oriented Design. In: Proc. Int’l Symposium Software Reliability Engineering (ISSRE), pp. 161–170. IEEE (2010)
Apel, S., Speidel, H., Wendler, P., von Rhein, A., Beyer, D.: Detection of Feature Interactions using Feature-Aware Verification. In: Proc. Int’l Conf. Automated Software Engineering (ASE), pp. 372–375. IEEE (2011)
Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling Step-Wise Refinement. IEEE Trans. Software Engineering (TSE) 30(6), 355–371 (2004)
Benavides, D., Segura, S., Ruiz-Cortés, A.: Automated Analysis of Feature Models 20 Years Later: A Literature Review. Information Systems 35(6), 615–708 (2010)
Bruns, D., Klebanov, V., Schaefer, I.: Verification of Software Product Lines with Delta-Oriented Slicing. In: Beckert, B., Marché, C. (eds.) FoVeOOS 2010. LNCS, vol. 6528, pp. 61–75. Springer, Heidelberg (2011)
Delaware, B., Cook, W., Batory, D.: A Machine-Checked Model of Safe Composition. In: Proc. Workshop Foundations of Aspect-Oriented Languages (FOAL), pp. 31–35. ACM (2009)
Dhara, K.K., Leavens, G.T.: Forcing Behavioral Subtyping through Specification Inheritance. In: Proc. Int’l Conf. Software Engineering (ICSE), pp. 258–267. IEEE (1996)
Hähnle, R., Schaefer, I.: A Liskov Principle for Delta-oriented Programming. In: Proc. Int’l Conf. Formal Verification of Object-Oriented Software (FoVeOOS), pp. 190–207. Technical Report 2011-26, Department of Informatics, Karlsruhe Institute of Technology (2011)
Hoare, C.A.R.: An Axiomatic Basis for Computer Programming. Comm. ACM 12(10), 576–580 (1969)
Juergens, E., Deissenboeck, F., Hummel, B., Wagner, S.: Do Code Clones Matter? In: Proc. Int’l Conf. Software Engineering (ICSE), pp. 485–495. IEEE (2009)
Kang, K.C., Cohen, S.G., Hess, J.A., Novak, W.E., Peterson, A.S.: Feature-Oriented Domain Analysis (FODA) Feasibility Study. Technical Report CMU/SEI-90-TR-21, Software Engineering Institute (1990)
Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary Design of JML: A Behavioral Interface Specification Language for Java. Software Engineering Notes (SEN) 31(3), 1–38 (2006)
Liskov, B.H., Wing, J.M.: A Behavioral Notion of Subtyping. Trans. Programming Languages and Systems (TOPLAS) 16(6), 1811–1841 (1994)
Liu, J., Basu, S., Lutz, R.: Compositional Model Checking of Software Product Lines using Variation Point Obligations. Automated Software Engineering (ASE) 18(1), 39–76 (2011)
Lorenz, D.H., Skotiniotis, T.: Extending Design by Contract for Aspect-Oriented Programming. Computing Research Repository (CoRR), abs/cs/0501070 (2005)
Meyer, B.: Applying Design by Contract. Computer 25(10), 40–51 (1992)
Prehofer, C.: Feature-Oriented Programming: A Fresh Look at Objects. In: Aksit, M., Auletta, V. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 419–443. Springer, Heidelberg (1997)
Scholz, W., Thüm, T., Apel, S., Lengauer, C.: Automatic Detection of Feature Interactions using the Java Modeling Language: An Experience Report. In: Proc. Int’l Workshop Feature-Oriented Software Development (FOSD), pp. 7:1–7:8. ACM (2011)
Thüm, T., Schaefer, I., Kuhlemann, M., Apel, S.: Proof Composition for Deductive Verification of Software Product Lines. In: Proc. Int’l Workshop Variability-intensive Systems Testing, Validation and Verification (VAST), pp. 270–277. IEEE (2011)
Zhao, J., Rinard, M.: Pipa: A Behavioral Interface Specification Language for AspectJ. In: Pezzé, M. (ed.) FASE 2003. LNCS, vol. 2621, pp. 150–165. Springer, Heidelberg (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thüm, T., Schaefer, I., Kuhlemann, M., Apel, S., Saake, G. (2012). Applying Design by Contract to Feature-Oriented Programming. In: de Lara, J., Zisman, A. (eds) Fundamental Approaches to Software Engineering. FASE 2012. Lecture Notes in Computer Science, vol 7212. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-28872-2_18
Download citation
DOI: https://doi.org/10.1007/978-3-642-28872-2_18
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-28871-5
Online ISBN: 978-3-642-28872-2
eBook Packages: Computer ScienceComputer Science (R0)
