{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2024,6,7]],"date-time":"2024-06-07T00:07:25Z","timestamp":1717718845957},"reference-count":51,"publisher":"Cambridge University Press (CUP)","issue":"1","license":[{"start":{"date-parts":[[2015,1,5]],"date-time":"2015-01-05T00:00:00Z","timestamp":1420416000000},"content-version":"unspecified","delay-in-days":0,"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,1]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>In order to achieve competitive performance, abstract machines for Prolog and related languages end up being large and intricate, and incorporate sophisticated optimizations, both at the design and at the implementation levels. At the same time, efficiency considerations make it necessary to use low-level languages in their implementation. This makes them laborious to code, optimize, and, especially, maintain and extend. Writing the abstract machine (and ancillary code) in a higher-level language can help tame this inherent complexity. We show how the semantics of most basic components of an efficient virtual machine for Prolog can be described using (a variant of) Prolog. These descriptions are then compiled to C and assembled to build a complete bytecode emulator. Thanks to the high-level of the language used and its closeness to Prolog, the abstract machine description can be manipulated using standard Prolog compilation and optimization techniques with relative ease. We also show how, by applying program transformations selectively, we obtain abstract machine implementations whose performance can match and even exceed that of state-of-the-art, highly-tuned, hand-crafted emulators.<\/jats:p>","DOI":"10.1017\/s1471068414000672","type":"journal-article","created":{"date-parts":[[2015,1,5]],"date-time":"2015-01-05T10:56:10Z","timestamp":1420455370000},"page":"1-58","source":"Crossref","is-referenced-by-count":2,"title":["Description and Optimization of Abstract Machines in a Dialect of Prolog"],"prefix":"10.1017","volume":"16","author":[{"given":"JOS\u00c9 F.","family":"MORALES","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"MANUEL","family":"CARRO","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"MANUEL","family":"HERMENEGILDO","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"56","published-online":{"date-parts":[[2015,1,5]]},"reference":[{"key":"S1471068414000672_ref44","unstructured":"Taylor A. 1991. High performance prolog implementation through global analysis. Slides of the invited talk at PDK'91, Kaiserslautern, Germany."},{"key":"S1471068414000672_ref33","doi-asserted-by":"publisher","DOI":"10.1007\/10722311_2"},{"key":"S1471068414000672_ref42","unstructured":"Taivalsaari A. 1998. Implementing a Java Virtual Machine in the Java Programming Language. Technical Report, Sun Microsystems. Mar. Technical report SMLI TR-98-64."},{"key":"S1471068414000672_ref41","doi-asserted-by":"crossref","first-page":"17","DOI":"10.1016\/S0743-1066(96)00068-4","article-title":"The execution algorithm of Mercury: An efficient purely declarative logic programming language","volume":"29","author":"Somogyi","year":"1996","journal-title":"Journal of Logic Programming"},{"key":"S1471068414000672_ref9","doi-asserted-by":"crossref","first-page":"48","DOI":"10.7551\/mitpress\/4299.003.0010","volume-title":"Proc. of International Conference on Logic Programming","author":"Debray","year":"1997"},{"key":"S1471068414000672_ref39","doi-asserted-by":"crossref","first-page":"3","DOI":"10.7551\/mitpress\/4299.003.0007","volume-title":"Proc. of International Conference on Logic Programming","author":"Schachte","year":"1997"},{"key":"S1471068414000672_ref49","unstructured":"Warren D. H. D. 1983. An abstract prolog instruction set. Technical Report 309, Artificial Intelligence Center, SRI International, 333 Ravenswood Ave, Menlo Park CA 94025."},{"key":"S1471068414000672_ref36","volume-title":"Dynamic Languages Symposium","author":"Rigo","year":"2006"},{"key":"S1471068414000672_ref35","doi-asserted-by":"publisher","DOI":"10.1145\/1014007.1014010"},{"key":"S1471068414000672_ref31","first-page":"125","volume-title":"Pascal - The Language and its Implementation","author":"Nori","year":"1981"},{"key":"S1471068414000672_ref30","first-page":"49","volume-title":"Proc. of the 3rd ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming","author":"N\u00e4ss\u00e9n","year":"2001"},{"key":"S1471068414000672_ref28","doi-asserted-by":"publisher","DOI":"10.1145\/1389449.1389455"},{"key":"S1471068414000672_ref43","unstructured":"Tarau P. 2006. BinProlog 2006 version 11.x Professional Edition User Guide. BinNet Corporation. URL: http:\/\/www.binnetcorp.com\/."},{"key":"S1471068414000672_ref46","unstructured":"Van Roy P. and Despain A. 1992. High-performance logic programming with the aquarius prolog compiler. IEEE Computer Magazine, 54\u201368."},{"key":"S1471068414000672_ref26","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-24836-1_7"},{"key":"S1471068414000672_ref23","first-page":"113","volume-title":"Proc. of International Symposium on Software Testing and Analysis","author":"Hind","year":"2000"},{"key":"S1471068414000672_ref25","doi-asserted-by":"crossref","unstructured":"Lattner C. and Adve V. 2004. LLVM: A compilation framework for lifelong program analysis & transformation. In Proc. of International Symposium on Code Generation and Optimization (CGO'04), Palo Alto, California.","DOI":"10.1109\/CGO.2004.1281665"},{"key":"S1471068414000672_ref8","first-page":"157","volume-title":"Types in Logic Programming","author":"Dart","year":"1992"},{"key":"S1471068414000672_ref6","first-page":"317","volume-title":"Proc. of 12th International Conference on Logic Programming","author":"Codognet","year":"1995"},{"key":"S1471068414000672_ref38","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-74610-2_27"},{"key":"S1471068414000672_ref7","doi-asserted-by":"crossref","unstructured":"Damas L. and Milner R. 1982. Principal type-schemes for functional programs. In Proc. of 9th Annual Symposium on Principles of Programming Languages, New York, NY, USA, 207\u2013212.","DOI":"10.1145\/582153.582176"},{"key":"S1471068414000672_ref27","doi-asserted-by":"crossref","first-page":"77","DOI":"10.1007\/978-3-540-71410-1_7","volume-title":"Logic-Based Program Synthesis and Transformation (LOPSTR'06)","author":"Morales","year":"2007"},{"key":"S1471068414000672_ref1","doi-asserted-by":"crossref","DOI":"10.7551\/mitpress\/7160.001.0001","volume-title":"Warren's Abstract Machine, A Tutorial Reconstruction","author":"Ait-Kaci","year":"1991"},{"key":"S1471068414000672_ref3","unstructured":"Carlsson M. 1991. The SICStus Emulator. SICS Technical Report T91:15, Swedish Institute of Computer Science."},{"key":"S1471068414000672_ref2","unstructured":"Bueno F. , Deransart P. , Drabent W. , Ferrand G. , Hermenegildo M. , Maluszynski J. and Puebla G. 1997. On the role of semantic approximations in validation and diagnosis of constraint logic programs. In Proc. of 3rd International Workshop on Automated Debugging\u2013AADEBUG'97. University of Link\u00f6ping, Sweden, 155\u2013170."},{"key":"S1471068414000672_ref5","doi-asserted-by":"crossref","unstructured":"Casas A. , Cabeza D. and Hermenegildo M. 2006. A syntactic approach to combining functional notation, lazy evaluation and higher-order in LP systems. In Proc. of 8th International Symposium on Functional and Logic Programming (FLOPS'06). Fuji Susono, Japan, 142\u2013162.","DOI":"10.1007\/11737414_11"},{"key":"S1471068414000672_ref37","doi-asserted-by":"crossref","unstructured":"Santos-Costa V. , Damas L. and Rocha R. 2011. The YAP prolog system. Theory and Practice of Logic Programming. URL: http:\/\/arxiv.org\/abs\/1102.3896v1.","DOI":"10.1017\/S1471068411000512"},{"key":"S1471068414000672_ref4","first-page":"271","volume-title":"Compilers, Architecture, and Synthesis for Embedded Systems","author":"Carro","year":"2006"},{"key":"S1471068414000672_ref50","unstructured":"Wielemaker J. 2010. The SWI-Prolog User's Manual 5.9.9. URL: http:\/\/www.swi-prolog.org."},{"key":"S1471068414000672_ref24","unstructured":"Holmer B. K. 1993. Automatic design of computer instruction sets. Ph.D. thesis, University of California, Berkeley, CA."},{"key":"S1471068414000672_ref19","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45937-5_15"},{"key":"S1471068414000672_ref20","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-60085-2_7"},{"key":"S1471068414000672_ref11","unstructured":"Demoen B. , de la Banda M. G. , Marriott K. , Schachte P. and Stuckey P. 1998. Global variables in HAL, a logic implementation. CW Reports, CW271. Department of Computer Science, K.U. Leuven, Leuven, Belgium."},{"key":"S1471068414000672_ref12","first-page":"1240","volume-title":"Proc. of Computational Logic","author":"Demoen","year":"2000"},{"key":"S1471068414000672_ref14","first-page":"599","volume-title":"Proc. of the 11th International Conference on Logic Programming","author":"Gallagher","year":"1994"},{"key":"S1471068414000672_ref40","first-page":"213","article-title":"Optimal union-find in constraint handling rules","volume":"6","author":"Schrijvers","year":"2006","journal-title":"TPLP"},{"key":"S1471068414000672_ref15","unstructured":"Giannesini F. , Kanoui H. , Pasero R. and Caneghem M. V. 1985. Prolog. InterEditions, 87 Avenue du Maine, 75014, Paris. ISBN 2-7296-0076-0."},{"key":"S1471068414000672_ref21","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2005.02.006"},{"key":"S1471068414000672_ref13","doi-asserted-by":"crossref","unstructured":"Dorward S. , Pike R. , Presotto D. L. , Ritchie D. , Trickey H. and Winterbottom P. 1997. Inferno. In Proc. of 42nd IEEE International Computer Conference, IEEE, Washington, DC, USA.","DOI":"10.1109\/CMPCON.1997.584718"},{"key":"S1471068414000672_ref17","unstructured":"Gudeman D. , Bosschere K. D. and Debray S. 1992. jc: An efficient and portable sequential implementation of Janus. In Proc. of Joint International Conference and Symposium on Logic Programming, MIT, Cambridge, MA, 399\u2013413."},{"key":"S1471068414000672_ref32","unstructured":"Paleczny M. , Vick C. and Click C. 2001. The Java hotspotTM Server Compiler. Proceedings of the 2001 Symposium on JavaTM Virtual Machine Research and Technology Symposium \u2013 Volume 1. JVM'01. USENIX Association. Berkeley, CA, USA."},{"key":"S1471068414000672_ref29","doi-asserted-by":"publisher","DOI":"10.1007\/11562931_5"},{"key":"S1471068414000672_ref45","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(94)90031-0"},{"key":"S1471068414000672_ref18","unstructured":"Henderson F. , Conway T. and Somogyi Z. 1995. Compiling logic programs to C using GNU C as a portable assembler. In Proc. of ILPS 1995 Postconference Workshop on Sequential Implementation Technologies for Logic Programming, Portland, Oregon, 1\u201315."},{"key":"S1471068414000672_ref22","doi-asserted-by":"publisher","DOI":"10.1017\/S1471068411000457"},{"key":"S1471068414000672_ref47","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-45789-5_10"},{"key":"S1471068414000672_ref48","unstructured":"Warren D. 1977. Applied logic\u2013-its use and implementation as programming tool. Ph.D. thesis, University of Edinburgh, UK. Also available as SRI Technical Note 290."},{"key":"S1471068414000672_ref51","first-page":"455","volume-title":"Proc. of 23rd International Conference on Logic Programming","author":"Zhou","year":"2007"},{"key":"S1471068414000672_ref16","volume-title":"Java(TM) Language Specification, The (3rd Edition)","author":"Gosling","year":"2005"},{"key":"S1471068414000672_ref34","doi-asserted-by":"publisher","DOI":"10.1007\/10720327_16"},{"key":"S1471068414000672_ref10","unstructured":"Demoen B. 2012. h-Prolog. URL: http:\/\/people.cs.kuleuven.be\/~bart.demoen\/hProlog\/."}],"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\/S1471068414000672","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,6,6]],"date-time":"2024-06-06T08:13:07Z","timestamp":1717661587000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068414000672\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2015,1,5]]},"references-count":51,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2016,1]]}},"alternative-id":["S1471068414000672"],"URL":"https:\/\/doi.org\/10.1017\/s1471068414000672","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"value":"1471-0684","type":"print"},{"value":"1475-3081","type":"electronic"}],"subject":[],"published":{"date-parts":[[2015,1,5]]}}}