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

// This test make sure matching and edge are not considered equivalent by transformer.

.decl edge(v1:symbol, v2:symbol)
.input edge
.decl matching(v1:symbol, v2:symbol) choice-domain v1, v2
.decl notBipartiteMatching()

matching(x,y) :- edge(x,y).

// No two edges share an endpoint.
notBipartiteMatching() :- matching(x, y), matching(x, z), z != y.
notBipartiteMatching() :- matching(y, x), matching(z, x), z != y.

.printsize notBipartiteMatching
