{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,16]],"date-time":"2026-07-16T05:47:19Z","timestamp":1784180839563,"version":"3.55.0"},"reference-count":18,"publisher":"Cambridge University Press (CUP)","issue":"5-6","license":[{"start":{"date-parts":[[2016,10,14]],"date-time":"2016-10-14T00:00:00Z","timestamp":1476403200000},"content-version":"unspecified","delay-in-days":43,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Theory and Practice of Logic Programming"],"published-print":{"date-parts":[[2016,9]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Recent work has provided<jats:italic>delimited control<\/jats:italic>for Prolog to dynamically manipulate the program control-flow, and to implement a wide range of control-flow and dataflow effects on top of. Unfortunately, delimited control is a rather primitive language feature that is not easy to use.<\/jats:p><jats:p>As a remedy, this work introduces<jats:italic>algebraic effect handlers<\/jats:italic>for Prolog, as a high-level and structured way of defining new side-effects in a modular fashion. We illustrate the expressive power of the feature and provide an implementation by means of elaboration into the delimited control primitives.<\/jats:p><jats:p>The latter add a non-negligible performance overhead when used extensively. To address this issue, we present an optimised compilation approach that combines partial evaluation with dedicated rewrite rules. The rewrite rules are driven by a lightweight effect inference that analyses what effect operations may be called by a goal. We illustrate the effectiveness of this approach on a range of benchmarks.<\/jats:p>","DOI":"10.1017\/s147106841600034x","type":"journal-article","created":{"date-parts":[[2016,10,15]],"date-time":"2016-10-15T21:28:20Z","timestamp":1476566900000},"page":"884-898","source":"Crossref","is-referenced-by-count":4,"title":["Efficient algebraic effect handlers for Prolog"],"prefix":"10.1017","volume":"16","author":[{"given":"AMR HANY","family":"SALEH","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"TOM","family":"SCHRIJVERS","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2016,10,14]]},"reference":[{"key":"S147106841600034X_ref13","unstructured":"Roy P. V. 1989. A useful extension to Prolog's definite clause grammar notation. In ACM SIGPLAN Notices, Vol. 24, 11, Nov. 1989, 132\u2013134."},{"key":"S147106841600034X_ref3","doi-asserted-by":"publisher","DOI":"10.1017\/S1471068415000137"},{"key":"S147106841600034X_ref4","doi-asserted-by":"publisher","DOI":"10.1145\/362929.362947"},{"key":"S147106841600034X_ref18","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-19797-5_15"},{"key":"S147106841600034X_ref8","unstructured":"Ivanovic D. , Morales Caballero J. F. , Carro M. and Hermenegildo M. 2009. Towards structured state threading in Prolog. In CICLOPS 2009."},{"key":"S147106841600034X_ref10","doi-asserted-by":"publisher","DOI":"10.1145\/2503778.2503791"},{"key":"S147106841600034X_ref14","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45619-8_16"},{"key":"S147106841600034X_ref1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlamp.2014.02.001"},{"key":"S147106841600034X_ref6","doi-asserted-by":"crossref","unstructured":"Felleisen M. 1988. The theory and practice of first-class prompts. POPL '88. 180\u2013190.","DOI":"10.1145\/73560.73576"},{"key":"S147106841600034X_ref2","doi-asserted-by":"crossref","unstructured":"Danvy O. and Filinski A. 1990. Abstracting control. LFP '90. 151\u2013160.","DOI":"10.1145\/91556.91622"},{"key":"S147106841600034X_ref12","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45931-6_24"},{"key":"S147106841600034X_ref7","unstructured":"Holzbaur C. 1992. Meta-structures vs. Attributed Variables in the context of extensible unification. In Proceedings of the 4th International Symposium on Programming Language Implementation and Logic Programming, LNCS, vol. 631. 260\u2013268."},{"key":"S147106841600034X_ref9","doi-asserted-by":"crossref","first-page":"145","DOI":"10.1145\/2500365.2500590","volume-title":"Proceedings of the 18th ACM SIGPLAN International Conference on Functional programming","author":"Kammar","year":"2013"},{"key":"S147106841600034X_ref11","doi-asserted-by":"publisher","DOI":"10.2168\/LMCS-9(4:23)2013"},{"key":"S147106841600034X_ref15","doi-asserted-by":"publisher","DOI":"10.1017\/S1471068413000331"},{"key":"S147106841600034X_ref17","doi-asserted-by":"crossref","first-page":"259","DOI":"10.1145\/2643135.2643145","volume-title":"Proceedings of the 16th International Symposium on Principles and Practice of Declarative Programming","author":"Schrijvers","year":"2014"},{"key":"S147106841600034X_ref16","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2013.05.008"},{"key":"S147106841600034X_ref5","unstructured":"Dolan S. , White L. , Sivaramakrishnan K. , Yallop J. and Madhavapeddy A. 2015. Effective concurrency through algebraic effects. In OCaml Users and Developers Workshop."}],"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\/S147106841600034X","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,7,10]],"date-time":"2022-07-10T13:01:46Z","timestamp":1657458106000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S147106841600034X\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2016,9]]},"references-count":18,"journal-issue":{"issue":"5-6","published-print":{"date-parts":[[2016,9]]}},"alternative-id":["S147106841600034X"],"URL":"https:\/\/doi.org\/10.1017\/s147106841600034x","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"value":"1471-0684","type":"print"},{"value":"1475-3081","type":"electronic"}],"subject":[],"published":{"date-parts":[[2016,9]]}}}