Translation Semantics and Static Analysis

  • Stefano Crespi Reghizzi
  • Luca Breveglieri
  • Angelo Morzenti
Part of the Texts in Computer Science book series (TCS)

Abstract

In this chapter we discuss a few translation techniques and the static analysis of programs. After abstractly defining translation as a relation between strings, we present the more operational notions of transliteration and of purely syntactic translation. These notions are defined by means of regular translations and transduction grammars, and are computed by finite or pushdown transducers. We also review the notion of semantic translation, which is modeled by means of functions that operate on the syntactic tree of the source text, and which is realized through attribute grammars. Finally we consider the static analysis of programs: the program is viewed as a finite control-flow graph, and a few important properties concerning its correctness and efficiency are established, through an approach based on writing flow equations and iteratively solving them.

Keywords

Posit Sorting Prefix Cond Suffix 

References

  1. 1.
    A. Aho, J. Ullman, The Theory of Parsing, Translation, and Compiling, vol. 1: Parsing (Prentice-Hall, Englewood Cliffs, 1972) Google Scholar
  2. 2.
    A. Aho, J. Ullman, The Theory of Parsing, Translation and Compiling, vol. 2: Compiling (Prentice-Hall, Englewood Cliffs, 1973) Google Scholar
  3. 3.
    A. Aho, M. Lam, R. Sethi, J. Ullman, Compilers: Principles, Techniques and Tools (Prentice-Hall, Englewood Cliffs, 2006) Google Scholar
  4. 4.
    A. Appel, Modern Compiler Implementation in Java (Cambridge University Press, Cambridge, 2002) CrossRefMATHGoogle Scholar
  5. 5.
    J. Berstel, Transductions and Context-Free Languages (Teubner, Stuttgart, 1979) CrossRefMATHGoogle Scholar
  6. 6.
    S. Crespi Reghizzi, G. Psaila, Grammar partitioning and modular deterministic parsing. Comput. Lang. 24(4), 197–227 (1998) CrossRefMATHGoogle Scholar
  7. 7.
    J. Engelfriet, Attribute grammars: attribute evaluation methods, in Methods and Tools for Compiler Construction, ed. by B. Lorho (Cambridge University Press, Cambridge, 1984), pp. 103–138 Google Scholar
  8. 8.
    D.E. Knuth, Semantics of context-free languages. Math. Syst. Theory 2(2), 127–145 (1968) MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    D.E. Knuth, Semantics of context-free languages (errata corrige). Math. Syst. Theory 5(2), 95–99 (1971) MathSciNetCrossRefMATHGoogle Scholar
  10. 10.
    S. Muchnick, Advanced Compiler Design and Implementation (Morgan Kaufmann, San Mateo, 1997) Google Scholar
  11. 11.
    F. Nielson, H. Nielson, C. Hankin, Principles of Program Analysis (Springer, New York, 2005) MATHGoogle Scholar
  12. 12.
    J. Sakarovich, Elements of Automata Theory (Cambridge University Press, Cambridge, 2009) CrossRefGoogle Scholar
  13. 13.
    R.D. Tennent, Semantics of Programming Languages (Prentice-Hall, Englewood Cliffs, 1991) Google Scholar
  14. 14.
    G. Winskel, The Formal Semantics of Programming Languages (MIT Press, Cambridge, 1993) MATHGoogle Scholar
  15. 15.
    W. Yang, Mealy machines are a better model of lexical analyzers. Comput. Lang. 22, 27–38 (1996) CrossRefGoogle Scholar

Copyright information

© Springer-Verlag London 2013

Authors and Affiliations

  • Stefano Crespi Reghizzi
    • 1
  • Luca Breveglieri
    • 1
  • Angelo Morzenti
    • 1
  1. 1.Dipartimento Elettronica, Informazione e BioingegneriaPolitecnico di MilanoMilanItaly

Personalised recommendations