Skip to content

epost/purescript-datalog-graphs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Datalog graphs

Produce graphs:

./example.png

from Datalog knowledge bases using purescript-datalog-parsers:

% 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).

Using psc-query, these can be obtained from PureScript source code:

module Fnord.Zoink.Test1 where

data Traffic = Red | Green

newtype Sum a = Sum a

f x = x + 1

About

Convert datalog knowledge bases into graphs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published