[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Visionaries] Re: WebScheme
From: |
Peter Minten |
Subject: |
Re: [Visionaries] Re: WebScheme |
Date: |
Thu, 08 May 2003 17:36:59 +0200 |
Peter Minten wrote:
>
> Guess what? :-)
Uh ... now this is hard ... nearly got it ... ADDENDUM!
WebScheme has two list structures, one for the classic single linked list and
one for the double linked list. The slist class is called Pair and the dlist
Triple. Triple is a decendant of Pair. Pairs and Triples can contain any data, a
Pair with a value in the next field is simply a one element list (slists are
terminated with a non-list value in the next field). Here's a little table of
what basic fields the classes contain:
Pair || Triple || Comments
---------------------------------------------------------------------------
value || value || car in Scheme
next || next || cdr in Scheme
|| prev ||
I define the following names for the accessors:
* obj.value
* obj.next
* obj.prev
(obj.value, obj.next and obj.prev
are also accessors btw): (cvf) - Content of the Value Field, (cnf) Content of
the Next Field and (cpf) - Content of the Prev Field. These will be both methods
of the lists and generic functions. Note that (car) and (cdr) are NOT supported
in WebScheme (matter of getting rid of very old LISP legacy).
WebScheme also has tree structures. A basic tree node has a parent and children.
In WebScheme a TreeNode has two basic fields: parent and children (a Vector).
The accessors are (besides obj.value / cvf):
* obj.parent
* obj.children
* (cpaf) - Content of the PArent Field
* (ccf) - Content of the Children Field
* (cuf) - Content of the Up (parent) Field
* (cdf) - Contents of the Down Field
The (cpaf), (ccf), (cuf) and (cdf) functions are also in generic form, for
example (cdf some-node) => children-of-some-node.
The TreeNode stuff (parent and children) and Triple stuff is also available as
mixin. The use of this is shown in the Node class, which is a decendant of
TreeNode with Triple mixin. Node has value, next, prev, parent and children.
WebScheme will have build in web support. A WebNode is an object that has
basically four fields:
* sources - WebNodes that point to this node
* targets - WebNodes that this node points too
* arcs-in - Triples that point to this node
* arcs-out - Triples that this node points too
The arcs are implemented using triples.
There are also the classes RdfNode and RdfTriple that decent from respectively
WebNode and Triple and implement RDF specific behaviour.
A quick summary (mainly for the language documenters:
* Pair
- obj.value
- obj.next
- obj.cvf //obj.value
- obj.cnf //obj.next
- (cvf obj)
- (cnf obj)
* Triple < Pair
- obj.prev
- obj.cpf // obj.prev
- (cpf obj)
* TreeNode
- obj.value
- obj.parent
- obj.children
- obj.up //obj.parent
- obj.down //obj.children
- obj.cpaf //obj.parent
- obj.ccf //obj.children
* Node < TreeNode MIXIN Triple
- obj.next
- obj.prev
- obj.cnf //obj.next
- obj.cpf // obj.prev
- (cnf obj)
- (cpf obj)
* WebNode
- obj.sources
- obj.targets
- obj.arcs-in
- obj.arcs-out
Greetings,
Peter
- Dogus (was: Re: [Visionaries] DG-Scheme), Peter Minten, 2003/05/05
- Re: Dogus (was: Re: [Visionaries] DG-Scheme), Norbert Bollow, 2003/05/05
- WebScheme (was: Re: Dogus (was: Re: [Visionaries] DG-Scheme)), Peter Minten, 2003/05/06
- [Visionaries] Re: WebScheme, Peter Minten, 2003/05/07
- Re: [Visionaries] Re: WebScheme,
Peter Minten <=
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/09
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/11
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/11
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/13
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/15
- Re: [Visionaries] WebScheme, James Michael DuPont, 2003/05/15
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/17
- Re: [Visionaries] WebScheme, James Michael DuPont, 2003/05/18
- Re: [Visionaries] WebScheme, James Michael DuPont, 2003/05/18
- Re: [Visionaries] WebScheme, Peter Minten, 2003/05/16