Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Trace with your eyeballs instead of your fingers |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 1.1.118 |
SHA1 sum: | f85126e7d8048915e68287b49948adc5a0d5ded2 |
Author: | Douglas R. Miles <logicmoo@gmail.com> |
Maintainer: | TeamSPoon https://github.com/TeamSPoon/ |
Packager: | TeamSPoon/LogicMoo https://github.com/TeamSPoon/ |
Home page: | https://github.com/TeamSPoon/must_trace |
Download URL: | https://github.com/TeamSPoon/must_trace/releases/*.zip |
Requires: | clause_attvars |
hook_hybrid | |
logicmoo_utils | |
loop_check | |
with_thread_local | |
xlisting |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.0.1 | e354b6ec94e4d210dc364c51a9cd8228c5ee2f11 | 1 | https://github.com/TeamSPoon/must_trace.git |
0.0.2 | f895013ebff3d436c0b34e9b4ac3e27df7f66269 | 1 | https://github.com/TeamSPoon/must_trace.git |
0.0.3 | c3e68c07da9573f4a336407a6abe2ec28011bb95 | 1 | https://github.com/TeamSPoon/must_trace.git |
0.0.4 | 07fe5d8c0134aee8bd3ce3308c6bb5a5b5b37ff7 | 2 | https://github.com/TeamSPoon/must_trace.git |
0.0.7 | 1fca12a042628348a55ab4c119f22583d1ef2792 | 1 | https://github.com/TeamSPoon/must_trace.git |
1.1.111 | 62577ed7d8cf77b192383033ad98f14f0cf8c262 | 2 | https://github.com/TeamSPoon/must_trace.git |
1.1.112 | ead6c6442e0afb7083693f340f8f45c8c56c222c | 1 | https://github.com/TeamSPoon/must_trace.git |
1.1.115 | 1ac84baca53d33e5e7aeef415ecf8a502fb0451b | 1 | https://github.com/TeamSPoon/must_trace.git |
1.1.117 | 6b2a225aab4f39ad854e76036bb789cf6bc0b2e5 | 1 | https://github.com/TeamSPoon/must_trace.git |
1.1.118 | 00348433724541e490540024864a2150445e400d | 1 | https://github.com/TeamSPoon/must_trace.git |
005b8ca901da818a77ee74d4b8832ea185c41c18 | 3 | https://github.com/TeamSPoon/must_trace.git | |
021c7401c4e5f396c487d4cb03a84f6bbbc338ce | 1 | https://github.com/TeamSPoon/must_trace.git | |
08ac6abc2594efad9ad7bb684335e0cbe45b3723 | 1 | https://github.com/TeamSPoon/must_trace.git | |
135323e1e3f3c555b37e0c3216724ca855e5bc16 | 2 | https://github.com/TeamSPoon/must_trace.git | |
3292ff9730d8d67205a0636313fba5f9b0f03a31 | 1 | https://github.com/TeamSPoon/must_trace.git | |
39126cce8a49473a9aa98fa2beeabd6c4ff5934f | 2 | https://github.com/TeamSPoon/must_trace.git | |
4137477032436b5c64a6fe5574fd431aba6b6af7 | 1 | https://github.com/TeamSPoon/must_trace.git | |
444673fd148cd5d346eed462cd86328d80f45b64 | 1 | https://github.com/TeamSPoon/must_trace.git | |
48c68214d67e2df7089dff01f1ac5540d2bae33a | 1 | https://github.com/TeamSPoon/must_trace.git | |
578057e0a08ea14397e7d07091e6feabfc4912f2 | 12 | https://github.com/TeamSPoon/must_trace.git | |
5d22b6b4c9c05ffe3bbad8bed51e2d3d44aa1a2a | 1 | https://github.com/TeamSPoon/must_trace.git | |
61becd52fa657bf474b4b89a63913d503c9f1902 | 1 | https://github.com/TeamSPoon/must_trace.git | |
b5be4dd2a590d66bb1e7e10f2673a98a1946a70a | 1 | https://github.com/TeamSPoon/must_trace.git | |
cf35c39cffc0532f8be0b7087cf08b77b9551015 | 3 | https://github.com/TeamSPoon/must_trace.git | |
dcb81f7911bdb3fd60779a09106134094f893e46 | 1 | https://github.com/TeamSPoon/must_trace.git | |
f28d114821b646ff7899a07828c6ef6f767c9be1 | 1 | https://github.com/TeamSPoon/must_trace.git | |
f85126e7d8048915e68287b49948adc5a0d5ded2 | 1 | https://github.com/TeamSPoon/must_trace.git |
This is a miniture part of a very large debugging library... Some better parts of that library are not yet added.
Here are current uses:
Wrap quietly/1 over parts of your code you no longer need to stepped thru. This is a nondeterministic version of notrace/1!
Wrap must/1 over parts of your code you do not trust yet.
If your code fails.. it will rewind to your entry block (at the scope of this declaration) and invoke rtrace/1 .
If there are 50 steps to your code, it will save you from pushing creep
50 times.
Instead it turns off the leash to allow you to trace with your eyeballs instead of your fingers
Wrap sanity/1 over parts of your code you want to turn on/off that is only usefull for slow debugging
Wrap nop/1 over parts of your code you do not want to quickly comment out yet not break syntax.
`?- pack_install('https://github.com/TeamSPoon/must_trace.git'). `
TODO Document all the preds! TODO More Examples!
Source code available and pull requests accepted at http://github.com/TeamSPoon/must_trace
?- use_module(library(must_trace)). true. ?- rtrace(member(X,[1,2,3])). Call: (9) lists:member(_8730, [1, 2, 3]) Unify: (9) lists:member(_8730, [1, 2, 3]) Exit: (9) lists:member(1, [1, 2, 3]) X = 1 ; Redo: (9) lists:member(_8730, [1, 2, 3]) Exit: (9) lists:member(2, [1, 2, 3]) X = 2 ; Redo: (9) lists:member(_8730, [1, 2, 3]) Exit: (9) lists:member(3, [1, 2, 3]) X = 3. ?- rtrace(member(X,[1,2,3])),member(Y,[4,5]). Call: (10) lists:member(_10508, [1, 2, 3]) Unify: (10) lists:member(_10508, [1, 2, 3]) Exit: (10) lists:member(1, [1, 2, 3]) X = 1, Y = 4 ; X = 1, Y = 5 ; Redo: (10) lists:member(_10508, [1, 2, 3]) Exit: (10) lists:member(2, [1, 2, 3]) X = 2, Y = 4 ; X = 2, Y = 5 ; Redo: (10) lists:member(_10508, [1, 2, 3]) Exit: (10) lists:member(3, [1, 2, 3]) X = 3, Y = 4 ; X = 3, Y = 5. ?- rtrace((member(X,[1,2,3]),member(Y,[4,5]))). Call: (10) lists:member(_11854, [1, 2, 3]) Unify: (10) lists:member(_11854, [1, 2, 3]) Exit: (10) lists:member(1, [1, 2, 3]) Call: (10) lists:member(_11872, [4, 5]) Unify: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(4, [4, 5]) X = 1, Y = 4 ; Redo: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(5, [4, 5]) X = 1, Y = 5 ; Redo: (10) lists:member(_11854, [1, 2, 3]) Exit: (10) lists:member(2, [1, 2, 3]) Call: (10) lists:member(_11872, [4, 5]) Unify: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(4, [4, 5]) X = 2, Y = 4 ; Redo: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(5, [4, 5]) X = 2, Y = 5 ; Redo: (10) lists:member(_11854, [1, 2, 3]) Exit: (10) lists:member(3, [1, 2, 3]) Call: (10) lists:member(_11872, [4, 5]) Unify: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(4, [4, 5]) X = 3, Y = 4 ; Redo: (10) lists:member(_11872, [4, 5]) Exit: (10) lists:member(5, [4, 5]) X = 3, Y = 5.
Document this pack!
Write tests
Untangle the 'pack' install deps (Moving predicates over here from logicmoo_base)
Dislike having tons of forks that are several commits behind the main git repo?
Be old school - Please ask to be added to TeamSPoon and Contribute directly !
Still, we wont stop you from doing it the Fork+PullRequest method
Copyright (c) 2017, TeamSPoon and Douglas Miles <logicmoo@gmail.com> All rights reserved.
Pack contains 16 files holding a total of 499K bytes.