Hi Thorsten,

> I have a few questions with regards to representing PicoLisp relations
> in UML notation:

Hmm, as I have no experiences with UML, and can't help with that.
However, concerning some of your other questions:


> ,-----------------------------------------------
> | (rel ord (+Dep +Joint)                 # Order
> |    (itm)
> |    pos (+Ord) )
> `-----------------------------------------------
> 
> a syntactic outlier in PicoLisp code, or do I have to expect this to
> happen? Its _much_ more difficult to deal with this via regexp than with
> this: 
> 
> ,--------------------------------------------------
> | (rel ord (+Dep +Joint) (itm) pos (+Ord))  # Order
> `--------------------------------------------------

You could read and print the data in a "flat" format to some file, e.g.:

   (out "er.flat"
      (in "myApp/er.l"
         (while (read) (println @)) ) )

This gives one top-level expression per line which can be easily
'regexp'ed.



> ,-----------------------------------
> | (rel exp (+List +Link) NIL (+Abc))    # why the NIL?
> `-----------------------------------

Good question. Where did you find this? It is definitely wrong, because
'+List' doesn't take any arguments.

   (rel exp (+List +Link) (+Abc))


> ,------------------------------------------
> | (rel ord (+Dep +Joint) (itm) pos (+Ord))   #  why the (itm) ?
> `------------------------------------------

The 'itm' goes with the '+Dep' (dependency) class. It means that this
'ord' relation depends on the 'itm' (item) relation in the same object.
When the 'itm' link is cut off (for example, because the item in that
position is removed), then the whole position will be cut off (become
garbage).


> ,------------------------------------------
> | (rel ord (+Dep +List +Joint) pos (+Ord)) 
> `------------------------------------------
> ...
> ,------------------------------------------
> | (rel ord (+Dep +List +Joint) pos (+List +Ord)) # possible?
> `------------------------------------------

These two are not correct, because the argument for '+Dep' is
missing.

In the second one, the '+List' in (+List +Ord) is also not right. This
is an argument to '+Joint', which expects an +Entity type while '+List'
is a relation class.



> ,-----------------------------------
> | (rel pos (+List +Bag) # Positions
> |  ((+Ref +Link) NIL (+Item)) # Item
> |  ((+Number) 2) # Price
> |  ((+Number)) # Quantity
> |  ((+String)) # Memo text
> |  ((+Number) 2) ) # Total amount
> `-----------------------------------

This looks all right.

Hope this helps a little (though not with the central questions).

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to