Theory Backtracking
theory Backtracking
imports
HOLCF
Nats
WorkerWrapperNew
begin
section‹Backtracking using lazy lists and continuations›
text‹
\label{sec:ww-backtracking}
To illustrate the utility of worker/wrapper fusion to programming
language semantics, we consider here the first-order part of a
higher-order backtracking language by \<^citet>‹"DBLP:conf/icfp/WandV04"›;
see also \<^citet>‹"DBLP:journals/ngc/DanvyGR01"›. We refer the reader to
these papers for a broader motivation for these languages.
As syntax is typically considered to be inductively generated, with
each syntactic object taken to be finite and completely defined, we
define the syntax for our language using a HOL datatype:
›