Under consideration for publication in Theory and Practice of Logic Programming 1 The YAP Prolog System V´ITOR SANTOS COSTA and RICARDO ROCHA DCC & CRACS INESC-Porto LA, Faculty of Sciences, University of Porto R. do Campo Alegre 1021/1055, 4169-007 Porto, Portugal (e-mail: fvsc,
[email protected]) LU´IS DAMAS LIACC, Faculty of Sciences, University of Porto R. do Campo Alegre 1021/1055, 4169-007 Porto, Portugal (e-mail:
[email protected]) submitted 10 October 2009; revised 5 March 2010; accepted 6 February 2011 Abstract Yet Another Prolog (YAP) is a Prolog system originally developed in the mid-eighties and that has been under almost constant development since then. This paper presents the general structure and design of the YAP system, focusing on three important contributions to the Logic Programming community. First, it describes the main techniques used in YAP to achieve an efficient Prolog engine. Second, most Logic Programming systems have a rather limited indexing algorithm. YAP contributes to this area by providing a dynamic indexing mechanism, or just-in-time indexer (JITI). Third, a important contribution of the YAP system has been the integration of both or-parallelism and tabling in a single Logic Programming system. KEYWORDS: Prolog, logic programming system arXiv:1102.3896v1 [cs.PL] 18 Feb 2011 1 Introduction Prolog is a widely used Logic Programming language. Applications include the se- mantic web (Devitt et al. 2005), natural language analysis (Nugues 2006), bioinfor- matics (Mungall 2009), machine learning (Page and Srinivasan 2003), and program analysis (Benton and Fischer 2007), just to mention a few.