From Plain Prolog to Logtalk Objects: Effective Code Encapsulation and Reuse

  • Paulo Moura
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5649)

Abstract

Prolog affords concise, elegant, and clean solutions for many interesting problems, but is not immune to the software engineering challenges of large-scale application development. Code modularization, using modules or objects, is a key feature to keep projects manageable. Since most literature, instruction, and practice focus exclusively on object-oriented languages derived from imperative languages, objects are perceived as alien to logic programming while modules are considered a natural fit. Logtalk is an object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. Logtalk objects are about code encapsulation and reuse, providing an alternative to Prolog module systems, and enabling natural solutions for a wide range of problems that would be awkward to solve using modules. This talk presents the Logtalk design goals, followed by a tutorial on Logtalk programming and some application examples. The talk ends with a discussion on the problems and benefits of developing Logtalk as a portable Prolog application.

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Paulo Moura
    • 1
    • 2
  1. 1.Dep. of Computer ScienceUniversity of Beira InteriorPortugal
  2. 2.Center for Research in Advanced Computing SystemsINESC–PortoPortugal

Personalised recommendations