Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1016850.1016857acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Improving the static analysis of embedded languages via partial evaluation

Published: 19 September 2004 Publication History

Abstract

Programs in embedded languages contain invariants that are not automatically detected or enforced by their host language. We show how to use macros to easily implement partial evaluation of embedded interpreters in order to capture invariants encoded in embedded programs and render them explicit in the terms of their host language. We demonstrate the effectiveness of this technique in improving the results of a value flow analysis.

References

[1]
H. Abelson and G. J. Sussman. The Structure and Interpretation of Computer Programs. MIT Press, Cambridge, MA, 1985.]]
[2]
A. Aiken. Introduction to set constraint-based program analysis. Science of Computer Programming, 35:79-111, 1999.]]
[3]
K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language. Addison-Wesley, 3d edition, 2000.]]
[4]
L. Augustsson. Cayenne-a language with dependent types. In Proceedings of the third ACM SIGPLAN international conference on Functional programming, pages 239--250. ACM Press, 1998.]]
[5]
K. Backhouse. Abstract Interpretation of Domain-Specific Embedded Languages. PhD thesis, Oxford University, 2002.]]
[6]
N. H. Christensen. Domain-specific languages in software development - and the relation to partial evaluation. PhD thesis, DIKU, Dept. of Computer Science, University of Copenhagen, Universitetsparken 1, DK-2100 Copenhagen East, Denmark, July 2003.]]
[7]
O. Danvy. Functional unparsing. Journal of Functional Programming, 8(6):621--625, 1998.]]
[8]
C. Elliott, S. Finne, and O. de Moor. Compiling embedded languages. In SAIG, pages 9--27, 2000.]]
[9]
R. B. Findler, J. Clements, M. F. Cormac Flanagan, S. Krishnamurthi, P. Steckler, and M. Felleisen. DrScheme: A progamming environment for scheme. Journal of Functional Programming, 12(2):159--182, March 2002.]]
[10]
C. Flanagan and M. Felleisen. Componential set-based analysis. ACM Trans. on Programming Languages and Systems, 21(2):369--415, Feb. 1999.]]
[11]
M. Flatt. Composable and compilable macros: you want it when? In Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, pages 72--83. ACM Press, 2002.]]
[12]
P. Graunke, S. Krishnamurthi, S. V. D. Hoeven, and M. Felleisen. Programming the web with high-level programming languages. In Programming Languages and Systems, 10th European Symposium on Programming, ESOP 2001, Proceedings, volume 2028 of Lecture Notes in Computer Science, pages 122--136, Berlin, Heidelberg, and New York, 2001. Springer-Verlag.]]
[13]
N. Heintze. Set Based Program Analysis. PhD thesis, Carnegie-Mellon Univ., Pittsburgh, PA, Oct. 1992.]]
[14]
R. Hinze. Formatting: a class act. Journal of Functional Programming, 13(5):935--944, 2003.]]
[15]
P. Hudak. Modular domain specific languages and tools. In Proceedings of Fifth International Conference on Software Reuse, pages 134--142, June 1998.]]
[16]
S. N. Kamin. Research on domain-specific embedded languages and program generators. In R. Cleaveland, M. Mislove, and P. Mulry, editors, Electronic Notes in Theoretical Computer Science, volume 14. Elsevier, 2000.]]
[17]
R. Kelsey, W. Clinger, and J. R. {editors}. Revised 5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computation, 11(1):7--104, August 1998. Also appeared in SIGPLAN Notices 33:9, September 1998.]]
[18]
B. W. Kernighan and D. M. Ritchie. The C programming language. Prentice Hall Press, 1988.]]
[19]
X. Leroy. The Objective Caml System, release 3.07, 2003. http://caml.inria.fr/ocaml/htmlman.]]
[20]
P. Meunier. http://www.plt-scheme.org/software/mrflow.]]
[21]
M. Neubauer, P. Thiemann, M. Gasbichler, and M. Sperber. Functional logic overloading. In Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 233--244. ACM Press, 2002.]]
[22]
J. Palsberg. Closure analysis in constraint form. Proc. ACM Trans. on Programming Languages and Systems, 17(1):47--62, Jan. 1995.]]
[23]
M. Serrano and P. Weis. Bigloo: A portable and optimizing compiler for strict functional languages. In Static Analysis Symposium, pages 366--381, 1995.]]
[24]
O. Shivers. A universal scripting framework, or Lambda: the ultimate "little language". In Proceedings of the Second Asian Computing Science Conference on Concurrency and Parallelism, Programming, Networking, and Security, pages 254--265. Springer-Verlag, 1996.]]
[25]
G. L. Steele. COMMON LISP: the language. Digital Press, 12 Crosby Drive, Bedford, MA 01730, USA, 1984. With contributions by Scott E. Fahlman and Richard P. Gabriel and David A. Moon and Daniel L. Weinreb.]]
[26]
B. Stroustrup. The C++ Programming Language, Third Edition. Addison-Wesley Longman Publishing Co., Inc., 1997.]]
[27]
T. L. Veldhuizen. C++ templates as partial evaluation. In Partial Evaluation and Semantic-Based Program Manipulation, pages 13--18, 1999.]]
[28]
N. Welsh, F. Solsona, and I. Glover. SchemeUnit and SchemeQL: Two little languages. In Proceedings of the Third Workshop on Scheme and Functional Programming, 2002.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '04: Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
September 2004
264 pages
ISBN:1581139055
DOI:10.1145/1016850
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 39, Issue 9
    ICFP '04
    September 2004
    254 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1016848
    Issue’s Table of Contents
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 ACM 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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 September 2004

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. embedded languages
  2. macros
  3. partial evaluation
  4. value flow analysis

Qualifiers

  • Article

Conference

ICFP04
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)1
Reflects downloads up to 25 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2016)Occurrence typing modulo theoriesACM SIGPLAN Notices10.1145/2980983.290809151:6(296-309)Online publication date: 2-Jun-2016
  • (2016)Occurrence typing modulo theoriesProceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2908080.2908091(296-309)Online publication date: 2-Jun-2016
  • (2010)Debugging hygienic macrosScience of Computer Programming10.1016/j.scico.2009.06.00175:7(496-515)Online publication date: 1-Jul-2010
  • (2007)Debugging macrosProceedings of the 6th international conference on Generative programming and component engineering10.1145/1289971.1289994(135-144)Online publication date: 1-Oct-2007
  • (2016)Occurrence typing modulo theoriesACM SIGPLAN Notices10.1145/2980983.290809151:6(296-309)Online publication date: 2-Jun-2016
  • (2016)Occurrence typing modulo theoriesProceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2908080.2908091(296-309)Online publication date: 2-Jun-2016

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