Logtalk PDF Print E-mail
Contributed by Paulo Jorge Lopes de Moura   
Tuesday, 30 November 1999
Department of Mathematics and Informatics
University of Beira Interior
Rua Marques dAvila e Bolama
6201-001 Covilha Portugal

Some years ago, I decided that the best way to learn object-oriented programming was to build my own objectoriented language. Prolog always being my favorite language, I chose to extend it with object-oriented capabilities. Eventually this work has lead to the Logtalk system. The first public release of Logtalk 1.x occurred in February of 1995. Based on feedback by users and on the author subsequent work, the second major version went public in July of 1998.

Although this version of Logtalk shares many ideas and goals with previous 1.x versions, programs written for one version are not compatible with the other (however, conversion from previous versions can easily be accomplished in most cases). This is a consequence of the desire to have a more friendly system, with a very smooth learning curve, bringing Logtalk programming closer to traditional Prolog programming. There are, of course, also other important changes, that result in a more powerful and funnier system.

Dokumentasi Teridiri Dari:

  • Dokumentasi,
  • Petunjuk Penggunaan,
  • Tutorial
  • Referensi Pemrograman




    Logtalk features

  • Integration of logic and object-oriented programming
  • Integration of event-driven and object-oriented programming
  • Support for both prototype and class-based systems
  • Support for multiple object hierarchies
  • Separation between interface and implementation
  • Private, protected and public inheritance
  • Private, protected and public object predicates
  • Parametric objects
  • Smooth learning curve
  • Compatibility with most Prologs and the ISO standard

    Message sending

  • Operators used in message sending
  • Sending a message to an object
  • Broadcasting
  • Sending a message to self
  • Calling an overridden predicate definition
  • Message sending and event generation


  • Objects, prototypes, classes and instances
  • Defining a new object
  • Parametric objects
  • Finding defined objects
  • Creating a new object in runtime
  • Abolishing an existing object
  • Object directives
  • Object initialization
  • Dynamic objects
  • Object dependencies
  • Object documentation
  • Object relationships
  • Object properties
  • The pseudo-object user


  • Defining a new protocol
  • Finding defined protocols
  • Creating a new protocol in runtime
  • Abolishing an existing protocol
  • Protocol directives
  • Protocol initialization
  • Dynamic protocols
  • Protocol documentation
  • Protocol relationships
  • Protocol properties
  • Implementing protocols


  • Defining a new category
  • Finding defined categories
  • Creating a new category in runtime
  • Abolishing an existing category
  • Category directives
  • Category initialization
  • Dynamic categories
  • Category dependencies
  • Category documentation
  • Category relationships
  • Category properties
  • Importing categories


  • Declaring predicate
  • Scope directives
  • Mode directive
  • Metapredicate directive
  • Discontiguous directive
  • Dynamic directive
  • Documenting directive
  • Defining predicates
  • Object predicates
  • Category predicates
  • Built-in object predicates (methods)
  • Local methods
  • Database methods
  • All solutions methods
  • Reflection methods
  • Predicate properties
  • Finding declared predicates


  • Protocol inheritance
  • Search order for prototype hierarchies
  • Search order for class hierarchies
  • Implementation inheritance
  • Search order for prototype hierarchies
  • Search order for class hierarchies
  • Inheritance versus predicate redefinition
  • Public, protected and private inheritance
  • Composition versus multiple inheritance

    Event-driven programming

  • Definitions
  • Event
  • Monitor
  • Event generation
  • Communicating events to monitors
  • Performance concerns
  • Monitor semantics
  • Activation order of monitors
  • Event handling
  • Finding defined events
  • Defining new events
  • Abolishing defined events
  • Defining event handlers

    Error handling

  • Compiler warnings and errors
  • Unknown entities
  • Singleton variables
  • Redefinition of Prolog built-in predicates
  • Redefinition of Logtalk built-in predicates
  • Redefinition of Logtalk built-in methods
  • Misspell calls of local predicates
  • Portability warnings
  • Other warnings and errors
  • Runtime errors
  • Logtalk built-in predicates
  • Logtalk built-in methods
  • Message sending

    Documenting Logtalk programs

  • Documenting directives
  • Entity directives
  • Predicate directives
  • Processing and viewing documenting files

    Configuring Logtalk

  • Hardware & software requirements
  • Computer and operating system
  • Prolog compiler
  • Configuration file contents

    Installing and running Logtalk

  • Installing Logtalk
  • Directories and files organization
  • Configuration files
  • Logtalk compiler and runtime
  • Library
  • Examples
  • Logtalk source files
  • Loader utility files
  • Running a Logtalk session
  • Starting Logtalk
  • Compiling and loading your programs
  • Compiler option flags
  • Smart compilation of source files
  • Using Logtalk for batch processing

    Programming in Logtalk

  • Logtalk scope
  • Writing programs
  • Source files
  • Portable programs
  • Avoiding common Errors

    [download, 12.3 MB]

Last Updated ( Tuesday, 03 April 2007 )