Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for type equivalence instead of equality
- Loading branch information
1 parent
8f900a6
commit a02edd2
Showing
7 changed files
with
52 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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 | ||
|
||
// | ||
// Types components | ||
// Check if types are deduced correctly, created for #1520 | ||
// | ||
|
||
|
||
// aeflores' example | ||
.type BasicBlock <: symbol | ||
|
||
.comp Graph<N> { | ||
.type TNode = N | ||
.decl edge(a:TNode,b:TNode) | ||
} | ||
|
||
.init cfg = Graph<BasicBlock> | ||
|
||
.decl reach(a:BasicBlock, b:BasicBlock, c:BasicBlock) | ||
reach(origin, mid, end) :- reach(origin, z, end), | ||
cfg.edge(z, mid), | ||
mid != end. | ||
|
||
|
||
// azreika's example | ||
.type TypeOne = symbol | ||
.type TypeTwo = TypeOne | ||
|
||
.decl A(X:TypeOne) | ||
A("hello"). | ||
|
||
.decl B(X:TypeTwo) | ||
B(X) :- A(Y), B(X), X != Y. | ||
|
||
.output B() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Warning: No rules/facts defined for relation cfg.edge in file types_components.dl at line 18 | ||
.decl edge(a:TNode,b:TNode) | ||
------------^--------------------- |
Empty file.