Realizing Monads in Interaction Nets via Generic Typed Rules

  • Eugen Jiresch
  • Bernhard Gramlich
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7287)


Interaction net systems are a model of computation based on graph rewriting. We extend interaction rules with generic rules, thus adding a form of higher-order functions. In addition, we propose a simple type system in order to appropriately restrict the matching of generic rules. Finally, we show how the combination of these features, i.e., generic typed rules, can be used to model impure functions in interaction nets via monads in an intuitive and simple manner.


Generic Rule Generic Agent Functional Programming Rule Type Rule Match 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Achten, P., Plasmeijer, R.: The ins and outs of clean I/O. Journal of Functional Programming 5(1), 81–110 (1995)zbMATHCrossRefGoogle Scholar
  2. 2.
    Almeida, J.B., Pinto, J.S., Vilaca, M.: A tool for programming with interaction nets. Electronic Notes in Theoretical Computer Science 219, 83–96 (2008)CrossRefGoogle Scholar
  3. 3.
    Andrei, O., Fernández, M., Kirchner, H., Melançon, G., Namet, O., Pinaud, B.: Porgy: Strategy-driven interactive transformation of graphs. In: Echahed, R. (ed.) TERMGRAPH. EPTCS, vol. 48, pp. 54–68 (2011)Google Scholar
  4. 4.
    de Falco, M.: An explicit framework for interaction nets. CoRR, abs/1010.1066 (2010)Google Scholar
  5. 5.
    Fernández, M.: Type assignment and termination of interaction nets. Mathematical Structures in Computer Science 8(6), 593–636 (1998)MathSciNetzbMATHCrossRefGoogle Scholar
  6. 6.
    Fernández, M., Mackie, I.: From Term Rewriting Systems to Generalized Interaction Nets. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 319–333. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  7. 7.
    Fernández, M., Mackie, I.: Interaction nets and term rewriting systems. Theoretical Computer Science (1997)Google Scholar
  8. 8.
    Fernández, M., Mackie, I.: Operational equivalence for interaction nets. Theoretical Computer Science 197 (2003)Google Scholar
  9. 9.
    Fernández, M., Mackie, I., Pinto, J.S.: Combining interaction nets with externally defined programs. In: Proc. Joint Conference on Declarative Programming (APPIA-GULP-PRODE 2001), Évora (2001)Google Scholar
  10. 10.
    Gay, S.J.: Interaction Nets. Master’s thesis, University of Cambridge Computer Laboratory (1991)Google Scholar
  11. 11.
    Hassan, A., Jiresch, E., Sato, S.: An implementation of nested pattern matching in interaction nets. Electronic Proceedings in Theoretical Computer Science (EPTCS) 21, 13–25 (2010)CrossRefGoogle Scholar
  12. 12.
    Hassan, A., Sato, S.: Interaction nets with nested pattern matching. Electr. Notes Theor. Comput. Sci. (ENTCS) 203(1), 79–92 (2008)MathSciNetCrossRefGoogle Scholar
  13. 13.
    The inets project site, (accessed February 27, 2012)
  14. 14.
    Jiresch, E.: Realizing Impure Functions in Interaction Nets. In: Ehrig, H., Rensink, A., Rozenberg, G., Schürr, A. (eds.) ICGT 2010. LNCS, vol. 6372, pp. 394–396. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  15. 15.
    Jiresch, E.: Realizing impure functions in interaction nets. In: ECEASST, vol. 38 (2011)Google Scholar
  16. 16.
    Jones, S.P., Wadler, P.: Imperative functional programming. In: ACM Symposium on Principles of Programming Languages (POPL 2002) (October 1992)Google Scholar
  17. 17.
    Kircher, F., Munoz, C.: The proof monad. Journal of Logic and Algebraic Programming 79, 264–277 (2010)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Lafont, Y.: Interaction nets. In: Proceedings of 17th ACM Symposium on Principles of Programming Languages (POPL 1990), pp. 95–108 (1990)Google Scholar
  19. 19.
    Lafont, Y.: Interaction combinators. Information and Computation 137(1), 69–101 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  20. 20.
    Lippi, S.: in: A Graphical Interpreter for Interaction Nets. In: Tison, S. (ed.) RTA 2002. LNCS, vol. 2378, pp. 380–386. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  21. 21.
    Mackie, I.: YALE: yet another lambda evaluator based on interaction nets. In: International Conference on Functional Programming (ICFP 1998), pp. 117–128 (1998)Google Scholar
  22. 22.
    Mackie, I.: Efficient λ-Evaluation with Interaction Nets. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 155–169. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  23. 23.
    Mackie, I.: Towards a programming language for interaction nets. Electr. Notes Theor. Comput. Sci. (ENTCS) 127(5), 133–151 (2005)CrossRefGoogle Scholar
  24. 24.
    Mackie, I.: A Visual Model of Computation. In: Kratochvíl, J., Li, A., Fiala, J., Kolman, P. (eds.) TAMC 2010. LNCS, vol. 6108, pp. 350–360. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  25. 25.
    Mackie, I., Pinto, J.S., Vilaça, M.: Visual programming with recursion patterns in interaction nets. In: ECEASST, vol. 6 (2007)Google Scholar
  26. 26.
    Moggi, E.: Notions of computation and monads. Information and Computation 93(1), 55–92 (1191)Google Scholar
  27. 27.
    Wadler, P.: How to declare an imperative. ACM Comp. Surveys 29(3), 240–263 (1997)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Eugen Jiresch
    • 1
  • Bernhard Gramlich
    • 1
  1. 1.Institute for Computer LanguagesVienna University of TechnologyAustria

Personalised recommendations