What is Grap?

Asked by Duncan McGreggor

What is Grap? And how does it relate to Lisp?

Question information

Language:
English Edit question
Status:
Solved
For:
graph-lisp Edit question
Assignee:
No assignee Edit question
Solved by:
Duncan McGreggor
Solved:
Last query:
Last reply:
Revision history for this message
Duncan McGreggor (oubiwann) said :
#1

In short, this project is Grap: graph-lisp, or graph-based Lisp.

Lisp lends itself easily to genetic programming tasks, since s-expressions are easily converted to graph data structures (trees). Instead of a Python implementation of Lisp (e.g., pyLisp-NG which we were using for a while, and upon which graph-lisp is based), we wanted to use graph data structures directly.

In Lisp, operations are represented as nested lists, called s-expressions. In order for Python to evaluate pyLisp-NG s-expressions, the s-expressions had to be parsed and tokens evaluated.

In Grap, operations are represented in graph-form which, in turn, can be represented as a list of edges, or "g-expressions." In order for Python to evaluate g-expressions, the graph tree only need be walked.