InteLib (software library)
From Wikipedia, the free encyclopedia
This article may not meet the general notability guideline or one of the following specific guidelines for inclusion on Wikipedia: Biographies, Books, Companies, Fiction, Music, Neologisms, Numbers, Web content, or several proposals for new guidelines. If you are familiar with the subject matter, please expand or rewrite the article to establish its notability. The best way to address this concern is to reference published, third-party sources about the subject. If notability cannot be established, the article is more likely to be considered for redirection, merge or ultimately deletion, per Wikipedia:Guide to deletion. This article has been tagged since January 2008. |
The creator of this article, or someone who has substantially contributed to it, may have a conflict of interest regarding its subject matter. |
InteLib is a software library written for C++, designed to incorporate Lisp programming into C++ projects.
Contents |
[edit] History
The InteLib library was first introduced in 2000 in the paper by Andrey V Stolyarov and Elena I Bolshakova, named Building functional techniques into an object-oriented language. The paper was presented at JCKBSE 2000 in Brno.
As it is stated at the official InteLib site, the name InteLib stands for Intelligence Library, reflecting the fact the library was intended to help developing applications in the field of artificial intelligence.
[edit] Principles
The library provides an object-oriented model of S-expressions and lets the user build Lisp lists using overloaded C++ operators. Lisp constructs are therefore represented with C++ arithmetic expressions.
The comma operation of C and C++ is used by InteLib to append elements to lists.
[edit] Example
The authors often use the following Lisp function as an example:
(defun isomorphic (tree1 tree2)
(cond ((atom tree1) (atom tree2))
((atom tree2) NIL)
(t (and (isomorphic (car tree1)
(car tree2))
(isomorphic (cdr tree1)
(cdr tree2))
))))
Using InteLib, this Lisp code can be represented with the following expression in C++:
(L|DEFUN, ISOMORPHIC, (L|TREE1, TREE2),
(L|COND,
(L|(L|ATOM, TREE1), (L|ATOM, TREE2)),
(L|(L|ATOM, TREE2), NIL),
(L|T, (L|AND,
(L|ISOMORPHIC, (L|CAR, TREE1),
(L|CAR, TREE2)),
(L|ISOMORPHIC, (L|CDR, TREE1),
(L|CDR, TREE2))
))))
The L
is a variable of the type LListConstructor
which is intvented just to provide an extra operation (L|
).
DEFUN
, ISOMORPHIC
, TREE1
etc. are variables of the class named LSymbol
, which represent the notion of a Lisp symbol (identifier).
[edit] Features
Currently the InteLib library contains a framework for using S-expressions as such (that is, without evaluating them), along with implementations of computation models for Lisp and Scheme. The library is accompanied with interactive interpreters for the supported dialects of both Scheme and Lisp. There are also translators, which take a text in Lisp or Scheme, and produce a module in C++.
The supported dialects of Lisp and Scheme are not standard-compliant.
[edit] Licensing
The library is claimed to be free software. The library part is licensed under LGPL, while translators and interpreters come under strict GPL.