Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "must_trace"

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

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.0.1e354b6ec94e4d210dc364c51a9cd8228c5ee2f111https://github.com/TeamSPoon/must_trace.git
0.0.2f895013ebff3d436c0b34e9b4ac3e27df7f662691https://github.com/TeamSPoon/must_trace.git
0.0.3c3e68c07da9573f4a336407a6abe2ec28011bb951https://github.com/TeamSPoon/must_trace.git
0.0.407fe5d8c0134aee8bd3ce3308c6bb5a5b5b37ff72https://github.com/TeamSPoon/must_trace.git
0.0.71fca12a042628348a55ab4c119f22583d1ef27921https://github.com/TeamSPoon/must_trace.git
1.1.11162577ed7d8cf77b192383033ad98f14f0cf8c2622https://github.com/TeamSPoon/must_trace.git
1.1.112ead6c6442e0afb7083693f340f8f45c8c56c222c1https://github.com/TeamSPoon/must_trace.git
1.1.1151ac84baca53d33e5e7aeef415ecf8a502fb0451b1https://github.com/TeamSPoon/must_trace.git
1.1.1176b2a225aab4f39ad854e76036bb789cf6bc0b2e51https://github.com/TeamSPoon/must_trace.git
1.1.11800348433724541e490540024864a2150445e400d1https://github.com/TeamSPoon/must_trace.git
005b8ca901da818a77ee74d4b8832ea185c41c183https://github.com/TeamSPoon/must_trace.git
021c7401c4e5f396c487d4cb03a84f6bbbc338ce1https://github.com/TeamSPoon/must_trace.git
08ac6abc2594efad9ad7bb684335e0cbe45b37231https://github.com/TeamSPoon/must_trace.git
135323e1e3f3c555b37e0c3216724ca855e5bc162https://github.com/TeamSPoon/must_trace.git
3292ff9730d8d67205a0636313fba5f9b0f03a311https://github.com/TeamSPoon/must_trace.git
39126cce8a49473a9aa98fa2beeabd6c4ff5934f2https://github.com/TeamSPoon/must_trace.git
4137477032436b5c64a6fe5574fd431aba6b6af71https://github.com/TeamSPoon/must_trace.git
444673fd148cd5d346eed462cd86328d80f45b641https://github.com/TeamSPoon/must_trace.git
48c68214d67e2df7089dff01f1ac5540d2bae33a1https://github.com/TeamSPoon/must_trace.git
5d22b6b4c9c05ffe3bbad8bed51e2d3d44aa1a2a1https://github.com/TeamSPoon/must_trace.git
61becd52fa657bf474b4b89a63913d503c9f19021https://github.com/TeamSPoon/must_trace.git
b5be4dd2a590d66bb1e7e10f2673a98a1946a70a1https://github.com/TeamSPoon/must_trace.git
cf35c39cffc0532f8be0b7087cf08b77b95510151https://github.com/TeamSPoon/must_trace.git
dcb81f7911bdb3fd60779a09106134094f893e461https://github.com/TeamSPoon/must_trace.git
f28d114821b646ff7899a07828c6ef6f767c9be11https://github.com/TeamSPoon/must_trace.git
f85126e7d8048915e68287b49948adc5a0d5ded21https://github.com/TeamSPoon/must_trace.git

Trace with your eyeballs instead of your fingers

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.

Installation using SWI-Prolog 7.5.x or later (due to duplicate transitive deps failing in earlier versions):

`?- 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.

Some TODOs

Document this pack!

Write tests

Untangle the 'pack' install deps (Moving predicates over here from logicmoo_base)

Not obligated to maintain a git fork just to contribute

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

BSD 2-Clause License

Copyright (c) 2017, TeamSPoon and Douglas Miles <logicmoo@gmail.com> All rights reserved.

Contents of pack "must_trace"

Pack contains 16 files holding a total of 503K bytes.