From Wikipedia, the free encyclopedia
Jump to: navigation, search
Lisaac logo.png
Paradigm object-oriented prototype-based
Designed by Benoît Sonntag
Developer Benoît Sonntag & Jérôme Boutet
First appeared 2003; 14 years ago (2003)
Stable release
0.13.1 (Specification) / February 17, 2008; 9 years ago (2008-02-17)
Typing discipline static typing
Major implementations
Influenced by
Smalltalk, Self, Eiffel

Lisaac is a statically typed prototype-based language conceived by Benoît Sonntag, in which the Isaac operating system is being written.

The developers of Lisaac also included features such as dynamic inheritance from Self and contract programming from Eiffel. Despite being statically typed, it also shows homoiconic properties. The Lisaac transpiler produces optimized ANSI C code. Compiling results show that it is possible to obtain executables from a high-level prototype-based language that are as fast as C programs according to micro benchmarks.[1][2]


  • Communication protection mechanisms
  • Hardware facilities
    • System interrupt support
    • Driver memory mapping
  • Despite being compiled, all objects retain their dynamic abilities

Basic syntax[edit]

Lisaac is case sensitive. Keywords are capitalized (Section, Header, Public, …), type identifiers are written in upper case letters (INTEGER, BOOLEAN, OBJECT, …), and identifiers denoting variables and slots are written in lower case letters. Objects are composed of slots, which can be data or code. The ':' symbol is used to declare types. Slot names are prefixed with a '+' or '-' symbol to indicate whether the slot is local to an object or shared between objects.

Parentheses are used to delimit lists of semicolon separated statements. Statement lists may have zero, one or more return values. The ':=' symbol is used to bind a slot to a statement or statement list that is executed at the loading/initialization of an object. The '<-' symbol is used to bind a slot to a statement list that is executed on the call of the slot.

Dynamic inheritance[edit]

The parent of each object is just a slot that can be assigned as required in the code, for instance:

Section Header


Section Inherit

- videoparent : OBJECT <-
  + result : OBJECT;

 .when 1 then { result := WINDOW;}
 .when 2 then { result := VIDEO_VGA;}
 .when 3 then { result := VIDEO_TVOUT;};


Section Public

- typ : INTEGER;

- decode_stream <-

 putimage decode_to_bitmap;

Operator redefining[edit]

In Lisaac, an operator is a slot and can be redefined. For example, overloading the + operator for a NUMERIC object:

- '+'  Left 80  other:SELF :SELF <- Self - -other;

Or for a matrix:

- '+'  Left 80  other:SELF :SELF <-

        + result : SELF;

        result := SELF.create count; tab.count do {
                        i : INTEGER;
                result.put (item i+other.item i) to i;



Generic objects are supported, for instance:


Contract programming[edit]

Contract programming using Z notation is provided.

External links[edit]

Notes and references[edit]

  1. ^ "Isaac project benchmarks". Archived from the original on 2007-11-12. Retrieved 2007-07-24. 
  2. ^ "Computer Language Benchmarks Game". Archived from the original on 2011-06-03. Retrieved 2009-10-16.