-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide way to debug delta relations and expose iteration counter #2414
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #2414 +/- ##
========================================
Coverage 77.75% 77.75%
========================================
Files 474 479 +5
Lines 31164 31364 +200
========================================
+ Hits 24232 24388 +156
- Misses 6932 6976 +44
|
As discussed offline, an alternative syntax would be:
That would be equivalent to:
For a non-recursive rule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting debug feature.
Shall we document the new syntax on Souffle's web page?
Introducing new way to debug fix point computation on recursive relations:
.debug_delta
.Example:
This produces a new output by storing each tuples from the
@delta_R
relation after each main fix point loop iteration, adding the iteration number where this tuple was produced.To obtain the iteration number, I introduce some new RAM nodes (Assign and Variable) to be able to talk about a variable and modify its value. I used these new nodes to introduce a variable storing the iteration number for each LOOP node.
Now that we have an iteration counter for main iteration loops, we can expose this to the user with the
recursive_iteration_cnt()
intrinsic functor. This has some use cases e.g. when someone wants to control the convergence of the fix point loop :