ACM Home Page
Please provide us with feedback. Feedback
Natural semantics as a static program analysis framework
Full text PdfPdf (650 KB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 26 ,  Issue 3  (May 2004) table of contents
Pages: 510 - 577  
Year of Publication: 2004
ISSN:0164-0925
Authors
Sabine Glesner  Universität Karlsruhe, Karlsruhe, Germany
Wolf Zimmermann  Martin-Luther-Universität Halle-Wittenberg, Halle/Saale, Germany
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 7,   Downloads (12 Months): 98,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/982158.982161
What is a DOI?

ABSTRACT

Natural semantics specifications have become mainstream in the formal specification of programming language semantics during the last 10 years. In this article, we set up sorted natural semantics as a specification framework which is able to express static semantic information of programming languages declaratively in a uniform way and allows one at the same time to generate corresponding analyses. Such static semantic information comprises context-sensitive properties which are checked in the semantic analysis phase of compilers as well as further static program analyses such as, for example, classical data and control flow analyses or type and effect systems. The latter require fixed-point analyses to determine their solutions. We show that, given a sorted natural semantics specification, we can generate the corresponding analysis. Therefore, we classify the solution of such an analysis by the notion of a proof tree. We show that a proof tree can be computed by solving an equivalent residuation problem. In case of the semantic analysis, this solution can be found by a basic algorithm. We show that its efficiency can be enhanced using solution strategies. We also demonstrate our prototype implementation of the basic algorithm which proves its applicability in practical situations. With the results of this article, we have established natural semantics as a framework which closes the gap between declarative and operational specification methods for static semantic properties as well as between specification frameworks for the semantic analysis. In particular, we show that natural semantics is expressive enough to define fixed-point program analyses.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
Andréka, H. and Németi, I. 1978. The generalized completeness of Horn predicate logic as a programming language. Acta Cybernet., 4, 3--10.
 
3
Attali, I. 1989. Compilation de programmes Typol par attributs sémantiques. Ph.D. dissertation, University of Nice, Nice, France.
4
 
5
Attali, I. and Franchi-Zannettacci, P. 1988. Unification-free execution of Typol programs by semantic attribute evaluation. In International Conference Symposium on Logic Programming, (Seattle, Aug.). MIT Press, Cambridge, MA, 160--177.
 
6
7
8
 
9
10
 
11
Despeyroux, T. 1984. Executable specification of static semantics. In Semantics of Data Types, G. Kahn, Ed. Lecture Notes in Computer Science, vol. 173, Springer-Verlag, Berlin, Germany, 215--233.
 
12
Eric Domenjoud, A technical note on AC-unification. The number of minimal unifiers of the equation ax1+&cdots;+axp=&d2; ACby1+&cdots;+by q , Journal of Automated Reasoning, v.8 n.1, p.39-44, Feb. 1992
 
13
 
14
Eli. n.d. Eli: Übersetzerentwicklung leicht gemacht. Available online at http://www.uni-paderborn.de/fachbereich/AG/agkastens/eli_home.html.
 
15
Geiβ, R. 1998. The Sherlock-System---a prototype for many-sorted natural semantics. Term project, Universität Karlsruhe, Fakultät für Informatik, Karlsruhe, Germany.
 
16
Geiβ, R. 1999. The Sherlock-System II---a prototype for many-sorted natural semantics implemented in Java. Term project. Universität Karlsruhe, Fakultät für Informatik, Karlsruhe, Germany.
 
17
Gentzen, G. 1935. Untersuchungen über das logische Schlieβen. Mathem. Zeitschrift 39, 176--210 and 405--431.
 
18
Glesner, S. 1998. Many-sorted natural semantics---specification and generation of the semantic analysis for imperative and object-oriented programming languages. Working paper 63. Westfälische Wilhelms-Universität Münster, Institut für Wirtschaftsinformatik, Münster, Germany. (Proceedings Workshop on Functional and Logic Programming).
 
19
Glesner, S. 1999a. Natural semantics for imperative and object-oriented programming languages. In Informatik '99---Informatik überwindet Grenzen, Proceedings der 29. Jahrestagung der Gesellschaft für Informatik (Paderborn, Oct.), K. Beiersdörfer, G. Engels, and W. Schäfer, Eds. GI-Gesellschaft für Informatik e.V., Springer-Verlag, Berlin, Germany 370--379.
 
20
Glesner, S. 1999b. Natürliche Semantik für imperative und objektorientierte Programmiersprachen. Ph.D. dissertation. Universität Karlsruhe, Fakultät für Informatik. Shaker Verlag, Aachen, Germany.
 
21
Glesner, S. and Zimmermann, W. 1997. Using many-sorted inference rules to generate semantic analysis. In Proceedings des Workshops der Informatik-Graduiertenkollegs "Promotion tut not: Innovationsmotor Graduiertenkolleg" im Rahmen der GI-Jahrestagung 1997, Otto Spaniol, Ed. Verlag der Augustinus Buchhandlung (Aachener Beiträge zur Informatik, Band 21), Aachen, Germany.
 
22
 
23
 
24
Hanus, M. 1994. The integration of functions into logic programming: From theory to practice. J. Logic Program. 19, 20, 583--628.
25
26
 
27
 
28
 
29
Kastens, U. 1980. Ordered attribute grammars. Acta Inform. 13, 3, 229--256.
 
30
Kastens, U. Hutt, B., and Zimmermann, E. 1982. GAG: A Practical Compiler Generator. Lecture Notes in Computer Science, vol. 141. Springer-Verlag, Heidelberg, Germany.
 
31
Knuth, D. E. 1968. Semantics of context-free languages. Math. Syst. Theor. 2, 2, 127--146.
 
32
Knuth, D. E. 1971. Semantics of context-free languages: Correction. Math. Syst. Theor. 5, 95--96.
33
 
34
Lewis, P. M., Rosenkrantz, D. J., and Stearns, R. E. 1974. Attributed translations. J. Comput. Syst. Sci., 9, 3, 279--307.
 
35
 
36
 
37
 
38
 
39
 
40
41
42
 
43
Oz. n.d. The Oz programming system. Programming Systems Lab, DFKI, and Universität des Saarlandes, Saarbrücken, Germany. Available online at http://www.ps.uni-sb.de/oz/.
 
44
 
45
Paterson, M. S. and Wegman, M. N. 1978. Linear unification. J. Comp. Syst. Sci. 16, 2, 158--167.
 
46
Pettersson, M. 1995. Compiling natural semantics. Ph.D. dissertation. Department of Computer and Information Science, Linköping University, Linköping, Sweden.
 
47
48
49
 
50
 
51
von Oheimb, D. 2001. Analyzing Java in Isabelle/HOL. Ph.D. dissertation. Technische Universität München, Munich, Germany.
 
52
 
53

Collaborative Colleagues:
Sabine Glesner: colleagues
Wolf Zimmermann: colleagues