eprintid: 1523431 rev_number: 34 eprint_status: archive userid: 608 dir: disk0/01/52/34/31 datestamp: 2016-10-30 01:54:39 lastmod: 2021-09-18 21:46:13 status_changed: 2017-09-14 11:02:33 type: article metadata_visibility: show creators_name: Jeannin, J-B creators_name: Kozen, D creators_name: Silva, A title: CoCaml: Functional Programming with Regular Coinductive Types ispublished: pub divisions: UCL divisions: B04 divisions: C05 divisions: F48 keywords: Functional programming, coinductive types, recursive types, coalgebra abstract: Functional languages offer a high level of abstraction, which results in programs that are elegant and easy to understand. Central to the development of functional programming are inductive and coinductive types and associated programming constructs, such as pattern-matching. Whereas inductive types have a long tradition and are well supported in most languages, coinductive types are subject of more recent research and are less mainstream. We present CoCaml, a functional programming language extending OCaml, which allows us to define recursive functions on regular coinductive datatypes. These functions are defined like usual recursive functions, but parameterized by an equation solver. We present a full implementation of all the constructs and solvers and show how these can be used in a variety of examples, including operations on infinite lists, infinitary γ-terms, and p-adic numbers. date: 2017-03-03 date_type: published official_url: http://dx.doi.org/10.3233/FI-2017-1473 oa_status: green full_text_type: pub language: eng primo: open primo_central: open_green verified: verified_manual elements_id: 1186974 doi: 10.3233/FI-2017-1473 lyricists_name: Silva, Alexandra lyricists_id: ASILV10 full_text_status: public publication: Fundamenta Informaticae volume: 150 number: 3-4 pagerange: 347-377 issn: 0169-2968 citation: Jeannin, J-B; Kozen, D; Silva, A; (2017) CoCaml: Functional Programming with Regular Coinductive Types. Fundamenta Informaticae , 150 (3-4) pp. 347-377. 10.3233/FI-2017-1473 <https://doi.org/10.3233/FI-2017-1473>. Green open access document_url: https://discovery.ucl.ac.uk/id/eprint/1523431/1/Silva_CoCaml.pdf