{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,6,23]],"date-time":"2025-06-23T11:10:08Z","timestamp":1750677008758,"version":"3.41.0"},"reference-count":38,"publisher":"Cambridge University Press (CUP)","issue":"3","license":[{"start":{"date-parts":[[2025,6,16]],"date-time":"2025-06-16T00:00:00Z","timestamp":1750032000000},"content-version":"unspecified","delay-in-days":46,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["cambridge.org"],"crossmark-restriction":true},"short-container-title":["Theory and Practice of Logic Programming"],"published-print":{"date-parts":[[2025,5]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>We introduce the framework <jats:italic>FreeCHR<\/jats:italic> which formalizes the embedding of <jats:italic>Constraint Handling Rules<\/jats:italic> (CHR) into a host language, using the concept of <jats:italic>initial algebra semantics<\/jats:italic> from category theory. We hereby establish a high-level implementation scheme for CHR as well as a common formalization for both theory and practice. We propose a lifting of the syntax of CHR via an endofunctor in the category <jats:bold>Set<\/jats:bold> and a lifting of the very abstract operational semantics of CHR into FreeCHR, using the free algebra, generated by the endofunctor. We give proofs for soundness and completeness with its original definition. We also propose a first abstract execution algorithm and prove correctness with the operational semantics. Finally, we show the practicability of our approach by giving two possible implementations of this algorithm in Haskell and Python. Under consideration in Theory and Practice of Logic Programming.<\/jats:p>","DOI":"10.1017\/s1471068425000043","type":"journal-article","created":{"date-parts":[[2025,6,16]],"date-time":"2025-06-16T07:29:18Z","timestamp":1750058958000},"page":"340-373","update-policy":"https:\/\/doi.org\/10.1017\/policypage","source":"Crossref","is-referenced-by-count":0,"title":["FreeCHR \u2013 An Algebraic Framework for Constraint Handling Rules Embeddings"],"prefix":"10.1017","volume":"25","author":[{"ORCID":"https:\/\/orcid.org\/0009-0003-5737-5831","authenticated-orcid":false,"given":"SASCHA","family":"RECHENBERGER","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"THOM","family":"FR\u00dcHWIRTH","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"56","published-online":{"date-parts":[[2025,6,16]]},"reference":[{"key":"S1471068425000043_ref11","first-page":"90","volume-title":"ICLP 2004","author":"Duck","year":"2004"},{"key":"S1471068425000043_ref9","volume-title":"WLP 2006","volume":"1843","author":"De Koninck","year":"2006"},{"volume-title":"GPCE \u201910","year":"2010","author":"Hofer","key":"S1471068425000043_ref18"},{"key":"S1471068425000043_ref15","first-page":"13","volume-title":"RuleML 2015","author":"Fr\u00fchwirth","year":"2015"},{"key":"S1471068425000043_ref25","doi-asserted-by":"publisher","DOI":"10.1145\/158511.158524"},{"key":"S1471068425000043_ref1","first-page":"1","volume-title":"Electronic Notes in Theoretical Computer Science,","volume":"64","author":"Abdennadher","year":"2002"},{"key":"S1471068425000043_ref8","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-17822-6_3"},{"key":"S1471068425000043_ref31","first-page":"1","volume-title":"CHR 2004","author":"Schrijvers","year":"2004"},{"key":"S1471068425000043_ref35","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2009.208"},{"key":"S1471068425000043_ref7","unstructured":"Chin, W. , Sulzmann, M. and Wang, M. 2003. A type-safe embedding of constraint handling rules into haskell. Technical Report. https:\/\/www.academia.edu\/download\/40187865\/A_type-safe_embedding_of_constraint_hand20151119-21055-1osq67f.pdf"},{"key":"S1471068425000043_ref37","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-92243-8_7"},{"key":"S1471068425000043_ref22","first-page":"134","volume-title":"ICSR 1998","author":"Hudak","year":"1998"},{"key":"S1471068425000043_ref26","doi-asserted-by":"publisher","DOI":"10.1145\/1248648.1248653"},{"volume-title":"CHR 2005","year":"2005","author":"Van weert","key":"S1471068425000043_ref36"},{"volume-title":"Category Theory for Programmers","year":"2019","author":"Milewski","key":"S1471068425000043_ref28"},{"key":"S1471068425000043_ref34","first-page":"533","volume-title":"Theory and Practice of Logic Programming","volume":"5","author":"Thielscher","year":"2005"},{"volume-title":"Compilation of Constraint Handling Rules","year":"2005","author":"Duck","key":"S1471068425000043_ref10"},{"volume-title":"GPCE \u201908","year":"2008","author":"Hofer","key":"S1471068425000043_ref19"},{"key":"S1471068425000043_ref24","first-page":"207","volume-title":"TLCA 2007","author":"Johann","year":"2007"},{"volume-title":"Relational Programming in miniKanren: Techniques, Applications, and Implementations","year":"2009","author":"Byrd","key":"S1471068425000043_ref5"},{"volume-title":"JavaCHR \u2013 A Modern CHR-Embedding in Java","year":"2022","author":"Wibiral","key":"S1471068425000043_ref38"},{"key":"S1471068425000043_ref17","first-page":"74","volume-title":"PADL 2015","author":"Hanus","year":"2015"},{"key":"S1471068425000043_ref6","first-page":"222","volume-title":"APLAS 2007","author":"Carette","year":"2007"},{"key":"S1471068425000043_ref30","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-64437-6_9"},{"key":"S1471068425000043_ref13","first-page":"14","volume-title":"CSCLP 2005","author":"Fr\u00fchwirth","year":"2006"},{"key":"S1471068425000043_ref29","first-page":"131","volume-title":"RuleML 2018","author":"Nogatz","year":"2018"},{"key":"S1471068425000043_ref2","first-page":"311","volume-title":"Applied Artificial Intelligence","volume":"14","author":"Abdennadher","year":"2000"},{"key":"S1471068425000043_ref27","first-page":"17","volume-title":"CHR 2006","author":"Lam","year":"2006"},{"key":"S1471068425000043_ref21","first-page":"369","volume-title":"Applied Artificial Intelligence","volume":"14","author":"Holzbaur","year":"2000"},{"key":"S1471068425000043_ref14","doi-asserted-by":"publisher","DOI":"10.1017\/CBO9780511609886"},{"key":"S1471068425000043_ref3","volume-title":"Expert Systems with Applications Part B","volume":"238","author":"Barichard","year":"2024"},{"key":"S1471068425000043_ref23","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.1308.3939"},{"volume-title":"CHR 2007","year":"2007","author":"Betz","key":"S1471068425000043_ref4"},{"volume-title":"Domain-Specific Languages","year":"2011","author":"Fowler","key":"S1471068425000043_ref12"},{"key":"S1471068425000043_ref16","first-page":"1","volume-title":"ACM Transactions on Computational Logic","volume":"19","author":"Gall","year":"2018"},{"key":"S1471068425000043_ref33","first-page":"70","volume-title":"Lecture Notes in Computer Science","author":"Thielscher","year":"2002"},{"key":"S1471068425000043_ref39","first-page":"123","volume-title":"CHR 2007","author":"Wuille","year":"2007"},{"key":"S1471068425000043_ref32","first-page":"1","volume-title":"Theory and Practice of Logic Programming","volume":"10","author":"Sneyers","year":"2010"}],"container-title":["Theory and Practice of Logic Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S1471068425000043","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,23]],"date-time":"2025-06-23T10:40:52Z","timestamp":1750675252000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068425000043\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,5]]},"references-count":38,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2025,5]]}},"alternative-id":["S1471068425000043"],"URL":"https:\/\/doi.org\/10.1017\/s1471068425000043","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"type":"print","value":"1471-0684"},{"type":"electronic","value":"1475-3081"}],"subject":[],"published":{"date-parts":[[2025,5]]},"assertion":[{"value":"\u00a9 The Author(s), 2025. Published by Cambridge University Press","name":"copyright","label":"Copyright","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https:\/\/creativecommons.org\/licenses\/by\/4.0\/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.","name":"license","label":"License","group":{"name":"copyright_and_licensing","label":"Copyright and Licensing"}},{"value":"This content has been made available to all.","name":"free","label":"Free to read"}]}}