Oracle-based Dierential Operational Semantics (long version)

Thibaut Girka 1 David Mentré 1 Yann Régis-Gianas 2, 3
3 PI.R2 - Design, study and implementation of languages for proofs and programs
PPS - Preuves, Programmes et Systèmes, Inria Paris-Rocquencourt, UPD7 - Université Paris Diderot - Paris 7, CNRS - Centre National de la Recherche Scientifique : UMR7126
Abstract : Program dierences are pervasive in software development and understanding them is crucial. However, such changes are usually represented as textual dierences with no regard to the syntactic nature of programs or their semantics. Such a representation may be hard to read or reason about and often fails to convey insight on the semantic implications of a change. In this paper, we propose a formal framework to characterize the dierence of behavior between two close programs equivalent or notin terms of their small-step semantics. To this end, we introduce small-step-prediction oracles that consume one reduction step of one program and produce a sequence of reduction steps of the other. Such oracles are operational, handle diverging or stuck computations, and are well-suited for describing local changes, while expressive enough to describe arbitrary ones. They can also be composed, to characterize a dierence as a sequence of simpler dierences. Last but not least, small-prediction-step oracles can be explained to programmers in terms of evaluation of the compared programs. We illustrate this framework by instantiating it on the Imp imperative language, with oracles ranging from trivial equivalence-preserving syntactic transformations to characterized semantic dierences. Through these examples, we show how our framework can be used to relate syntactic changes with their eect on the semantics, or to describe higher-level changes by abstracting away from the small-step semantics presentation. We have dened and proved the framework and the presented examples in the Coq proof assistant, and implemented a proof-of-concept inference tool for the Imp language.
Type de document :
Rapport
[Research Report] Université Paris Diderot / Sorbonne Paris Cité. 2016
Liste complète des métadonnées

https://hal.inria.fr/hal-01419860
Contributeur : Yann Regis-Gianas <>
Soumis le : mardi 20 décembre 2016 - 08:39:33
Dernière modification le : vendredi 25 mai 2018 - 12:02:06
Document(s) archivé(s) le : lundi 20 mars 2017 - 19:10:42

Fichier

long-version.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01419860, version 1

Collections

Citation

Thibaut Girka, David Mentré, Yann Régis-Gianas. Oracle-based Dierential Operational Semantics (long version). [Research Report] Université Paris Diderot / Sorbonne Paris Cité. 2016. 〈hal-01419860〉

Partager

Métriques

Consultations de la notice

2413

Téléchargements de fichiers

6746