souffle icon indicating copy to clipboard operation
souffle copied to clipboard

EQREL: Faster iterators

Open b-scholz opened this issue 2 years ago • 0 comments

The speed of iterators in EQREL relation can be further improved. For examples such as term rewriting, it would be good to have domain iterators, i.e.,

.decl A(x:number, y:number) eqrel
.decl B(x:number) 
A(1,2).
A(2,3).
B(x):- A(x,x). 
.output A

For such an example, we would like to access the domain of relation A instead of creating all pairs in A and projecting the domain values after for relation B.

Another form would be with unnamed variables, i.e.,

.decl A(x:number, y:number) eqrel
.decl B(x:number) 
A(1,2).
A(2,3).
B(x):- A(x,_); A(_,x); A(x, x). // use domain iterators to improve the runtime accessing the relation
.output A

b-scholz avatar Dec 07 '21 00:12 b-scholz