Do any practical programming languages support term graph rewriting of infinite but regular terms? For example the toy language CoCaml [1] supports computations on infinite regular streams. Coq supports coinduction [2] but not infinitary rewriting, as far as I can tell. By "infinite regular term graph", I mean those inhabitants of coalgebraic datatypes that can be defined in terms of finitely many equations.
- [1] Jean-Baptiste Jeannin, Dexter Kozen, Alexandra Silva (2017) CoCaml: Functional Programming with Regular Coinductive Types
- [2] Yves Bertot, Ekaterina Komendantskaya (2008) Inductive and Coinductive Components of Corecursive Functions in Coq