tel / ocaml-autos

Infinite state automatons
9 stars 0 forks source link

What's the right way to eliminate these things? #1

Open tel opened 9 years ago

tel commented 9 years ago

Probably something like (unit -> a) -> (b -> unit) -> ('a, 'b) t -> unit is one way. This is even nicer with the terminating machines.

tel commented 9 years ago

Also probably some tie-in with lwt.

tel commented 9 years ago

Also some tie-in with fstreams.

tel commented 9 years ago

What's the universal fold? It would need to be lazy and look something like

type ('i, 'j, 'a) istore = ('i -> 'a) * 'j

val step : ('i, 'j) Moore.t -> ('i, 'j, ('i, 'j) Moore.t) istore

But this is a little weird because ('i, 'j, 'a) istore -> 'a doesn't capture the notion of feeding subsequent values in to the machine.

tel commented 9 years ago

There's also something like val cycle : ('a, 'a) Moore.t -> unit and val cycle : 'a -> ('a, 'a) Mealy.t -> unit which just feed output to input. Maybe this should be called iterate?