- Lisaac
Infobox programming language
name = Lisaac
paradigm = object-oriented prototype-based
year =2003
designer = Benoît Sonntag
developer = Benoît Sonntag & Jérôme Boutet
latest_release_version = 0.13.1 (Specification)
latest_release_date =February 17 ,2008
typing =static typing
implementations = Lisaac
dialects =
influenced_by =Smalltalk , Self, Eiffel
influenced =
website = [http://isaacproject.u-strasbg.fr/li.html isaacproject.u-strasbg.fr]Lisaac is the first compiled
object-oriented programming language based on prototype concepts, withsystem programming facilities anddesign by contract .Lisaac's developers admired both Self's flexibility and dynamic inheritance, and Eiffel's
static typing anddesign 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 Ccompiler 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 [cite web |url=http://isaacproject.u-strasbg.fr/li/li_benchs.html |title=Isaac project benchmarks |accessdate=2007-07-24 ] [cite web |url=http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all |title=Computer Language Benchmarks Game |accessdate=2008-07-08 ] .Despite being strongly typed, there is no difference between code and data.
Features
* Communication protection mechanisms
* Hardware facilities
** System interrupt support
** Driver memory mapping
* Despite being compiled, all objects retain their dynamic abilitiesDynamic inheritance
The parent of each object is just a slot that can be assigned as required in the code, for instance:
Section Header - 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_stream <- ( putimage decode_to_bitmap; )
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 )
Genericity
Generic objects are supported, for instance:
ARRAY [E] , DICTIONARY [KEY,VALUE]
Contract programming
Contract programming using
Z notation is provided.External links
* [http://isaacproject.u-strasbg.fr/li.html Official website]
* [https://gna.org/projects/isaac/ Lisaac on GNA]Notes and references
Wikimedia Foundation. 2010.