E. Jiresch, B. Gramlich:
"Realizing Monads in Interaction Nets via Generic Typed Rules";
Report No. E1852-2011-0,
Interaction net systems are a model of computation based on graph rewriting. Theyenjoy various nice properties which make them a promising basis for a functional programming
language. However, mechanisms to model impure functions are indispensablefor a practical language. A natural approach to achieve this goal is the systematic use of monads. Yet, specifying the appropriate monads for impure language features is hard,
due to the very restricted form of basic interaction rules. What is missing in particular,are appropriate means to specify higher-order functions and some typing mechanism that restricts computations to reasonable settings.
In this paper, we propose two extensions of interaction nets which solve these problems. First we extend interaction rules with generic rules, thus adding a form of higher-order functions. Moreover, we define constraints on these rules to ensure the preservation of uniform confluence. 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 indeed be employed to model impure functions in interaction nets via monads in an intuitive and simple manner.
interaction nets, side effects, monads, higher-order functions, type systems
Electronic version of the publication:
Created from the Publication Database of the Vienna University of Technology.