skip to main content
research-article

Type-based parametric analysis of program families

Published: 19 August 2014 Publication History

Abstract

Previous research on static analysis for program families has focused on lifting analyses for single, plain programs to program families by employing idiosyncratic representations. The lifting effort typically involves a significant amount of work for proving the correctness of the lifted algorithm and demonstrating its scalability. In this paper, we propose a parameterized static analysis framework for program families that can automatically lift a class of type-based static analyses for plain programs to program families. The framework consists of a parametric logical specification and a parametric variational constraint solver. We prove that a lifted algorithm is correct provided that the underlying analysis algorithm is correct. An evaluation of our framework has revealed an error in a previous manually lifted analysis. Moreover, performance tests indicate that the overhead incurred by the general framework is bounded by a factor of 2.

References

[1]
S. Apel, C. Kästner, A. Größlinger, and C. Lengauer. Type Safety for Feature-Oriented Product Lines. Automated Software Engineering, 17(3):251--300, 2010.
[2]
S. Apel, A. von Rhein, P. Wendler, A. Größlinger, and D. Beyer. Strategies for Product-Line Verification: Case Studies and Experiments. In IEEE Int. Conf. on Software Engineering, pages 482--491, 2013.
[3]
E. Bodden, T. Tolêdo, M. Ribeiro, C. Brabrand, P. Borba, and M. Mezini. SPLLIFT: Statically Analyzing Software Product Lines in Minutes Instead of Years. In ACM SIGPLAN Conf. on Programming Language Design and Implementation, pages 355--364, 2013.
[4]
C. Brabrand, M. Ribeiro, T. Tolêdo, J. Winther, and P. Borba. Intraprocedural dataflow analysis for software product lines. In Transactions on Aspect-Oriented Software Development X, pages 73--108. 2013.
[5]
C. Brabrand, M. Ribeiro, T. Tolêdo, and P. Borba. Intraprocedural Dataflow Analysis for Software Product Lines. In Int. Conf. on Aspect-Oriented Software Development, pages 13--24, 2012.
[6]
L. Cardelli. Program fragments, linking, and modularization. In ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pages 266--277, 1997.
[7]
S. Chen and M. Erwig. Counter-Factual Typing for Debugging Type Errors. In ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pages 583--594, 2014.
[8]
S. Chen and M. Erwig. Guided Type Debugging. In Int. Symp. on Functional and Logic Programming, LNCS 8475, pages 35--51, 2014.
[9]
S. Chen, M. Erwig, and E. Walkingshaw. An Error-Tolerant Type System for Variational Lambda Calculus. In ACM Int. Conf. on Functional Programming, pages 29--40, 2012.
[10]
S. Chen, M. Erwig, and E. Walkingshaw. Extending Type Inference to Variational Programs. ACM Trans. on Programming Languages and Systems, 36(1):1:1--1:54, 2014.
[11]
A. Classen, P. Heymans, P.-Y. Schobbens, and A. Legay. Symbolic Model Checking of Software Product Lines. In IEEE Int. Conf. on Software Engineering, pages 321--330, 2011.
[12]
A. Classen, P. Heymans, P.-Y. Schobbens, A. Legay, and J.-F. Raskin. Model Checking Lots of Systems: Efficient Verification of Temporal Properties in Software Product Lines. In IEEE Int. Conf. on Software Engineering, pages 335--344, 2010.
[13]
P. C. Clements and L. M. Northrop. Software Product Lines: Practices and Patterns. Addison-Wesley, Boston, 2001.
[14]
M. Cordy, A. Classen, G. Perrouin, P.-Y. Schobbens, P. Heymans, and A. Legay. Simulation-based Abstractions for Software Product-Line Model Checking. In IEEE Int. Conf. on Software Engineering, pages 672--682, 2012.
[15]
L. Damas and R. Milner. Principal Type Schemes for Functional Programming Languages. In ACM Symp. on Principles of Programming Languages, pages 207--208, 1982.
[16]
B. Delaware, W. Cook, and D. Batory. Product lines of theorems. In ACM SIGPLAN Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pages 595--608, 2011.
[17]
B. Delaware, W. R. Cook, and D. Batory. Fitting the Pieces Together: A Machine-Checked Model of Safe Composition. In ACM SIGSOFT Int. Symp. on the Foundations of Software Engineering, pages 243--252, 2009.
[18]
M. Erwig and E. Walkingshaw. The Choice Calculus: A Representation for Software Variation. ACM Trans. on Software Engineering and Methodology, 21(1):6:1--6:27, 2011.
[19]
P. Gazzillo and R. Grimm. SuperC: Parsing all of C by Taming the Preprocessor. In ACM SIGPLAN Conf. on Programming Language Design and Implementation, pages 323--334, 2012.
[20]
C. Hankin and D. Métayer. A type-based framework for program analysis. In Static Analysis Symposium, LNCS 864, pages 380--394. 1994.
[21]
N. Heintze. Control-flow analysis and type systems. In Static Analysis Symposium, LNCS 983, pages 189--206. 1995.
[22]
C. Kästner, S. Apel, T. Thüm, and G. Saake. Type Checking Annotation-Based Product Lines. ACM Trans. on Software Engineering and Methodology, 21(3):14:1--14:39, 2012.
[23]
C. Kästner, P. G. Giarrusso, T. Rendel, S. Erdweg, K. Ostermann, and T. Berger. Variability-aware parsing in the presence of lexical macros and conditional compilation. In ACM SIGPLAN Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pages 805--824, 10 2011.
[24]
C. Kästner, K. Ostermann, and S. Erdweg. A Variability-Aware Module System. In ACM SIGPLAN Int. Conf. on Object-Oriented Programming, Systems, Languages, and Applications, pages 773--792, 2012.
[25]
J. Liebig, A. von Rhein, C. Kästner, S. Apel, J. Dörre, and C. Lengauer. Large-Scale Variability-Aware Type Checking and Dataflow Analysis. Technical Report MIP-1212, Fakultät für Informatik und Mathematik, Universität Passau, 2012.
[26]
J. Liebig, A. von Rhein, C. Kästner, S. Apel, J. Dörre, and C. Lengauer. Scalable analysis of variable software. In Foundations of Software Engineering, pages 81--91, 2013.
[27]
M. Naik and J. Palsberg. A type system equivalent to a model checker. ACM Trans. on Programming Languages and Systems, 30(5):29:1--29:24, 2008.
[28]
F. Nielson, H. R. Nielson, and C. Hankin. Principles of program analysis. Springer, 1999.
[29]
M. Odersky, M. Sulzmann, and M. Wehr. Type Inference with Constrained Types. Theory and Practice of Object Systems, 5(1):35--55, 1999.
[30]
J. Palsberg. Type-based analysis and applications. In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 20--27, 2001.
[31]
D. L. Parnas. On the design and development of program families. IEEE Trans. on Software Engineering, 2(1):1--9, 1976.
[32]
F. Pottier. A versatile constraint-based type inference system. Nordic J. of Computing, 7(4):312--347, Dec. 2000.
[33]
F. Pottier and V. Simonet. Information flow inference for ML. ACM Trans. on Programming Languages and Systems, 25(1):117--158, 2003.
[34]
F. Prost. A Formalization of Static Analyses in System F. In Automated Deduction CADE-16, pages 252--266. 1999.
[35]
T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pages 49--61, 1995.
[36]
J. A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1):23--41, Jan. 1965.
[37]
V. Simonet. An extension of HM(X) with bounded existential and universal data-types. In ACM SIGPLAN Int. Conf. on Functional Programming, pages 39--50, 2003.
[38]
V. Simonet and F. Pottier. A constraint-based approach to guarded algebraic data types. ACM Trans. on Programming Languages and Systems, 29(1):1--38, 2007.
[39]
P. J. Stuckey and M. Sulzmann. A theory of overloading. In ACM SIGPLAN Int. Conf. on Functional Programming, pages 167--178, 2002.
[40]
M. Sulzmann, M. Müller, and C. Zenger. Hindley/Milner style type systems in constraint form. Research Report ACRC-99-009, University of South Australia, School of Computer and Information Science, 1999.
[41]
T. Thüm, I. Schaefer, S. Apel, and M. Hentschel. Family-based deductive verification of software product lines. In International Conference on Generative Programming and Component Engineering, pages 11--20, 2012.
[42]
J. B. Wells. Typability and Type Checking in System F Are Equivalent and Undecidable. Annals of Pure and Applied Logic, 98:111--156, 1998.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 9
ICFP '14
September 2014
361 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2692915
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '14: Proceedings of the 19th ACM SIGPLAN international conference on Functional programming
    August 2014
    390 pages
    ISBN:9781450328739
    DOI:10.1145/2628136
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 August 2014
Published in SIGPLAN Volume 49, Issue 9

Check for updates

Author Tags

  1. choice calculus
  2. constraint-based type system
  3. program families
  4. static-analysis lifting
  5. variational types

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2021)A Formal Framework of Software Product Line AnalysesACM Transactions on Software Engineering and Methodology10.1145/344238930:3(1-37)Online publication date: 23-Apr-2021
  • (2020)Efficient Counter-factual Type Error DebuggingScience of Computer Programming10.1016/j.scico.2020.102544(102544)Online publication date: Sep-2020
  • (2018)All roads lead to RomeScience of Computer Programming10.1016/j.scico.2017.10.013152:C(116-160)Online publication date: 15-Jan-2018
  • (2021)Lifted termination analysis by abstract interpretation and its applicationsProceedings of the 20th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3486609.3487202(96-109)Online publication date: 17-Oct-2021
  • (2020)Automatic and efficient variability-aware lifting of functional programsProceedings of the ACM on Programming Languages10.1145/34282254:OOPSLA(1-27)Online publication date: 13-Nov-2020
  • (2018)Formal Verification for Feature-Based Composition of Workflows2018 14th European Dependable Computing Conference (EDCC)10.1109/EDCC.2018.00039(173-181)Online publication date: Sep-2018
  • (2015)Systematic derivation of correct variability-aware program analysesScience of Computer Programming10.1016/j.scico.2015.04.005105:C(145-170)Online publication date: 1-Jul-2015

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media