A Meta-theory for Big-step Semantics

被引:4
作者
Dagnino, Francesco [1 ]
机构
[1] Univ Genoa, DEBRIS, Genoa, Italy
关键词
Big-step semantics; type soundness; OPERATIONAL SEMANTICS; UNION TYPES; LOGIC;
D O I
10.1145/3522729
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
It is well known that big-step semantics is not able to distinguish stuck and non-terminating computations. This is a strong limitation as it makes it very difficult to reason about properties involving infinite computations, such as type soundness, which cannot even be expressed. We show that this issue is only apparent: the distinction between stuck and diverging computations is implicit in any big-step semantics and it just needs to be uncovered. To achieve this goal, we develop a systematic study of big-step semantics: we introduce an abstract definition of what a big-step semantics is, we define a notion of computation by formalizing the evaluation algorithm implicitly associated with any big-step semantics, and we show how to canonically extend a big-step semantics to characterize stuck and diverging computations. Building on these notions, we describe a general proof technique to show that a predicate is sound, that is, it prevents stuck computation, with respect to a big-step semantics. One needs to check three properties relating the predicate and the semantics, and if they hold, the predicate is sound. The extended semantics is essential to establish this meta-logical result but is of no concerns to the user, who only needs to prove the three properties of the initial big-step semantics. Finally, we illustrate the technique by several examples, showing that it is applicable also in cases where subject reduction does not hold, and hence the standard technique for small-step semantics cannot be used.
引用
收藏
页数:50
相关论文
共 53 条
[1]  
Abadi Martin, 1996, A theory of objects, DOI DOI 10.1007/978-1-4419-8598-9
[2]   Normalization by Evaluation in the Delay Monad A Case Study for Coinduction via Copatterns and Sized Types [J].
Abel, Andreas ;
Chapman, James .
ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2014, (153) :51-67
[3]  
Aczel Peter, 1977, HDB MATH LOGIC, V90, P739
[4]   From natural semantics to abstract machines [J].
Ager, MS .
LOGIC BASED PROGRAM SYNTHESIS AND TRANSFORMATION, 2005, 3573 :245-261
[5]   Type Soundness Proofs with Definitional Interpreters [J].
Amin, Nada ;
Rompf, Tiark .
ACM SIGPLAN NOTICES, 2017, 52 (01) :666-679
[6]  
Ancona D, 2014, P 16 WORKSH FORM TEC, DOI DOI 10.1145/2635631.2635846
[7]  
Ancona D., 2018, 32 EUROPEAN C OBJECT, V109, p21:1, DOI [10.4230/LIPIcs.ECOOP.2018.21, DOI 10.4230/LIPICS.ECOOP.2018.21]
[8]   Reasoning on divergent computations with coaxioms [J].
Ancona, Davide ;
Dagnino, Francesco ;
Zucca, Elena .
Proceedings of the ACM on Programming Languages, 2017, 1 (OOPSLA)
[9]   A big step from finite to infinite computations [J].
Ancona, Davide ;
Dagnino, Francesco ;
Rot, Jurriaan ;
Zucca, Elena .
SCIENCE OF COMPUTER PROGRAMMING, 2020, 197
[10]   Generalizing Inference Systems by Coaxioms [J].
Ancona, Davide ;
Dagnino, Francesco ;
Zucca, Elena .
PROGRAMMING LANGUAGES AND SYSTEMS (ESOP 2017): 26TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2017, 10201 :29-55