Lisaac
From Wikipedia, the free encyclopedia
| Lisaac | |
|---|---|
| Paradigm | object-oriented prototype-based |
| Appeared in | 2003 |
| Designed by | Benoît Sonntag |
| Developer | Benoît Sonntag & Jérôme Boutet |
| Latest release | 0.12/ September 24, 2007 |
| Typing discipline | static typing |
| Major implementations | Lisaac |
| Influenced by | Smalltalk, Self, Eiffel |
| Website | isaacproject.u-strasbg.fr |
Lisaac is the first compiled object-oriented programming language based on prototype concepts, with system programming facilities and design by contract.
Lisaac's developers admired both Self's flexibility and dynamic inheritance, and Eiffel's static typing and design by contract features. Seeking to combine these two apparently contradictory feature sets, Lisaac was created.
Lisaac was designed as the language in which the Isaac operating system would be programmed.
The Lisaac compiler produces optimized ANSI C code, which can then be compiled on every architecture with an appropriate C compiler which makes Lisaac a real multi-platform language. Compiling results show that it is possible to obtain executables from a high-level prototype-based language that are as fast as C programs[1].
Despite being strongly typed, there is no difference between code and data.
Contents |
[edit] Features
- Communication protection mechanisms
- Hardware facilities
- System interrupt support
- Driver memory mapping
- Despite being compiled, all objects retain their dynamic abilities
[edit] Dynamic inheritance
The parent of each object is just a slot that can be assigned as required in the code, for instance:
- NAME := DECOD_MPEG2_TO_SCREEN
section INHERIT
- videoparent : OBJECT <-
(
+ result : OBJECT;
typ
.when 1 then { result := WINDOW;}
.when 2 then { result := VIDEO_VGA;}
.when 3 then { result := VIDEO_TVOUT;};
result
)
section PUBLIC
- typ : INTEGER;
- decode_flux <-
(
putimage decode_to_bitmap;
)
[edit] Operator redefining
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;
1.to tab.count do {
i : INTEGER;
result.put (item i+other.item i) to i;
};
result
)
[edit] Genericity
Generic objects are supported, for instance:
ARRAY[E], DICTIONARY[KEY,VALUE]
[edit] Contract programming
Contract programming using Z notation is provided.
[edit] External links
[edit] Notes and references
- ^ Isaac project benchmarks. Retrieved on 2007-07-24.

