lisp evaluation. Lots of questions

F

fogh

Guest
Hi All,

When I find some lisp code that I want to use (
http://www.cs.berkeley.edu/~russell/code/utilities/binary-tree.lisp ) ,
what is the easiest way to get it in skill ?

Is there a way to turn this to skill ? Or a private func that does it
out-of-the box ?

How about the reverse ? Is it possible to turn skill into lisp ? Are
there bison/lexx files ( or another, equivalent, formal language
definition ) for skill ?
 
Hi Frederic,

Interesting topic!

The trouble is that there are lots of flavours of lisp ;-(
SKILL is essentially based on Franz-Lisp, which predates Common Lisp
(which is the code that you have). Then there's SCHEME - another often
used lisp variant.

Some issues are that because SKILL also allows C-like syntax, the
operator characters are used for C operators, so things like (+ 1 2)
end up as (plus 1 2). And (let* (...)) ends up as (letseq (...)) (there is
(let\* (...)) but I wouldn't use that - it was an attempt at compatibility,
but it's not public.

setf doesn't exist - you have to implement things a little differently if you
want to change the value slot of a variable - setf is a bit like a pointer
assignment in C. You can sort of do it using (set) instead, but it's not
entirely the same.

You can't use - in function names for the operator reason above - the parser
gets confused. Also, SKILL is case sensitive, Common Lisp is not.

Way back when SKILL++ was being developed, and some SCHEME and
Common Lisp features were being introduced (such as CLOS), some attempts
where made for fuller ability to load SCHEME code at least - but it proved
pretty hard - and not worth the effort, particularly as maintaining
existing SKILL compatibility was critical.

I vaguely recall there being some tools that were with the HLDS tools
(Design Planner) which did some conversion between common lisp
and SKILL, since DP had Allegro common lisp as its customisation language.

But to cut a long story short, I don't know of an automated way of doing
the translation that already exists - I guess you could write some code to
do some of it, but you'd probably need to finish it by hand.

Regards,

Andrew.

On Wed, 03 Dec 2003 16:32:33 +0100, fogh
<cad_support@skipthisandunderscores.catena.nl> wrote:

Hi All,

When I find some lisp code that I want to use (
http://www.cs.berkeley.edu/~russell/code/utilities/binary-tree.lisp ) ,
what is the easiest way to get it in skill ?

Is there a way to turn this to skill ? Or a private func that does it
out-of-the box ?

How about the reverse ? Is it possible to turn skill into lisp ? Are
there bison/lexx files ( or another, equivalent, formal language
definition ) for skill ?
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 

Welcome to EDABoard.com

Sponsor

Back
Top