// Souffle - A Datalog Compiler
// Copyright (c) 2019, The Souffle Developers. All rights reserved
// Licensed under the Universal Permissive License v 1.0 as shown at:
// - https://opensource.org/licenses/UPL
// - <souffle root>/licenses/SOUFFLE-UPL.txt

// example taken from tests/example/paths

.type Node <: symbol

.decl path   (node1:Node, node2:Node)
.output path   ()
.decl edge   (node1:Node, node2:Node)
.output edge   ()

edge("a","b").
edge("a","c").
edge("b","a").
edge("b","d").

path(X,Y) :- path(X,Z), edge(Z,Y).
path(X,Y) :- edge(X,Y).

