The HERCs Prolog home page

A free implementation of Prolog programming language
for Real-Time Embedded Systems and Expert Systems,
for integration with Ruby
and for making Music with MIDI
Note
This website is currently being constructed. Some parts are incomplete, especially manual and examples. Please, contact us for support. To make things more complicated, English is not my primary language, so please, have some mercy.

Table of contents


Features

  • License:
  • Implementation features:
  • Downloads

  • Windows console application: Download
  • OS X console application: Download
  • Linux (Ubuntu) console application: Download
  • Ruby Gem for OS X: Download
  • Ruby Gem for Linux (Ubuntu): Download
  • Source code / SDK:
  • Installation

    The entire Prolog interpreter is contained in just one file. All the necessary Prolog libraries are included inside in a form of internal resources.

    Extract the binary file from downloaded ZIP and copy it into a proper location on your file system. On OS X and Linux most likely it would be your /bin or ~/bin directory. On Windows probably C:/Windows/System32. Alternatively, you can copy it pretty much anywhere else (including Desktop), and it will work equally well. The Ruby Gem will have to be copied to wherever you keep all your other gems.

    To start it, you will have to open the Terminal window, and run the binary using the "studio" command (or "./studio" it you copied it to a location different than /bin). On Windows you can either use the Command Prompt to start studio.exe or simply double click studio.exe binary. This will open an interactive session with Prolog interpreter.

    Inside Ruby, you will have to import the gem and allocate the Prolog engine object. Then you will be able to communicate with the Prolog engine using Ruby's mechanisms. You will also be able to open a separate interactive session with the Prolog engine object. Below are the relevant Ruby's commands:
    require 'HERCs' // opens the gem containing the Prolog engine
    p = HERCs::Prolog.new // instantiates the Prolog engine object
    p.cafe // starts interactive session with the Prolog engine object (until you type [exit] or exit[])
    p.list // shows the prolog modules loaded into the Prolog engine object
    p.res [........] // sends a prolog query to the Prolog engine for processing (encoded as a Ruby's array)
    p.load "modulename.prc" // loads a prolog module into the Prolog engine object

    Real-Time Embedded Systems

    This implementation of Prolog was designed for controlling MIDI equipment (i.e. music synthesisers). As a result it contains mechanisms, which can be very useful in Real-Time and Embedded Systems. Timers, semaphores, thread-synchronisation (ADA-style rendezvous), callbacks (interrupts), it is all here. The system is also designed to be easily embeddable. You can re-assemble your own customised version of the interpreter and embed it. It was successfully tested on single-board computer (KwikByte KB9202). Also, it was inserted into other software projects, such as VST plug-in and a software synthesiser (which will be released in the future).

    HERCs Prolog can be a good choice as a language for embedded systems. It is very small and convenient. Especially if you just need to issue some simple commands or make some procedures. However, you can also build a full-scale embedded expert system. It wouldn't be so easy in another language, such as C/C++.

    Documentation

    At this moment the documentation is not ready. It will gradually grow. If you want to use prolog immediately and for all other enquiries, please, contact us for support.

    Legacy VST plug-ins

    The previous products (Abakos VST synthesiser) can be found here.

    Contact