paxJavaScript and LISPPA technology

  • Thread starter Alexander Baranovsky
  • Start date
A

Alexander Baranovsky

LISPPA (List Processing based on the Polymorphic Arrays) technology is a way
to process dynamic data structures (lists, trees and more) without using
pointers. LISPPA uses polymorphic arrays as a base of the data
representation.

A very important example of polymorphic arrays is the variant arrays in such
languages as Visual Basic, Object Pascal (Delphi) and other. The current
implementation of LISPPA has been created on the base of extension of the
ariant type. All languages of the paxScript scripting engine: paxPascal,
paxBasic, paxC, paxJavaScript support LISPPA.

LISPPA technology uses 4 main concepts:

- Polymorphic arrays.
- Array constructors.
- Reduced assignments.
- Aliases or delegates of variable and terminals.

LISPPA technology considerably simplify the processing of dynamic data
structures in comparison with the technology based on the use of pointers.

For example, the structure of statement which expresses operation of
insertion of item into a linked list

P = [NewItem, P];

and structure of statement which expresses operation of the removing item
from the list

reduced P:= P[1];

are uniform. In another words, they are do not depend from the position of
insertion or deleting (at the top, at the middle, at the tail of list). You
are moving alias, not changing structure of the statement. Both operations
are expressed by single statement. You do not use allocation and
deallocation of memory explicitly. The programming of the dynamic data
structures becomes more safe and free of bugs.

Well known variant types can be easy extended to provide LISPPA. So LISPPA
can be implemented in all programming systems which support the variant
types.

LISPPA considerably extends the applicability of imperative programming
languages in the symbolic computations. Programs, written in paxScript
languages, illustrate the use of LISPPA in the theorem proving and symbolic
differentiation.

LISPPA has theoretical significance as it allows to describe complex
concepts and algorithmes on the base of the concept of polymorphic array.

Finally, LISPPA can be used in JavaScript implementation as an extension of
ECMA standard, paxJavaScript testifies it.

To learn more about LISPPA technology, please visit

http://www.virtlabs.com.ua/paxscript/lisppa.htm

Thank you.

Alexander Baranovsky,
VIRT Laboratory
(e-mail address removed)
www.paxscript.com
 
L

Lasse Reichstein Nielsen

LISPPA (List Processing based on the Polymorphic Arrays) technology is a way
to process dynamic data structures (lists, trees and more) without using
pointers. LISPPA uses polymorphic arrays as a base of the data
representation.

Please don't multipost. You posted the exact same message in
microsoft.public.scripting.jscript. WHen posting the same message to
more than one group, you should use crossposting (writing all
newsgroup names in the Newsgroups: header) instead of multiposting
(posting several identical messages individually). If nothing else,
it saves space on the servers.

Anyway, this is just LISP lists, right? Which just means single linked
lists. While there are operations where single linked lists give good
time complexity, there are also many where they don't (e.g., random
access).

LISPPA has theoretical significance as it allows to describe complex
concepts and algorithmes on the base of the concept of polymorphic array.

I find it a little far reaching to claim theoretical significance for a
notation for linked lists. :)

The "reduced" statement is said to prevent a memory leak. That would
only be the case for a non-garbage-collected language.

When the notation is so LISP-like, it could at least include "car" and
"cdr", instead of illegible expressions like P[0][1] (just P.cadr()
would be fine :)

Since we ar in a Javascript group, I loked at the Binary Trees
example. Apart from writing "NULL" instead of "null" and adding "&" in
some places, the only real difference is the "Reduced assignment", which
overwrites the content of the address, not the binding, of the variable.
It's effectively doing reference variables and overwriting, and in the
given (Javscript) examples, it's really not needed.

I don't think introducing an "AddressOf" operator in modern languages
is a step forward :)

/L
 
A

Alexander Baranovsky

Anyway, this is just LISP lists, right? Which just means single linked
lists. While there are operations where single linked lists give good
time complexity, there are also many where they don't (e.g., random
access).

The concept "linked list" does not depend from a programming language.
:) in LISPPA notation

var L = [100, [200, [300, null]]];

denotes a linked list presented by a polymorphic array in an imperative
language such as JavaScript, Pascal, C or other. The polymorphic arrays
provide the random access.
When the notation is so LISP-like, it could at least include "car" and
"cdr", instead of illegible expressions like P[0][1] (just P.cadr()
would be fine :)

The "car" and "cdr" seems to be not quite usual to denote an array
element in the imperative languages :)
Since we ar in a Javascript group, I loked at the Binary Trees
example. Apart from writing "NULL" instead of "null" and adding "&" in
some places, the only real difference is the "Reduced assignment", which
overwrites the content of the address, not the binding, of the variable.
It's effectively doing reference variables and overwriting, and in the
given (Javscript) examples, it's really not needed.

The reduced assignment provides a way to avoid the memory leak in the
statement like

L = L[1];

In JavaScript the reduced assignment means

var temp = L[1];
L[1] = null;
delete L;
L = temp;

So, you can delete the first item of the L list above effectively and
without memory leak.
I don't think introducing an "AddressOf" operator in modern languages
is a step forward :)

The "AddressOf" designation has been borrowed from VB.NET. I use
"AddressOf "in paxBasic to denote operator which returns delegate of
variable (alias).

A.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top