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

后端 未结 1 1736
野的像风
野的像风 2021-02-13 10:31

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-nu

相关标签:
1条回答
  • 2021-02-13 10:51

    Yes, it is usual (but there are techniques to lessen its presence)

    Abstracting from some details of your implementation with Interaction Nets, and also from your hypothesis of soundness of the abstract algorithm for your div, everything seems just fine to me.

    • No further interaction can be applied to the output you show, in spite of chi's claim, because none of the pairs D-e can interact through their principal port.

    • This latter kind of reduction rule (that is not allowed by IN framework) may improve efficiency and it is also sound in some particular cases. Basically, the involved fan must not have any "twin", i.e. there must exists no D' in the net such that eventually the annihilation D-D' can happen. For more details, look at The optimal implementation of functional programming language, chapter Safe nodes (which is available online!), or at the original paper from which that came:

      Asperti, Andrea, and Juliusz Chroboczek. "Safe Operators: Brackets Closed Forever Optimizing Optimal λ-Calculus Implementations." Applicable Algebra in Engineering, Communication and Computing 8.6 (1997): 437-468.

    • Finally, the read-back procedure must be intended not as some sort of external cost for your reduction precedure, but rather as a deferred cost of computing duplication and erasure. As you notice, such a cost is rarely negligible, so if you want to test efficiency in a real-world scenario, always sum up both sharing reduction and read-back reduction.

    0 讨论(0)
提交回复
热议问题