{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,1]],"date-time":"2026-10-01T05:34:53Z","timestamp":1790832893416,"version":"4.1.0"},"reference-count":41,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2020,8,2]],"date-time":"2020-08-02T00:00:00Z","timestamp":1596326400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2020,8,2]]},"abstract":"<jats:p>This paper defines a new type system applied to the fully automatic verification of safety properties of tree-processing higher-order functional programs. We use term rewriting systems to model the program and its semantics and tree automata to model algebraic data types. We define the regular abstract interpretation of the input term rewriting system where the abstract domain is a set of regular languages. From the regular abstract interpretation we derive a type system where each type is a regular language. We define an inference procedure for this type system which allows us check the validity of safety properties. The inference mechanism is built on an invariant learning procedure based on the tree automata completion algorithm. This invariant learning procedure is regularly-complete and complete in refutation, meaning that if it is possible to give a regular type to a term then we will eventually find it, and if there is no possible type (regular or not) then we will eventually find a counter-example.<\/jats:p>","DOI":"10.1145\/3408994","type":"journal-article","created":{"date-parts":[[2020,8,3]],"date-time":"2020-08-03T13:48:02Z","timestamp":1596462482000},"page":"1-29","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":11,"title":["Regular language type inference with term rewriting"],"prefix":"10.1145","volume":"4","author":[{"given":"Timoth\u00e9e","family":"Haudebourg","sequence":"first","affiliation":[{"name":"University of Rennes, France \/ Inria, France \/ CNRS, France \/ IRISA, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Thomas","family":"Genet","sequence":"additional","affiliation":[{"name":"IRISA, France \/ University of Rennes, France"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Thomas","family":"Jensen","sequence":"additional","affiliation":[{"name":"Inria, France"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2020,8,3]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"Term Rewriting and All That","author":"Baader Franz","unstructured":"Franz Baader and Tobias Nipkow . 1998. Term Rewriting and All That . Cambridge University Press . Franz Baader and Tobias Nipkow. 1998. Term Rewriting and All That. Cambridge University Press."},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.2000.855755"},{"key":"e_1_2_2_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535840"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/2951913.2951928"},{"key":"e_1_2_2_5_1","volume-title":"Tools and Algorithms for the Construction and Analysis of Systems","author":"Champion Adrien","unstructured":"Adrien Champion , Tomoya Chiba , Naoki Kobayashi , and Ryosuke Sato . 2018. ICE-Based Refinement Type Discovery for Higher-Order Functional Programs . In Tools and Algorithms for the Construction and Analysis of Systems , Dirk Beyer and Marieke Huisman (Eds.). Springer International Publishing , Cham , 365-384. Adrien Champion, Tomoya Chiba, Naoki Kobayashi, and Ryosuke Sato. 2018. ICE-Based Refinement Type Discovery for Higher-Order Functional Programs. In Tools and Algorithms for the Construction and Analysis of Systems, Dirk Beyer and Marieke Huisman (Eds.). Springer International Publishing, Cham, 365-384."},{"key":"e_1_2_2_6_1","volume-title":"TIP: Tons of Inductive Problems","author":"Claessen Koen","year":"2015","unstructured":"Koen Claessen , Moa Johansson , Dan Ros\u00e9n , and Nicholas Smallbone . 2015 . TIP: Tons of Inductive Problems . In Intelligent Computer Mathematics, Manfred Kerber, Jacques Carette, Cezary Kaliszyk, Florian Rabe, and Volker Sorge (Eds.). Springer International Publishing , Cham , 333-337. Koen Claessen, Moa Johansson, Dan Ros\u00e9n, and Nicholas Smallbone. 2015. TIP: Tons of Inductive Problems. In Intelligent Computer Mathematics, Manfred Kerber, Jacques Carette, Cezary Kaliszyk, Florian Rabe, and Volker Sorge (Eds.). Springer International Publishing, Cham, 333-337."},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1007\/10722167_15"},{"key":"e_1_2_2_8_1","volume-title":"Tree Automata Techniques and Applications. Available on: http:\/\/tata.gforge.inria.fr\/. release October, 12th","author":"Comon Hubert","year":"2007","unstructured":"Hubert Comon , Max Dauchet , R\u00e9mi Gilleron , Christof L\u00f6ding , Florent Jacquemard , Denis Lugiez , Sophie Tison , and Marc Tommasi . 2007. Tree Automata Techniques and Applications. Available on: http:\/\/tata.gforge.inria.fr\/. release October, 12th 2007 . Hubert Comon, Max Dauchet, R\u00e9mi Gilleron, Christof L\u00f6ding, Florent Jacquemard, Denis Lugiez, Sophie Tison, and Marc Tommasi. 2007. Tree Automata Techniques and Applications. Available on: http:\/\/tata.gforge.inria.fr\/. release October, 12th 2007."},{"key":"e_1_2_2_9_1","unstructured":"Experiments. 2020. Experiments with Regular Language Type Inference. https:\/\/people.irisa.fr\/Thomas.Genet\/timbuk\/ timbuk4\/experiments.html  Experiments. 2020. Experiments with Regular Language Type Inference. https:\/\/people.irisa.fr\/Thomas.Genet\/timbuk\/ timbuk4\/experiments.html"},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlamp.2015.05.003"},{"key":"e_1_2_2_11_1","unstructured":"Thomas Genet Yohan Boichut Beno\u00eet Boyer Val\u00e9rie Murat and Yan Salmon. 2001. Reachability Analysis and Tree Automata Calculations. IRISA \/ Universit\u00e9 de Rennes 1. http:\/\/people.irisa.fr\/Thomas.Genet\/timbuk\/  Thomas Genet Yohan Boichut Beno\u00eet Boyer Val\u00e9rie Murat and Yan Salmon. 2001. Reachability Analysis and Tree Automata Calculations. IRISA \/ Universit\u00e9 de Rennes 1. http:\/\/people.irisa.fr\/Thomas.Genet\/timbuk\/"},{"key":"e_1_2_2_12_1","volume-title":"Foundations of Software Science and Computation Structures","author":"Genet Thomas","unstructured":"Thomas Genet , Timoth\u00e9e Haudebourg , and Thomas Jensen . 2018. Verifying Higher-Order Functions with Tree Automata . In Foundations of Software Science and Computation Structures , Christel Baier and Ugo Dal Lago (Eds.). Springer International Publishing , Cham , 565-582. Thomas Genet, Timoth\u00e9e Haudebourg, and Thomas Jensen. 2018. Verifying Higher-Order Functions with Tree Automata. In Foundations of Software Science and Computation Structures, Christel Baier and Ugo Dal Lago (Eds.). Springer International Publishing, Cham, 565-582."},{"key":"e_1_2_2_13_1","volume-title":"Axel Legay, and Val\u00e9rie Murat.","author":"Genet Thomas","year":"2013","unstructured":"Thomas Genet , Tristan Le Gall , Axel Legay, and Val\u00e9rie Murat. 2013 . A Completion Algorithm for Lattice Tree Automata. In Implementation and Application of Automata, Stavros Konstantinidis (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg, 134-145. Thomas Genet, Tristan Le Gall, Axel Legay, and Val\u00e9rie Murat. 2013. A Completion Algorithm for Lattice Tree Automata. In Implementation and Application of Automata, Stavros Konstantinidis (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 134-145."},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jsc.2010.01.009"},{"key":"e_1_2_2_15_1","unstructured":"Timoth\u00e9e Haudebourg and Thomas Genet. 2020. Timbuk 4. https:\/\/gitlab.inria.fr\/regular-pv\/timbuk\/timbuk  Timoth\u00e9e Haudebourg and Thomas Genet. 2020. Timbuk 4. https:\/\/gitlab.inria.fr\/regular-pv\/timbuk\/timbuk"},{"key":"e_1_2_2_17_1","doi-asserted-by":"crossref","unstructured":"J. Roger Hindley. 1969. The Principal Type-Scheme of an Object in Combinatory Logic. Trans. Amer. Math. Soc. 146 ( 1969 ) 29-60. http:\/\/www.jstor.org\/stable\/1995158  J. Roger Hindley. 1969. The Principal Type-Scheme of an Object in Combinatory Logic. Trans. Amer. Math. Soc. 146 ( 1969 ) 29-60. http:\/\/www.jstor.org\/stable\/1995158","DOI":"10.1090\/S0002-9947-1969-0253905-6"},{"key":"e_1_2_2_18_1","unstructured":"Inria. 2016. The Coq proof assistant reference manual: Version 8.6. https:\/\/coq.inria.fr\/distrib\/current\/files\/ReferenceManual.pdf  Inria. 2016. The Coq proof assistant reference manual: Version 8.6. https:\/\/coq.inria.fr\/distrib\/current\/files\/ReferenceManual.pdf"},{"key":"e_1_2_2_19_1","volume-title":"Lambda Lifting: Transforming Programs to Recursive Equations. In FPCA'85 (LNCS","author":"Johnsson Thomas","year":"1985","unstructured":"Thomas Johnsson . 1985 . Lambda Lifting: Transforming Programs to Recursive Equations. In FPCA'85 (LNCS , Vol. 201 ). Springer , 190-203. Thomas Johnsson. 1985. Lambda Lifting: Transforming Programs to Recursive Equations. In FPCA'85 (LNCS, Vol. 201 ). Springer, 190-203."},{"key":"e_1_2_2_20_1","first-page":"103","article-title":"Flow analysis of lazy higher-order functional programs. In Abstract Interpretation of Declarative Languages, Samson Abramsky and Chris Hankin (Eds.)","author":"Jones Neil D.","year":"1987","unstructured":"Neil D. Jones . 1987 . Flow analysis of lazy higher-order functional programs. In Abstract Interpretation of Declarative Languages, Samson Abramsky and Chris Hankin (Eds.) . Ellis Horwood , 103 - 122 . Neil D. Jones. 1987. Flow analysis of lazy higher-order functional programs. In Abstract Interpretation of Declarative Languages, Samson Abramsky and Chris Hankin (Eds.). Ellis Horwood, 103-122.","journal-title":"Ellis Horwood"},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2006.12.030"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1006\/jsco.1996.0002"},{"key":"e_1_2_2_23_1","volume-title":"Automatic presentations of structures","author":"Khoussainov Bakhadyr","unstructured":"Bakhadyr Khoussainov and Anil Nerode . 1995. Automatic presentations of structures . In Logic and Computational Complexity, Daniel Leivant (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg , 367-392. Bakhadyr Khoussainov and Anil Nerode. 1995. Automatic presentations of structures. In Logic and Computational Complexity, Daniel Leivant (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 367-392."},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1480881.1480933"},{"key":"e_1_2_2_25_1","unstructured":"Naoki Kobayashi Ryosuke Sato and Hiroshi Unno. 2011a. MoCHi: Model Checker for Higher-Order Programs. http:\/\/www-kb.is.s.u-tokyo.ac.jp\/~ryosuke\/mochi\/  Naoki Kobayashi Ryosuke Sato and Hiroshi Unno. 2011a. MoCHi: Model Checker for Higher-Order Programs. http:\/\/www-kb.is.s.u-tokyo.ac.jp\/~ryosuke\/mochi\/"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1993498.1993525"},{"key":"e_1_2_2_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/1706299.1706355"},{"key":"e_1_2_2_28_1","volume-title":"Lattice Automata: A Representation for Languages on Infinite Alphabets, and Some Applications to Verification","author":"Gall Tristan Le","year":"2007","unstructured":"Tristan Le Gall and Bertrand Jeannet . 2007 . Lattice Automata: A Representation for Languages on Infinite Alphabets, and Some Applications to Verification . In Static Analysis, Hanne Riis Nielson and Gilberto Fil\u00e9 (Eds.). Springer Berlin Heidelberg , Berlin, Heidelberg , 52-68. Tristan Le Gall and Bertrand Jeannet. 2007. Lattice Automata: A Representation for Languages on Infinite Alphabets, and Some Applications to Verification. In Static Analysis, Hanne Riis Nielson and Gilberto Fil\u00e9 (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 52-68."},{"key":"e_1_2_2_29_1","volume-title":"Automata-Based Abstraction for Automated Verification of Higher-Order Tree-Processing Programs","author":"Matsumoto Yuma","unstructured":"Yuma Matsumoto , Naoki Kobayashi , and Hiroshi Unno . 2015. Automata-Based Abstraction for Automated Verification of Higher-Order Tree-Processing Programs . In Programming Languages and Systems, Xinyu Feng and Sungwoo Park (Eds.). Springer International Publishing , Cham , 295-312. Yuma Matsumoto, Naoki Kobayashi, and Hiroshi Unno. 2015. Automata-Based Abstraction for Automated Verification of Higher-Order Tree-Processing Programs. In Programming Languages and Systems, Xinyu Feng and Sungwoo Park (Eds.). Springer International Publishing, Cham, 295-312."},{"key":"e_1_2_2_30_1","unstructured":"Microsoft Research and Inria. 2013. F*. https:\/\/www.fstar-lang.org  Microsoft Research and Inria. 2013. F*. https:\/\/www.fstar-lang.org"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"e_1_2_2_32_1","volume-title":"LNCS","volume":"2283","author":"Nipkow Tobias","year":"2002","unstructured":"Tobias Nipkow , Lawrence C. Paulson , and Markus Wenzel . 2002 . Isabelle\/HOL-A Proof Assistant for Higher-Order Logic . LNCS , Vol. 2283 . Springer. Tobias Nipkow, Lawrence C. Paulson, and Markus Wenzel. 2002. Isabelle\/HOL-A Proof Assistant for Higher-Order Logic. LNCS, Vol. 2283. Springer."},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1109\/LICS.2006.38"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/1926385.1926453"},{"key":"e_1_2_2_35_1","unstructured":"John Reynolds. 1969. Automatic Computation of Data Set Definitions. Information Processing 68 ( 1969 ) 456-461.  John Reynolds. 1969. Automatic Computation of Data Set Definitions. Information Processing 68 ( 1969 ) 456-461."},{"key":"e_1_2_2_36_1","doi-asserted-by":"crossref","unstructured":"Simona Ronchi Della Rocca. 1988. Principal type scheme and unification for intersection type discipline. Theoretical Computer Science 59 ( 1988 ).  Simona Ronchi Della Rocca. 1988. Principal type scheme and unification for intersection type discipline. Theoretical Computer Science 59 ( 1988 ).","DOI":"10.1016\/0304-3975(88)90101-6"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/1375581.1375602"},{"key":"e_1_2_2_38_1","volume-title":"Modular Verification of Higher-Order Functional Programs","author":"Sato Ryosuke","unstructured":"Ryosuke Sato and Naoki Kobayashi . 2017. Modular Verification of Higher-Order Functional Programs . In Programming Languages and Systems, Hongseok Yang (Ed.). Springer Berlin Heidelberg , Berlin, Heidelberg , 831-854. Ryosuke Sato and Naoki Kobayashi. 2017. Modular Verification of Higher-Order Functional Programs. In Programming Languages and Systems, Hongseok Yang (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 831-854."},{"key":"e_1_2_2_39_1","unstructured":"Niki Vazou. 2016. Liquid Haskell: Haskell as a Theorem Prover. Ph.D. Dissertation. University of California San Diego USA.  Niki Vazou. 2016. Liquid Haskell: Haskell as a Theorem Prover. Ph.D. Dissertation. University of California San Diego USA."},{"key":"e_1_2_2_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/2784731.2784745"},{"key":"e_1_2_2_41_1","volume-title":"Abstract Refinement Types","author":"Vazou Niki","unstructured":"Niki Vazou , Patrick M. Rondon , and Ranjit Jhala . 2013. Abstract Refinement Types . In Programming Languages and Systems, Matthias Felleisen and Philippa Gardner (Eds.). Springer Berlin Heidelberg , Berlin, Heidelberg , 209-228. Niki Vazou, Patrick M. Rondon, and Ranjit Jhala. 2013. Abstract Refinement Types. In Programming Languages and Systems, Matthias Felleisen and Philippa Gardner (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 209-228."},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/2633357.2633366"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3408994","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3408994","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T20:47:59Z","timestamp":1750193279000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3408994"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,8,2]]},"references-count":41,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2020,8,2]]}},"alternative-id":["10.1145\/3408994"],"URL":"https:\/\/doi.org\/10.1145\/3408994","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,8,2]]},"assertion":[{"value":"2020-08-03","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}