DS
Size: a a a
DS
DF
p
p
P
P
P
AZ
LAM(name, body)
APP(func, argm)
PAR(val0, val1)
LET(name0, name1, expr, body)
let
redexes were found didn't match the leftmost-innermost reduction. This resulted in errors, since pointers would become invalid when the terms they pointed to moved. Today, I noticed that a small change on the ultimate λ-calculus could solve that issue. Instead of a let
with two variables, we use a cpy
with only one. That is, instead of:let [a, b] = 42 in [a, b]
[cpy a = 42, a]
cpy
constructor injects a copy of something into another location, and then returns that thing. The result of this is that 1. the let
constructor becomes smaller (from 3 to 2 fields), 2. the order it is found matches the innermost-leftmost reduction strategy, solving the problem mentioned.p
AZ
AZ
p
S
G
G
S
P
LAM(name, body)
APP(func, argm)
PAR(val0, val1)
LET(name0, name1, expr, body)
let
redexes were found didn't match the leftmost-innermost reduction. This resulted in errors, since pointers would become invalid when the terms they pointed to moved. Today, I noticed that a small change on the ultimate λ-calculus could solve that issue. Instead of a let
with two variables, we use a cpy
with only one. That is, instead of:let [a, b] = 42 in [a, b]
[cpy a = 42, a]
cpy
constructor injects a copy of something into another location, and then returns that thing. The result of this is that 1. the let
constructor becomes smaller (from 3 to 2 fields), 2. the order it is found matches the innermost-leftmost reduction strategy, solving the problem mentioned.P
SK
AZ