Skip to content

Commit

Permalink
Added evaluation/empty_relations2 test.
Browse files Browse the repository at this point in the history
  • Loading branch information
azreika committed Nov 23, 2020
1 parent 9674a93 commit f58be49
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/evaluation.at
Expand Up @@ -46,6 +46,7 @@ POSITIVE_TEST([cprog4],[evaluation])
POSITIVE_TEST([cprog5],[evaluation])
POSITIVE_TEST([cproject],[evaluation])
POSITIVE_TEST([empty_relations],[evaluation])
POSITIVE_TEST([empty_relations2],[evaluation])
POSITIVE_TEST([existential],[evaluation])
POSITIVE_TEST([facts],[evaluation])
POSITIVE_TEST([facts2],[evaluation])
Expand Down
21 changes: 21 additions & 0 deletions tests/evaluation/empty_relations2/empty.dl
@@ -0,0 +1,21 @@
// 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

// Tests redundant relation removal when two clauses end up being internally identical.
// See issue #1745.

.decl a(x:number)
a(1).
a(2).

.decl empty(x:number)

.decl useless(A:number)
useless(W) :- a(W).

.decl out(A:number)
.output out
out(K) :- a(K), empty(K).
3 changes: 3 additions & 0 deletions tests/evaluation/empty_relations2/empty.err
@@ -0,0 +1,3 @@
Warning: No rules/facts defined for relation empty in file empty.dl at line 14
.decl empty(x:number)
------^---------------
Empty file.
Empty file.

0 comments on commit f58be49

Please sign in to comment.