-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Verify graph-based Galois connection in tests #382
Comments
Never got around to implementing this 3 years ago, because computing slices was too slow. Now it should be easy, so adding this into the plan. |
It seems that fwd slicing a graph, given some selections on the input expression and environment, sometimes isn't producing enough annotations on the output. This is because some sinks are also being created at run-time which the output will depend on, and these won't be found in the expression/environment. (I think this means that, even if we forward-slice a graph w.r.t all the addresses in the input expression + environment, in some cases, this still wouldn't be enough to produce selections on all the output values). Although this limits whether we can test forward-slicing as an independent procedure, it is still possible to test round-tripping by: performing bwd slicing wrt an output value, extracting all the sinks of the resulting graph (rather than from the original expression/environment), and then fwd slicing wrt these sinks. |
@min-nguyen Yes I think that’s possible in principle (i.e. not ruled out by the laws of Galois connections), although I can’t right now think of a situation where a node can be created that won’t at least depend on an expression found either in the original program or in a closure reachable within the environment. Testing forward-slicing “independently” would then require knowing what these sinks are and essentially treating them similarly to inputs. There may be more thinking to do here, i.e. we might like to determine exactly when these “untracable values” arise (intermediates we can construct without consuming any input resources) and rule them out by establishing appropriate dependencies. But what you’ve done for now looks fine. One thing we should do is assert that |
It's strange, but it seems to be happening. Some entries in the out neighbours are of the form
This currently holds true for all the tests (except the slice/filter case), in a way. Specifically, the result of fwd slicing wrt the sinks of the bwd graph is consistent with the |
Yes I’m looking at that at the moment and it’s good that we can assert that. But how do we know that |
Have you changes |
Now I have! I’m still curious about the other question though.. |
Well the argument |
Ah, right. Yes that’s true. (I’d forgotten that the |
By the way, when you uncomment the tests do the |
Good point, i'll do this now :) |
I reckon this task can be closed if you’ve added that explicit subset check (it will be easy enough to add similar checks later when we come to e.g. switch the linking examples over to the new graph approach). |
Tests should assert round-tripping properties of Galois connection for each test.
The text was updated successfully, but these errors were encountered: