World Library  
Flag as Inappropriate
Email this Article

EuLisp

Article Id: WHEBN0004158686
Reproduction Date:

Title: EuLisp  
Author: World Heritage Encyclopedia
Language: English
Subject: Lisp (programming language), Dylan (programming language), History of software, Timeline of programming languages
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

EuLisp

EuLisp
Paradigm(s) multi-paradigm: functional, procedural, meta, object-oriented
Family Lisp
Appeared in 1990
Preview release 0.991 / 2010
Typing discipline strong, dynamic
Major implementations EuXLisp [1], Youtoo [2], Eu2C [3]
Influenced by Common Lisp InterLisp LeLisp Lisp/VM Scheme T CLOS, ObjVlisp, Oaklisp Dylan
Influenced Dylan, ISLISP
OS Linux
Filename extension(s) .em

EuLisp is a statically and dynamically scoped Lisp dialect developed by a loose formation of industrial and academic Lisp users and developers from around Europe. The standardizers intended to create a new Lisp "less encumbered by the past" (compared to Common Lisp), and not so minimalistic as Scheme. Another objective was to integrate the Object-oriented programming paradigm well.

Origin

Language definition process first began in a meeting in 1985 in Paris and took a long time. The complete specification and a first implementation (interpreted-only) was available in 1990.

Distinguishing features

Its primary characteristics are that it is a Lisp-1 (no separate function and variable namespaces), has a CLOS-style (Common Lisp Object System) generic-function type object-oriented system named TELOS (The EuLisp Object System) integrated from the ground up, has a built-in module system, and is defined in layers to promote the use of the Lisp on small, embedded hardware and educational machines. It supports continuations, though not as powerfully as Scheme. It has a simple lightweight process mechanism (threads).

Summary

Implementations

An early implementation of EuLisp was FEEL (Free and Eventually Eulisp). The successor to FEEL was Youtoo (interpreted and compiled versions), by University of Bath in the United Kingdom. An interpreter for the basic level of EuLisp, "level-0", was written by Russell Bradford in XScheme, an implementation of Scheme by David Michael Betz, originally called EuScheme but the most recent version is renamed EuXLisp [4] to avoid confusion. Also Eu2C [5], a EuLisp optimizing compiler, was created by Fraunhofer ISST under the APPLY project in Germany [6].

A dialect of EuLisp was developed, called Plural EuLisp; it was EuLisp with parallel programming extensions.

Example

Example use of classes in the algorithm to solve the "Towers of Hanoi" problem.

(defmodule hanoi
  (syntax (syntax-0)
   import (level-0)
   export (hanoi))

;;;-----------------------------------------------------------------------------
;;; Tower definition
;;;-----------------------------------------------------------------------------
(defconstant *max-tower-height* 10)

(defclass  ()
  ((id reader: tower-id keyword: id:)
   (blocks accessor: tower-blocks)))

(defun build-tower (x n)
  (labels ((loop (i res)
                 (if (= i 0) res
                   (loop (- i 1) (cons i res)))))
          ((setter tower-blocks) x (loop n ()))
          x))

(defmethod generic-print ((x ) (s ))
  (sformat s "#" (tower-id x) (tower-blocks x)))

;;;-----------------------------------------------------------------------------
;;; Access to tower blocks
;;;-----------------------------------------------------------------------------
(defgeneric push (x y))

(defmethod push ((x ) (y ))
  (let ((blocks (tower-blocks x)))
    (if (or (null? blocks) (< y (car blocks)))
        ((setter tower-blocks) x (cons y blocks))
      (error 
             (fmt "cannot push block of size ~a on tower ~a" y x)))))

(defgeneric pop (x))

(defmethod pop ((x ))
  (let ((blocks (tower-blocks x)))
    (if blocks
        (progn
          ((setter tower-blocks) x (cdr blocks))
          (car blocks))
      (error 
             (fmt "cannot pop block from empty tower ~a" x)))))

;;;-----------------------------------------------------------------------------
;;; Move n blocks from tower x1 to tower x2 using x3 as buffer
;;;-----------------------------------------------------------------------------
(defgeneric move (n x1 x2 x3))

(defmethod move ((n ) (x1 ) (x2 ) (x3 ))
  (if (= n 1)
      (progn
        (push x2 (pop x1))
        (print x1 nl x2 nl x3 nl nl))
    (progn
      (move (- n 1) x1 x3 x2)
      (move 1 x1 x2 x3)
      (move (- n 1) x3 x2 x1))))

;;;-----------------------------------------------------------------------------
;;; Initialize and run the 'Towers of Hanoi'
;;;-----------------------------------------------------------------------------
(defun hanoi ()
  (let ((x1 (make  id: 0))
        (x2 (make  id: 1))
        (x3 (make  id: 2)))
    (build-tower x1 *max-tower-height*)
    (build-tower x2 0)
    (build-tower x3 0)
    (print x1 nl x2 nl x3 nl nl)
    (move *max-tower-height* x1 x2 x3)))

(hanoi)

;;;-----------------------------------------------------------------------------
)  ;; End of module hanoi
;;;-----------------------------------------------------------------------------

References

  • "An Overview of EuLisp", Julian Padget, Greg Nuyens, and Harry Bretthauer, editors. Lisp and Symbolic Computation, Volume 6, Number 1-2, 1993, pages 9–98.
  • "Balancing the EuLisp Metaobject Protocol", Harry Bretthauer, Jürgen Kopp, Harley Davis, and Keith Playford. Lisp and Symbolic Computation, Volume 6, Issue 1-2, August 1993, pages 119-138.
  • "EuLisp in Education", R. Bradford and D.C. DeRoure. Lisp and Symbolic Computation, Volume 6, Number 1-2, pages 99–118.
  • "Applications of Telos", Peter Broadbery, Christopher Burdorf. Lisp and Symbolic Computation, Volume 6, Issue 1-2, August 1993, pages 139-158.
  • "A Practical Approach to Type Inference for EuLisp", Andreas Kind and Horst Friedrich. Lisp and Symbolic Computation, Volume 6, Issue 1-2, August 1993, pages 159-176.
  • "EuLisp Threads: A Concurrency Toolbox", Neil Berrington, Peter Broadbery, David DeRoure, and Julian Padget. Lisp and Symbolic Computation, Volume 6, Issue 1-2, August 1993, pages 177-200.
  • "Plural EuLisp: A Primitive Symbolic Data Parallel Model", Simon Merrall, Julian Padget. Lisp and Symbolic Computation, Volume 6, Issue 1-2, August 1993, pages 201-219.
  • "A Conservative Garbage Collector for an EuLisp to ASM/C Compiler", E. Ulrich Kriegel. OOPSLA'93 Workshop on Garbage Collection and Memory Management, Washington, DC, September 27, 1993.
  • "An Implementation of Telos in Common Lisp", Object Oriented Systems, vol. 3, pp. 31–49, 1996. ISSN 0969-9767.

External links

  • EuLisp FAQ and links
  • Version .99 of the final 1993 specification. -(PDF)
  • Version .991 unofficial updated draft definition (2010). -(PDF)
  • Youtoo
  • EuScheme sources
  • Youtoo -- latest version including 64bit support and lots more
  • EuXLisp -- latest version
  • Eu2C -- latest version
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 Project Gutenberg 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.