Advertisement

C-Mix

Specialization of C Programs
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1706)

Abstract

C-Mix is a partial evaluator that is able to specialize strictly conforming ISO C programs. C-Mix generates specialized versions of functions, unrolls loops and pre-computes expressions and control constructs that depend on known data only. These transformations are similar to what optimizing compilers do, but since C-Mix takes some of the program’s input into account, it can potentially do better. This article gives a bird’s-eye view of several aspects of the C-Mix system: how it is used, a few examples of what it can do, and some information on how it works.

Keywords

Residual Program Partial Evaluation Source Program User Annotation Source File 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers, Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
  2. [2]
    Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, Department of Computer Science, University of Copenhagen (DIKU, Copenhagen, Denmark, May 1994.Google Scholar
  3. [3]
    Peter Hoist Andersen. Partially static binding-time types in C-Mix. Unpublished, November 1997.Google Scholar
  4. [4]
    ANSI. American National Standard for Programming Languages — C. New York, USA, 1990. ANSI/ISO 9899-1990.Google Scholar
  5. [5]
    C. Consel, L. Hornof, F. Noel, and J. Noye. A uniform approach for compile-time and run-time specialization. Lecture Notes in Computer Science, 1110:54–--, 1996.Google Scholar
  6. [6]
    A. P. Ershov. On the partial computation principle. Information Processing Letters, 6(2):38–41, April 1977.CrossRefzbMATHGoogle Scholar
  7. [7]
    Fritz Henglein. Efficient type inference for higher-order binding-time analysis. In J. Hughes, editor, FPCA, pages 448–472. 5th ACM Conference, Cambridge, MA, USA, Berlin: Springer-Verlag, August 1991. Lecture Notes in Computer Science, Vol. 523.Google Scholar
  8. [8]
    L. Hornof and Jacques Noye. Accurate binding-time analysis for imperative languages: Flow, context and return sensitivity. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM-97), volume 32, 12 of ACM SIGPLAN Notices, pages 63–73, New York, June l2–13 1997. ACM Press.zbMATHGoogle Scholar
  9. [9]
    Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.Google Scholar
  10. [10]
    Brian W. Kernighan and Dennis M. Ritchie. The C Programming Language. Prentice-Hall, Englewood Cliffs, New Jersey 07632, 2 edition, 1988.zbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  1. 1.DIKUCopenhagen ØDenmark

Personalised recommendations