// Souffle - A Datalog Compiler
// Copyright (c) 2016, 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


// Cycles with stuff hanging off them
.decl A(x:number)
A(x) :- B(x).

.decl B(x:number)
B(x) :- A(x).

.decl C(x:number)
.output C
C(1).
C(x) :- A(x), B(x).



.decl D(x:number)
D(x) :- F(x).

.decl E(x:number)
E(x) :- G(x).

.decl F(x:number)
F(x) :- H(x).

.decl G(x:number)
H(x) :- G(x).

.decl H(x:number)
G(x) :- F(x).

.decl I(x:number)
.output I
I(x) :- F(x).



// Cycles of Varying Lenths

.decl S(x:number)
S(x) :- S(x).

.decl M(x:number)
M(x) :- P(x).

.decl P(x:number)
P(x) :- M(x).


.decl T(x:number)
T(x) :- Z(x).
.decl U(x:number)
U(x) :- T(x).
.decl V(x:number)
.output V
V(x) :- U(x).
.decl W(x:number)
W(x) :- V(x).
.decl X(x:number)
X(x) :- W(x).
.decl Y(x:number)
.output Y
Y(x) :- X(x).
.decl Z(x:number)
Z(x) :- Y(x).

