Objective: in Minimum Context
Salvador Abreu, Daniel Díaz · 2003
Abstract. The current proposals for the inclusion of modules in the ISO Prolog standard are not very consensual. Since a program-structuring feature is required for a production programming language, several alternatives have been explored over the years. In this article we recall and expand on the concepts of Contextual Logic Programming, a powerful and simple mechanism which addresses the general issue of modularity in Logic Pro-grams. We claim that unit arguments are an essential addition to this programming model, illustrate the claim with examples and draw parallels with Object-Oriented programming. We argue that Contextual Logic Programming is an interesting and effective tool for the de-velopment of large-scale programs built upon the Contextual Logic Programming paradigm and argue that contexts with arguments actually provide a powerful, expressive and very convenient means of structuring large applications upon a Prolog basis. We substantiate our claims with examples taken mostly from a “real world ” application, Universidade de Évora’s Academic Information System, which is currently being developed using the prototype im-plementation described in this article. We sketch the most relevant aspects of a new implementation of Contextual Logic Program-ming, GNU Prolog/CX, focusing on the impact on performance of the features which were added to a regular Prolog system, highlighting the low overhead which is incurred in case these extensions are not used.