Parentheses and Spider Webs
Why spider webs?


Conclusion: because, unlike parentheses, the spider webs can denote tree structure for text-graphic objects without violating the spatial intergity of the form. Preserving spatial integrity is very important in visual language processing, particularly when dealing with the rich forms found in natural conversational graphics.

Using parentheses to indicate syntax is like using chain saws for all cutting tasks; they handle one gross special case OK, such as strings of text like ) but completely mangle other cases requiring a more delicate touch, such as complex visual forms like:


However, to start at the beginning, the spider webs can show the tree structure of textual symbolic expressions just like parentheses. First, a simple example:

 
Next, a more complex example (which happends to be jmc's condless definition of the member test):

 
So this then is the notation I will use to represent the tree structure for complex visual objects. They are called "trees" even though they look more like roots. The fine lines show the grouping structure of text-graphic objects without violating their visual integrity. The spider webs are simply an overlay to be turned on or off; they show the objects to be members of ordered, recursive lists (during manual manipulation of objects, the order is often ignored and the lists are just used as simple groupings).


Q: But can you still evaluate these forms?

A: Of course. In an editor which can evaluate visual forms, for instance vmacs.

 

Q: So why even bother with this alternate notation for tree-structure? It looks really clumsy compared to parentheses for denoting normal textual Lisp programs

A: Because the spider webs do a job parentheses can't do      they allow specification of the tree structure for complex visual objects without violating their spatial integrity (including but not limited to textual Lisp programs (remember that Lisp text is really just a sequence of visual objects on a display)).

 
and then visual programs are visual data

 
The spider-web notation allows the separation of space and tree in denoting visual objects. An object's spatial location does not determine its tree location. This separation of space and tree is crucial for maximum leverage in describing visual objects and their processing. *


Whereas the traditional Lisp parenthese notation has an implicit left-to-right, top-to-bottom scheme and so for instance trying to notate the visual variable george might become:

 
And the visual object resulting from this assignment might be ... what?

This?

 
Which is a visual something, but it is not george, it is just his parts! Because george is his parts in a particular spatial arrangement, which has been violated by the spatial left-to-right layout schema forced upon us by Lisp parenthese syntax.

Now we could overcome this problem by explicitly specifying the relative spatial location of each of george's parts, like so:

 
Which will tediously do the job, so tediously we are loathe to even complete the example. And which shows how the space-destroying syntax of parentheses prevents us from mentioning george as a first class visual literal      as an integral visual object, the full fledged sum of his parts.

Of course, Python, with its brackets and commas, fairs no better:

 


Payoff: visual language processing

The examples above may be more than trivial, but less than compelling. However, when trying to parse and otherwise process grown-up visual languages with rich spatial syntax, the payoff for the spider webs becomes clear.

For instance, writing a parser for the VennLISP language is easy to conceptualize when we can depict the before and after states, and check the output of our parser during debugging, by showing the trees at every stage:

 

Or consider writing an intrepreter for the CHARGOL recursive Chinese character language. The spider webs make it instantly clear that the complex visual form has an underlying tree structure.

 


Big Payoff: natural visual language processing


And then we move on to the really grown-up stuff. We'll need all the trees we can get in order to parse this natural visual language expression      informal graphics on the wall and in our face!

 

 

Thanks to the spider webs, we can now conceive of, and then write and draw, a visual grammar to represent the underlying syntax for this kind of natural visual language expression.

 

Visually evaluating this form adds the *SIBTRAN-GRAMMAR* to the set of visual grammars know to the resident spatial parser.



* For example, the separation of space and tree then allows a simple defintion of spatial parsing = establishing a relation between space and tree for particular purposes (particular visual languages). That is, to establish a relation between the tree structure of a complex visual object and its underlying tree structure.

The purpose of spatial parsing is to aid in the processing of visual languages. As an operational definition of visual language, we say: A visual language is a set of spatial arrangements of text-graphic symbols with a semantic interpretation that is used in carrying out communicative actions in the world.

Spatial parsing deals with the spatial arrangement of the text-graphic symbols in a visual phrase from a visual language: Spatial parsing is the process of recovering the underlying syntactic structure of a visual communication object from its spatial arrangement .

More here