daml/daml-lf/spec
Sofia Faro e4717654a5
LF spec: Small-step semantics for expression evaluation (#13495)
* LF: Small-step semantics for expression evaluation

This PR factors expression evaluation into two parts:

- a set of evaluation contexts that determine *where to reduce next*
- a set of small-step reduction rules

The PR then redefines the big-step semantics relation as the iteration
of that small-step relation.

The main motivation for this change is to simplify & shorten the
semantics a lot by using evaluation contexts. These contexts not only
determine the evaluation order, they also handle the propagation of
errors from subterms. This means the small-step reduction rules really
only have to deal with redexes, so there's a lot fewer rules.

Incidentally, this change introduces semantics for infinitely looping
terms. Big-step relations generally can't handle infinitely looping
terms, but small-step relations handle them automatically.

I'm not sure if a similar simplification is possible for update
interpretation, but this seems worthwhile for expressions at least.

changelog_begin
changelog_end

* call-by-value, separate app e.c. lines

* split redex evaluation from small-step evaluation

* use kᵪ for erasable kind
2022-04-08 10:45:56 +00:00
..
contract-id.rst Fix some typos in daml-lf .rst files (#13493) 2022-04-05 15:09:53 +02:00
daml-lf-1.rst LF spec: Small-step semantics for expression evaluation (#13495) 2022-04-08 10:45:56 +00:00
experimental.rst update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
transaction.rst update copyright headers (#12240) 2022-01-03 16:36:51 +00:00
value.rst update copyright headers (#12240) 2022-01-03 16:36:51 +00:00