Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-031-45784-5_3guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Transforming Big-Step to Small-Step Semantics Using Interpreter Specialisation

Published: 23 October 2023 Publication History

Abstract

Natural semantics (big-step) and structural operational semantics (small-step) each have advantages, so it can be useful to produce both semantic forms for a language. Previous work has shown that big-step semantics can be transformed to small-step semantics. This is also the goal of our work, but our main contribution is to show that this can be done by specialisation of an interpreter that imposes a small-step execution on big-step transition rules. This is arguably more direct, transparent and flexible than previous methods. The paper contains two examples and further examples are available in an online repository.

References

[1]
Ager MS Etalle S From natural semantics to abstract machines Logic Based Program Synthesis and Transformation 2005 Heidelberg Springer 245-261
[2]
Ambal, G., Lenglet, S., Schmitt, A., Noûs, C.: Certified derivation of small-step from big-step skeletal semantics. In: Proceedings of PPDP 2022, pp. 11:1–11:48. ACM (2022).
[3]
Beckman L, Haraldson A, Oskarsson Ö, and Sandewall E A partial evaluator, and its use as a programming tool Artif. Intell. 1976 7 4 319-357
[4]
Blazy S and Leroy X Mechanized semantics for the Clight subset of the C language J. Autom. Reasoning 2009 43 3 263-288
[5]
Bruynooghe M, De Schreye D, and Krekels B Compiling control J. Log. Program. 1989 6 2–3 135-162
[6]
Despeyroux T Kahn G, MacQueen DB, and Plotkin G Executable specification of static semantics Semantics of Data Types 1984 Heidelberg Springer 215-233
[7]
Ershov AP On the partial computation principle Inf. Process. Lett. 1977 6 2 38-41
[8]
Felleisen M and Friedman DP de Bakker JW, Nijman AJ, and Treleaven PC A reduction semantics for imperative higher-order languages PARLE Parallel Architectures and Languages Europe 1987 Heidelberg Springer 206-223
[9]
Futamura Y Partial evaluation of computation process - an approach to a compiler-compiler Syst. Comput. Controls 1971 2 5 45-50
[10]
Gallagher, J.P.: Transforming logic programs by specialising interpreters. In: Proceedings of ECAI-86, pp. 109–122 (1986)
[11]
Gallagher, J.P., Hermenegildo, M.V., Kafle, B., Klemen, M., López-García, P., Morales, J.F.: From big-step to small-step semantics and back with interpreter specialisation. In: Proceedings of VPT/HCVS@ETAPS 2020. EPTCS, vol. 320, pp. 50–64 (2020).
[12]
Giacobazzi, R., Jones, N.D., Mastroeni, I.: Obfuscation by partial evaluation of distorted interpreters. In: PEPM, pp. 63–72. ACM (2012).
[13]
Glück R On the generation of specializers J. Funct. Program. 1994 4 4 499-514
[14]
Glück R and Jørgensen J Le Charlier B Generating transformers for deforestation and supercompilation Static Analysis 1994 Heidelberg Springer 432-448
[15]
Hermenegildo MV et al. An overview of Ciao and its design philosophy Theor. Pract. Logic Program. 2012 12 1–2 219-252
[16]
Hill, P.M., Gallagher, J.P.: Handbook of logic in artificial intelligence and logic programming, vol. 5, chap. Meta-Programming in Logic Programming, pp. 421–498. Oxford University Press (1998)
[17]
Hill, P.M., Lloyd, J.W.: Analysis of meta-programs. In: Meta-Programming in Logic Programming, pp. 23–51. MIT Press (1988)
[18]
Huizing C, Koymans R, and Kuiper R Dams D, Hannemann U, and Steffen M A small step for mankind Concurrency, Compositionality, and Correctness 2010 Heidelberg Springer 66-73
[19]
Jones ND, Gomard C, and Sestoft P Partial Evaluation and Automatic Software Generation Prent. Hall 1993
[20]
Jones ND Transformation by interpreter specialisation Sci. Comput. Program. 2004 52 307-339
[21]
Kahn G Brandenburg FJ, Vidal-Naquet G, and Wirsing M Natural semantics STACS 87 1987 Heidelberg Springer 22-39
[22]
Leuschel, M., Jørgensen, J.: Efficient specialisation in Prolog using the hand-written compiler generator LOGEN. Elec. Notes Theor. Comp. Sci. 30(2) (1999).
[23]
Lombardi LA Incremental computation: the preliminary design of a programming system which allows for incremental data assimilation in open-ended man-computer information systems Adv. Comput. 1967 8 247-333
[24]
Nielson, H.R., Nielson, F.: Semantics with applications - a formal introduction. Wiley, Wiley professional computing (1992)
[25]
Nys V and De Schreye D Mesnard F and Stuckey PJ Compiling control as offline partial deduction Logic-Based Program Synthesis and Transformation 2019 Cham Springer 115-131
[26]
Plotkin GD The origins of structural operational semantics J. Log. Alg. Prog. 2004 60–61 3-15
[27]
Plotkin GD A structural approach to operational semantics J. Log. Alg. Prog. 2004 60–61 17-139
[28]
Turchin VF Ganzinger H and Jones ND Program transformation by supercompilation Programs as Data Objects 1986 Heidelberg Springer 257-281
[29]
Vesely F and Fisher K Caires L One step at a time Programming Languages and Systems 2019 Cham Springer 205-231

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
Logic-Based Program Synthesis and Transformation: 33rd International Symposium, LOPSTR 2023, Cascais, Portugal, October 23-24, 2023, Proceedings
Oct 2023
214 pages
ISBN:978-3-031-45783-8
DOI:10.1007/978-3-031-45784-5
  • Editors:
  • Robert Glück,
  • Bishoksan Kafle

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 23 October 2023

Author Tags

  1. Interpreter specialisation
  2. Operational semantics

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media