Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epost/purescript-datalog-graphs
Convert datalog knowledge bases into graphs.
https://github.com/epost/purescript-datalog-graphs
datalog graph
Last synced: 19 days ago
JSON representation
Convert datalog knowledge bases into graphs.
- Host: GitHub
- URL: https://github.com/epost/purescript-datalog-graphs
- Owner: epost
- Created: 2015-11-01T20:05:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-01T20:36:00.000Z (about 9 years ago)
- Last Synced: 2024-10-28T01:47:42.308Z (2 months ago)
- Topics: datalog, graph
- Language: PureScript
- Size: 164 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
#+title:Datalog graphs
Produce graphs:
[[file:./example.png]]
from Datalog knowledge bases using [[https://github.com/epost/purescript-datalog-parsers][purescript-datalog-parsers]]:
#+BEGIN_SRC prolog
% facts
module("Test1").
module("Zoink").
module("Fnord").
data("Traffic").
newtype("Sum").
value("f").
data_ctor("Red", "Traffic").
data_ctor("Green", "Traffic").
data_ctor("Sum", "Sum").
defined_in("Test1", "Zoink").
defined_in("Zoink", "Fnord").
defined_in("Traffic", "Test1").
defined_in("Sum", "Test1").
defined_in("f", "Test1").% rules
defined_in_star(X, Y) :- defined_in(X, Y).
defined_in_star(X, Y) :- defined_in(X, Z), defined_in_star(Z, Y).
#+END_SRCUsing [[https://github.com/epost/psc-query][psc-query]], these can be obtained from PureScript source code:
#+BEGIN_SRC PureScript
module Fnord.Zoink.Test1 wheredata Traffic = Red | Green
newtype Sum a = Sum a
f x = x + 1
#+END_SRC