interaction-nets

Is it usual for interaction nets to leave piles of redundant fans?

a 夏天 提交于 2019-12-21 03:35:19
问题 I'm compiling lambda calculus terms to interaction nets in order to evaluate them using Lamping's abstract algorithm. In order to test my implementation, I used this church-number division function: div = (λ a b c d . (b (λ e . (e d)) (a (b (λ e f g . (e (λ h . (f h g)))) (λ e . e) (λ e f . (f (c e)))) (b (λ e f . e) (λ e . e) (λ e . e))))) Dividing 4 by 4 (that is, (λ k . (div k k)) (λ f x . (f (f (f (f x))))) ), I get this net: (Sorry for the awful rendering. λ is a lambda, R is root, D is

How do you translate from lambda terms to interaction nets?

馋奶兔 提交于 2019-12-10 15:56:57
问题 On this paper, the author suggests a translation between lambda terms: data Term = Zero | Succ Term | App Term Term | Lam Term and interaction nets: data Net = -- if I understood correctly Apply Net Net Net | Abstract Net Net Net | Delete Net Net Int | Duplicate Net Net Net Int | Erase Net Unfortunately I can not understand his compilation algorithm. It seems like the actual algorithm is missing, and I have no idea what he means with the images on the third page. I've tried understanding it