skip to main content
10.1145/2628136.2628155acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Type-based parametric analysis of program families

Published:19 August 2014Publication 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Cardelli. Program fragments, linking, and modularization. In ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pages 266--277, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Chen and M. Erwig. Guided Type Debugging. In Int. Symp. on Functional and Logic Programming, LNCS 8475, pages 35--51, 2014.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. C. Clements and L. M. Northrop. Software Product Lines: Practices and Patterns. Addison-Wesley, Boston, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Hankin and D. Métayer. A type-based framework for program analysis. In Static Analysis Symposium, LNCS 864, pages 380--394. 1994.Google ScholarGoogle ScholarCross RefCross Ref
  21. N. Heintze. Control-flow analysis and type systems. In Static Analysis Symposium, LNCS 983, pages 189--206. 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Nielson, H. R. Nielson, and C. Hankin. Principles of program analysis. Springer, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Odersky, M. Sulzmann, and M. Wehr. Type Inference with Constrained Types. Theory and Practice of Object Systems, 5(1):35--55, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. L. Parnas. On the design and development of program families. IEEE Trans. on Software Engineering, 2(1):1--9, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. F. Pottier. A versatile constraint-based type inference system. Nordic J. of Computing, 7(4):312--347, Dec. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. F. Pottier and V. Simonet. Information flow inference for ML. ACM Trans. on Programming Languages and Systems, 25(1):117--158, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. F. Prost. A Formalization of Static Analyses in System F. In Automated Deduction CADE-16, pages 252--266. 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J. A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12(1):23--41, Jan. 1965. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. J. Stuckey and M. Sulzmann. A theory of overloading. In ACM SIGPLAN Int. Conf. on Functional Programming, pages 167--178, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Type-based parametric analysis of program families

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          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

          Copyright © 2014 ACM

          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

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          ICFP '14 Paper Acceptance Rate28of85submissions,33%Overall Acceptance Rate333of1,064submissions,31%

          Upcoming Conference

          ICFP '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader