Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.28 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.28 KB

dog

A Datalog toolkit providing the following:

  • Alex Lexer of the Datalog lexical specification.
  • Happy Parser of the Datalog BNF Grammar.
  • Pretty printer of the Datalog abstract syntax tree (AST) for human consumption.
  • QuickCheck generators for creating random AST fragments
  • QuasiQuoter providing inline definitions of Program.

Table of Contents

Example

{-# LANGUAGE QuasiQuotes #-}

module Main (main) where

import Datalog.QQ (datalog)

main :: IO ()
main = print program

program :: Program
program = [datalog|
  edge(a, b). edge(b, c). edge(c, d). edge(d, a).
  path(X, Y) :- edge(X, Y).
  path(X, Y) :- edge(X, Z), path(Z, Y).
  path(X, Y)?
|]

Roadmap

  • Magic sets implementation

Maintainers

Credit

License

BSD3 2018-2019 Urbint Inc.