in structural operational semantics, an evaluation context is often used to
decompose an expression into a redex and its context. In a formal semantics on
paper, an expression can just be pattern matched over the grammar of an
evaluation context. If one wants to implement such a semantics in
-- evaluation contexts, parameterized by rule to apply
ctxt rule e = rule e `mplus` left (ctxt rule) e `mplus` right (ctxt rule) e
left act e = do { (Plus l r) - return e; lv - act l; return (Plus
lv r) }
right act e = do { (Plus lv@(Val _) r) - return e; rv - act r; return (Plus
lv
Hi there,
in structural operational semantics, an evaluation context is often used to
decompose an expression into a redex and its context. In a formal semantics on
paper, an expression can just be pattern matched over the grammar of an
evaluation context. If one wants to implement such a
On 2/14/07, Klaus Ostermann [EMAIL PROTECTED] wrote:
in structural operational semantics, an evaluation context is often used to
decompose an expression into a redex and its context.
Have you seen
http://citeseer.ist.psu.edu/mcbride01derivative.html
The Derivative of a Regular Type is its