Peircers,

We have seen how to take an abstract logical graph
of a sort a person might have in mind to represent
a logical state of affairs and translate it into a
string of characters a computer can translate into
a concrete data structure.

Now we look a little more closely at the finer details of
those data structures, as they work out in this particular
sequence of representations.

As always, until I get around to drawing better graphics,
see the following blog post for a less mutilated figure:

Theme One • A Program Of Inquiry : 9
http://inquiryintoinquiry.com/2018/03/14/theme-one-%e2%80%a2-a-program-of-inquiry-9/

Coding Logical Graphs (cont.)
=============================

It is possible to write a program that parses cactus expressions into fairly close facsimiles of cactus graphs as pointer graph structures in computer memory, doing this in such a way that edges correspond to addresses and nodes correspond to records. I did exactly that in early forerunners of the present program, but it turns out a more robust strategy in the long run, in spite of the seemingly exorbitant investment in nodes at the outset, to implement a more articulate but more indirect type of parsing algorithm, one in which the punctuation marks are not just tacitly converted to addresses in passing but recorded as nodes in roughly the same way as the ordinary identifiers, or paints.

Figure 3 illustrates this type of parsing algorithm, showing the form of pointer graph that results from parsing the cactus expression in Figure 2. A traversal of this graph naturally reconstructs the cactus string that parses into it.

o-----o
o------|--o  |
|  o---o  |  |
o->| ) |--o  |
o---o     |
^   o-----o
|  /   o-----o                o-----o
o--------------------|-/----|--o  |  o-------------|--o  |
|  o---o  o---o  o---o< o---o  |  |  |  o---o  o---o  |  |
o->| a |->| , |->| ( |->| ) |--o  |  o->| d |->| ) |--o  |
o---o  o---o  o---o  o---o     |     o---o  o---o     |
^   o--------------------------o     ^   o------------o
|  /                                 |  /                 o-----o
o------|-/----------------------------------|-/------------------|--o  |
|  o---o< o---o  o---o  o---o   o---o   o---o< o---o  o---o  o---o  |  |
o->| ( |->| , |->| b |->| c |-->| , |-->| ( |->| b |->| e |->| ) |--o  |
o---o  o---o  o---o  o---o   o---o   o---o  o---o  o---o  o---o     |
^   o---------------------------------------------------------------o
|  /
o------|-/---------------------o
|  o---o< o---o  o---o  o---o  |
o->| ( |->| a |->| c |->| e |--o
o---o  o---o  o---o  o---o
^
|
@

( ( a , ( ) ) , b c , ( d ) b e ) a c e

Figure 3.  Parse Graph and Traverse String

A pointer graph of the type shown in Figure 3 has the underlying form of a cactus graph and will normally be convenient to describe in those terms, so long as we remember its level of abstraction lies a step further in the direction of concrete implementation than the last thing we called by that name.

Resources
=========

* Theme One Program • Exposition
( 
http://intersci.ss.uci.edu/wiki/index.php/Theme_One_Program_%E2%80%A2_Exposition
 )

* Theme One Program • Expository Note 4
( 
http://intersci.ss.uci.edu/wiki/index.php/Theme_One_Program_%E2%80%A2_Exposition#Expository_Note_4
 )

--

inquiry into inquiry: https://inquiryintoinquiry.com/
academia: https://independent.academia.edu/JonAwbrey
oeiswiki: https://www.oeis.org/wiki/User:Jon_Awbrey
isw: http://intersci.ss.uci.edu/wiki/index.php/JLA
facebook page: https://www.facebook.com/JonnyCache
-----------------------------
PEIRCE-L subscribers: Click on "Reply List" or "Reply All" to REPLY ON PEIRCE-L 
to this message. PEIRCE-L posts should go to [email protected] . To 
UNSUBSCRIBE, send a message not to PEIRCE-L but to [email protected] with the 
line "UNSubscribe PEIRCE-L" in the BODY of the message. More at 
http://www.cspeirce.com/peirce-l/peirce-l.htm .




Reply via email to