A Tool for Describing and Checking Natural Semantics Definitions of Programming Languages

09/20/2022
by   Georgian-Vlad Saioc, et al.
0

Many universities have courses and projects revolving around compiler or interpreter implementation as part of their degree programmes in computer science. In such teaching activities, tool support can be highly beneficial. While there are already several tools for assisting with development of the front end of compilers, tool support tapers off towards the back end, or requires more background experience than is expected of undergraduate students. Structural operational semantics is a useful and mathematically simple formalism for specifying the behaviour of programs and a specification lends itself well to implementation; in particular big-step or natural semantics is often a useful and simple approach. However, many students struggle with learning the notation and often come up with ill-defined and meaningless attempts at defining a structural operational semantics. A survey shows that students working on programming language projects feel that tool support is lacking and would be useful. Many of these problems encountered when developing a semantic definition are similar to problems encountered in programming, in particular ones that are essentially the result of type errors. We present a pedagogical metalanguage based on natural semantics, and its implementation, as an attempt to marry two notions: a syntax similar to textbook notation for natural semantics on the one hand, and automatic verification of some correctness properties on the other by means of a strong type discipline. The metalanguage and the tool provide the facilities for writing and executing specifications as a form of programming. The user can check that the specification is not meaningless as well as execute programs, if the specification makes sense.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/12/2021

Teaching Design by Contract using Snap!

With the progress in deductive program verification research, new tools ...
research
02/21/2023

Denotational Semantics and a Fast Interpreter for jq

jq is a widely used tool that provides a programming language to manipul...
research
02/09/2023

COOLIO: A Language Support Extension for the Classroom Object Oriented Language

COOL is an Object-Oriented programming language used to teach compiler d...
research
05/12/2018

Compiler Construction with Basic Programming Languages Constructs and Generalized Interpreting Automata

We have been developing and applying an approach to teach compiler const...
research
11/17/2017

Towards operational natural language

The multiplicity of software projects' stakeholders and activities leads...
research
07/20/2023

The best multicore-parallelization refactoring you've never heard of

In this short paper, we explore a new way to refactor a simple but trick...
research
02/13/2018

Extending the DEVS Formalism with Initialization Information

DEVS is a popular formalism to model system behaviour using a discrete-e...

Please sign up or login with your details

Forgot password? Click here to reset