World Library  
Flag as Inappropriate
Email this Article

Lisaac

Article Id: WHEBN0006570627
Reproduction Date:

Title: Lisaac  
Author: World Heritage Encyclopedia
Language: English
Subject: Self (programming language), Prototype-based programming, Eiffel (programming language), Smalltalk, Design by contract
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Lisaac

Lisaac
Paradigm(s) object-oriented prototype-based
Designed by Benoît Sonntag
Developer Benoît Sonntag & Jérôme Boutet
Appeared in 2003
Stable release 0.13.1 (Specification) / February 17, 2008
Typing discipline static typing
Major implementations Lisaac
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.[1][2]

Features

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

Basic syntax

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

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

  • Lisaac on GNA (moved to Alioth)
  • Lisaac on Alioth

Notes and references

  1. ^ "Isaac project benchmarks". Retrieved 2007-07-24. 
  2. ^ "Computer Language Benchmarks Game". Retrieved 2009-10-16. 


This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 



Copyright © World Library Foundation. All rights reserved. eBooks from Hawaii eBook Library are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.