Inter-deriving semantic artifacts for object-oriented programming

被引:6
作者
Danvy, Olivier [1 ]
Johannsen, Jacob [2 ]
机构
[1] Aarhus Univ, Dept Comp Sci, Aarhus N, Denmark
[2] Univ Kent, Comp Lab, Canterbury CT2 7NF, Kent, England
关键词
Functional calculus of objects; Reduction semantics; Abstract machine; Natural semantics; Syntactic correspondence; Functional correspondence; FUNCTIONAL CORRESPONDENCE; ABSTRACT MACHINES; EVALUATORS; CALCULI;
D O I
10.1016/j.jcss.2009.10.004
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
We present a new abstract machine for Abadi and Cardelli's untyped non-imperative calculus of objects. This abstract machine mechanically corresponds to both the reduction semantics (i.e., small-step operational semantics) and the natural semantics (i.e., big-step operational semantics) specified in Abadi and Cardelli's monograph. To move closer to actual implementations, which use environments rather than actual substitutions, we then represent methods as closures and we present three new semantic artifacts for a version of Abadi and Cardelli's calculus with explicit substitutions: a reduction semantics, an environment-based abstract machine, and a natural semantics (i.e., an interpreter) with environments. These three new semantic artifacts mechanically correspond to each other, and the two abstract machines are bisimilar. Their significance lies in the fact that they have not been designed from scratch and then proved correct: instead, they have been inter-derived. To illustrate the inter-derivation and to make this article stand-alone, we also comprehensively treat the example of negational normalization over Boolean formulas, in appendix. (C) 2010 Elsevier Inc. All rights reserved.
引用
收藏
页码:302 / 323
页数:22
相关论文
共 55 条
[1]  
Abadi M., 1991, Journal of Functional Programming, V1, P375, DOI 10.1017/S0956796800000186
[2]  
ABADI M, 1996, MONOGR COMPUT SCI
[3]  
Ager ABDM03 Mads Sig, 2003, P 5 ACM SIGPLAN INT, P8, DOI DOI 10.1145/888251.888254
[4]   A functional correspondence between monadic evaluators and abstract machines for languages with computational effects [J].
Ager, MS ;
Danvy, O ;
Midtgaard, J .
THEORETICAL COMPUTER SCIENCE, 2005, 342 (01) :149-172
[5]   A functional correspondence between call-by-need evaluators and lazy abstract machines [J].
Ager, MS ;
Danvy, O ;
Midtgaard, J .
INFORMATION PROCESSING LETTERS, 2004, 90 (05) :223-232
[6]  
AGER MS, 2006, THESIS AARHUS U AARH
[7]  
[Anonymous], 1986, Denotational Semantics: A Methodology for Language Development
[8]  
[Anonymous], 1992, Semantics with applications: a formal introduction
[9]  
Barendregt H., 1984, STUD LOGIC FDN MATH, V103
[10]  
BIERNACKA M, 2006, THESIS AARHUS U AARH