Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add graph module description #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/main/kotlin/org/objectionary/ddr/graph/doc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
### Inheritance graph

Graph module takes a collection of `org.w3c.dom.Document` objects and constructs an inheritance graph, connecting all of them.
With this graph you can access the list of all the attributes present in an object in constant time.

#### Example:

Consider the following EO program.

```
[] > animal
[] > live
[] > eat
stdout > @
"Animal is eating"
stdout > @
"Animal is alive"
[t] > talk
live > @

[] > mouse
animal > @
[] > mouse_live
^.live > @

[] > cat
animal > @
[m] > meow
^.talk "Meow" > @
```

The resulting graph will look like below. Each node is represented with a rectangle. All the attributes
of the node are listed in the rectangle.

![](diag.drawio.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.