Skip to content

Context aware alpha conversions - #65

Merged
evinism merged 9 commits into
masterfrom
es/closure_aware_execution
Jan 13, 2019
Merged

evinism merged 9 commits into
masterfrom
es/closure_aware_execution

Conversation

@evinism

@evinism evinism commented Jan 10, 2019 •

Copy link
Copy Markdown
Owner

Makes alpha conversion vars take into account free vars, basically making it so we don't have to have global state of what vars have been used, and allows users to input potentially conflicting etas. Should be much cleaner output now, w.r.t. replaced variables.

Addresses:
#3
#60
parts of: #62

Enables:
#21

🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉 🎉

UPDATE 1:
Added to goldens. It SURE seems like it works now, given previous ones. 6 - 4 also added to goldens.
This probably works, but needs a little bit of academic work to verify I've got this exactly right. It sure FEELS right, but that's not much of a guarantee.

OG:
This doesn't work :(
Take the predecessor function. Expected behavior on prod:
(λn.λf.λx.n((λf.λp.(λx.λy.λf.fxy)(f(p(λa.λb.a)))(p(λa.λb.a)))f)((λx.λy.λf.fxy)xx)(λa.λb.b))(λf.λn.f(f(fn)))

goes to church num 2
(λn.λf.λx.n((λf.λp.(λx.λy.λf.fxy)(f(p(λa.λb.a)))(p(λa.λb.a)))f)((λx.λy.λf.fxy)xx)(λa.λb.b))(λf.λn.f(f(fn))) doesn't on this branch

This should certainly be added to goldens.

@evinism evinism changed the title Es/closure aware execution Context aware alpha conversions Jan 13, 2019
@evinism evinism mentioned this pull request Jan 13, 2019
@evinism
evinism merged commit 7663588 into master Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant