Skip to content

Instantly share code, notes, and snippets.

@vrthra
Last active March 23, 2018 22:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrthra/4ee88013ed9ddfb68c06574a6fdbe913 to your computer and use it in GitHub Desktop.
Save vrthra/4ee88013ed9ddfb68c06574a6fdbe913 to your computer and use it in GitHub Desktop.
Microjson trace output
0 --------
None
Arg: 'null'
1 --------
True
Arg: 'true'
2 --------
'kUvNG:B:e-^u3>Y}$V(4#IedU7OW2&v*wEDdwPwr$$U$]*x51&U.TU5uZ|7@&F!J'
Arg: '"kUv\\NG:B:e-^u3>Y}$V(4#IedU7OW2&v*wEDdwPwr$$U$]*x51&U.TU5uZ|7@&F!J"'
3 --------
True
Arg: 'true'
4 --------
False
Arg: 'false'
5 --------
False
Arg: 'false'
6 --------
BFS: '"!Heas[.8VOcI!z~0\'(^my+)`~H[;^l2QlU0G4`mz`>Lmf.z@U!y$,?`#d>UF:3MT.pl#]&zo:[IN}zW9Cr/A`%byvc?Q*\\<<NVW'
"!Heas[.8VOcI!z~0'(^my+)`~H[;^l2QlU0G4`mz`>Lmf.z@U!y$,?`#d>UF:3MT.pl#]&zo:[IN}zW9Cr/A`%byvc?Q*<<NV"
Arg: '"!Heas[.8VOcI!z~0\'(^my+)`~H[;^l2QlU0G4`mz`>Lmf.z@U!y$,?`#d>UF:3MT.pl#]&zo:[IN}zW9Cr/A`%byvc?Q*\\<<NV"'
7 --------
BFS: '[131,nullv'
[131, None]
Arg: '[131,null]'
8 --------
False
Arg: 'false'
9 --------
7
Arg: '7'
10 --------
"29,bA7!J@ue%!PjFUf1r:TW1K]H6w^M[Ur6E4;Wf-aEryM'UEO)538i@-P#uC0Eee"
Arg: '"29,bA7!J@ue%!PjFUf1r:TW1K]H6w^M[Ur6E4;Wf-aEryM\'UEO\\)538i@-P#uC0Eee"'
11 --------
5
Arg: '5'
12 --------
8
Arg: '8'
13 --------
False
Arg: 'false'
14 --------
None
Arg: 'null'
15 --------
"%euEch^s_VEoR7{TJYHSDATOCN~$1D,61!k7+U4+O_?5Zi!czr'w;_}cK&"
Arg: '"%euEch^s_VEoR7{TJYHSDATOCN~$1D,61!k7+U4+O_?5Zi!czr\'w;_}cK&"'
16 --------
None
Arg: 'null'
17 --------
None
Arg: 'null'
18 --------
'[5QEz!='
Arg: '"[5QEz!="'
19 --------
'%p$zYS&L-s/HnH0PInPNc+<zjzo(6X~jm1cm-~2Y4[M,#u>0D(,~nAXyrr='
Arg: '"%p$zYS&L-s/HnH0PInPNc+<zjzo(6X~jm1cm-~2Y4[M,#u>0D(,~nAXyrr="'
20 --------
{}
Arg: '{}'
21 --------
None
Arg: 'null'
22 --------
[80925839]
Arg: '[80925839]'
23 --------
'c.N2W&Tq}yI4bC<6dnk{'
Arg: '"c.N2W&Tq}yI4bC<6dnk{"'
24 --------
None
Arg: 'null'
25 --------
'BN>8fGeN+2m.p,^~z$<Ox)T$8&n>]m/-T1Ty]u<6jjZ+i$>q~f(wj-C2*53'
Arg: '"BN>8fGeN+2m.p,^~z$<Ox)T$8&n>]m/-T1Ty]u<6jjZ+i$>q~f(wj-C2*53"'
26 --------
{}
Arg: '{}'
27 --------
None
Arg: 'null'
28 --------
{}
Arg: '{}'
29 --------
'S/:Kl$SY1cen4@CSk'
Arg: '"S/:Kl$SY1cen4@CSk"'
30 --------
False
Arg: 'false'
31 --------
None
Arg: 'null'
32 --------
[False, {}]
Arg: '[false,{}]'
33 --------
BFS: '[821924036'
[821924036]
Arg: '[821924036]'
34 --------
False
Arg: 'false'
35 --------
False
Arg: 'false'
36 --------
'cKka#=wFI~@3U*I(j,0!XSYFYvp$'
Arg: '"cKka#=wFI~@3U*I(j,0!XSYFYvp$"'
37 --------
True
Arg: 'true'
38 --------
None
Arg: 'null'
39 --------
False
Arg: 'false'
40 --------
6
Arg: '6'
41 --------
False
Arg: 'false'
42 --------
BFS: '"dJFCrn](l.2edlBD#:d*z|@`(1C5.Jau`2RJtBRnlWmTS:Hf~6\'pWk)L=<U,y{if[DLkDmWJ6>UuVTA\\I`^?j:>v\'~Fu7WI>_*C'
"dJFCrn](l.2edlBD#:d*z|@`(1C5.Jau`2RJtBRnlWmTS:Hf~6'pWk)L=<U,y{if[DLkDmWJ6>UuVTAI`^?j:>v'~Fu7WI>_*"
Arg: '"dJFCrn](l.2edlBD#:d*z|@`(1C5.Jau`2RJtBRnlWmTS:Hf~6\'pWk)L=<U,y{if[DLkDmWJ6>UuVTA\\I`^?j:>v\'~Fu7WI>_*"'
43 --------
False
Arg: 'false'
44 --------
0
Arg: '0'
45 --------
None
Arg: 'null'
46 --------
None
Arg: 'null'
47 --------
BFS: '"3)6,RG$XY;f1[dnaH9}(bO+2DE%$T4Ee*V|_T/R*,zE~eqQmU-X$(Gm@D`QB8o1:T]KE*HT\'+f9N+YH~%C:o=AW!G:*t4bv)=kj'
"3)6,RG$XY;f1[dnaH9}(bO+2DE%$T4Ee*V|_T/R*,zE~eqQmU-X$(Gm@D`QB8o1:T]KE*HT'+f9N+YH~%C:o=AW!G:*t4bv)=k"
Arg: '"3)6,RG$XY;f1[dnaH9}(bO+2DE%$T4Ee*V|_T/R*,zE~eqQmU-X$(Gm@D`QB8o1:T]KE*HT\'+f9N+YH~%C:o=AW!G:*t4bv)=k"'
48 --------
False
Arg: 'false'
49 --------
False
Arg: 'false'
50 --------
"IU>F_8Qk'OC]*ktSmSOCyiQ::2>li_:Q_?3aDRI3`nz4I_-6qI<A'-p0^<`p=("
Arg: '"IU>F_8Qk\'OC]*ktSmSOCyiQ::2>li_:Q_?3aDRI3`nz4I_-6qI<A\'-p0^<`p=("'
51 --------
True
Arg: 'true'
52 --------
'}$9V0eru0xS4=ae(X4bEiuv9D=J!'
Arg: '"}$9V0eru0xS4=ae(X4bEiuv9D=J!"'
53 --------
[6]
Arg: '[6]'
54 --------
None
Arg: 'null'
55 --------
[True]
Arg: '[true]'
56 --------
'8@%M(1{DmV<iR?G,Ac,Ag-*rX^dtXFxm;z*B4x|XqiB&]xywr)'
Arg: '"8@%M(1{DmV<iR?G,Ac,Ag-*rX^dtXFxm;z*B4x|Xq\\iB&]xywr)"'
57 --------
False
Arg: 'false'
58 --------
BFS: '["!B8j5)[W[Vhm\\rMexLNw;:}F^juz5qqq}DdHG]}m9#\\.I.\\Q-ZqKGA7z;D6<<lwl"+'
['!B8j5)[W[Vhm\rMexLNw;:}F^juz5qqq}DdHG]}m9#.I.Q-ZqKGA7z;D6<<lwl']
Arg: '["!B8j5)[W[Vhm\\rMexLNw;:}F^juz5qqq}DdHG]}m9#\\.I.\\Q-ZqKGA7z;D6<<lwl"]'
59 --------
BFS: '"@6crM|c^<b!W!\'Mu~-R\\w&omV?fONlfyk+;lGMl\\-?:nR,q\\Zbl5K\'#CR%]ZN/_qh>/X:5$U^_GTs\'s9)BF=8C&/3D=[&R&gVdO'
"@6crM|c^<b!W!'Mu~-Rw&omV?fONlfyk+;lGMl-?:nR,qZbl5K'#CR%]ZN/_qh>/X:5$U^_GTs's9)BF=8C&/3D=[&R&gVd"
Arg: '"@6crM|c^<b!W!\'Mu~-R\\w&omV?fONlfyk+;lGMl\\-?:nR,q\\Zbl5K\'#CR%]ZN/_qh>/X:5$U^_GTs\'s9)BF=8C&/3D=[&R&gVd"'
60 --------
False
Arg: 'false'
61 --------
'x*BPLP_d!TTiZ7QvQ=a#_l>wRd3sq~ZLLR4O<V==w|;H10Dqxh(V9b(XkNa2wn7S|iYBo<T;Pe!I2YyrjY'
Arg: '"x*BPLP_d!TTiZ7QvQ=a#_l>wRd3sq~ZLLR4O<V==w|;H10Dqxh(V9b(XkNa2wn7S|iYBo<T;Pe!I2YyrjY"'
62 --------
[]
Arg: '[]'
63 --------
4
Arg: '4'
64 --------
8
Arg: '8'
65 --------
1
Arg: '1'
66 --------
False
Arg: 'false'
67 --------
'071I/2!<JA?fwKeu4xp^m!NFZ.bY@&~{utV%a`4~D@]XfTu3*a/4SEdr:av:E]4jYdH,'
Arg: '"071I/2!<JA?f\\wKeu4xp^m!NFZ.bY@&~{utV%a`4~D@\\]XfTu3*a/4SEdr:av:E]4jYdH,"'
68 --------
7
Arg: '7'
69 --------
BFS: '"mvi:SP)172+4%P*)4s0Yi1KszsNB_[}#AnmX<~iH}:VfimBdsFFJt9=k`Q>H\'%1eGkpNY@It\\!=?=8yJ\'x=ZB@I0!1H\\+i\'T]#,'
"mvi:SP)172+4%P*)4s0Yi1KszsNB_[}#AnmX<~iH}:VfimBdsFFJt9=k`Q>H'%1eGkpNY@It!=?=8yJ'x=ZB@I0!1H+i'T]#"
Arg: '"mvi:SP)172+4%P*)4s0Yi1KszsNB_[}#AnmX<~iH}:VfimBdsFFJt9=k`Q>H\'%1eGkpNY@It\\!=?=8yJ\'x=ZB@I0!1H\\+i\'T]#"'
70 --------
False
Arg: 'false'
71 --------
True
Arg: 'true'
72 --------
True
Arg: 'true'
73 --------
'#9+x7M.j!Z%#z5ocG0d1T*2'
Arg: '"#9+x7M.j!Z%#z5ocG0d1T*2"'
74 --------
True
Arg: 'true'
75 --------
5
Arg: '5'
76 --------
None
Arg: 'null'
77 --------
False
Arg: 'false'
78 --------
BFS: '"M\\~G2e@s@Z[y`8W(bE}wS2R=0`xwUUgAmys7Ls/?&G|v=#\\`X}k}#ao6]UD3k00y]\\qa,VO()Mp\\)#>hAYuacn4}0rkMy5_7$Y3'
'M~G2e@s@Z[y`8W(bE}wS2R=0`xwUUgAmys7Ls/?&G|v=#`X}k}#ao6]UD3k00y]qa,VO()Mp)#>hAYuacn4}0rkMy5_7$Y'
Arg: '"M\\~G2e@s@Z[y`8W(bE}wS2R=0`xwUUgAmys7Ls/?&G|v=#\\`X}k}#ao6]UD3k00y]\\qa,VO()Mp\\)#>hAYuacn4}0rkMy5_7$Y"'
79 --------
None
Arg: 'null'
80 --------
None
Arg: 'null'
81 --------
None
Arg: 'null'
82 --------
None
Arg: 'null'
83 --------
'6lqWeg@BywNkg0tTM*z8={D5vfdc7SX,}x)O96/P4Dr|0=$)x+qbV4y[5<e[p8.*2sBIGmOjun;0-/ixG7IO[0'
Arg: '"6lqWeg@BywNkg0tTM*z8={D5vfdc7SX,}x)O96/P4Dr|0=$)x+qbV4y[5<e[p8.*2sBIGmOjun;0-/ixG7IO\\[0"'
84 --------
False
Arg: 'false'
85 --------
{}
Arg: '{}'
86 --------
True
Arg: 'true'
87 --------
{'JXl': [8]}
Arg: '{"JXl":[8]}'
88 --------
[84027402557533]
Arg: '[84027402557533]'
89 --------
True
Arg: 'true'
90 --------
BFS: '{,"akF@ud)3#i9PR,Jw:VN4O\\\',2":"R*_"\\'
{"akF@ud)3#i9PR,Jw:VN4O',2": 'R*_'}
Arg: '{,"akF@ud)3#i9PR,Jw:VN4O\\\',2":"R*_"}'
91 --------
True
Arg: 'true'
92 --------
1
Arg: '1'
93 --------
'+}TolTswYpu-e<)p]<VZp@j@AC@9u.L/LRB8iihv/nkkKbA+y+XtP4l'
Arg: '"+}TolTswYpu-e<)p]<VZp@j@AC@9u.L/LRB8iihv/nkkKbA+y+XtP4l"'
94 --------
[]
Arg: '[]'
95 --------
True
Arg: 'true'
96 --------
False
Arg: 'false'
97 --------
None
Arg: 'null'
98 --------
True
Arg: 'true'
99 --------
None
Arg: 'null'
100 --------
None
Arg: 'null'
[:START] ::= [@.main:s]
[@.main:s] ::= [@.from_json:data]
[@.from_json:data] ::= [@.from_json:stm]
[@.from_json:stm] ::= [@._from_json_raw:stm]
[@._from_json_raw:stm] ::=
| [@._from_json_fixed:stm]
| [@._from_json_string:stm]
| [@._from_json_raw:c]
| [@._from_json_list:stm]
| [@._from_json_number:stm]
| [@._from_json_dict:stm]
[@._from_json_raw:c] ::=
| [f]
| [[]
| [{]
| [@._from_json_number:c]
| [n]
| [t]
| [@._from_json_number:stm]
| ["]
[@._from_json_fixed:stm] ::=
| [@._from_json_fixed:res][@._from_json_fixed:stm]
| [@._from_json_fixed:res]
| [@._from_json_list:stm]
[@._from_json_fixed:res] ::=
| [@._from_json_raw:c][a][l][s][e]
| [@._from_json_raw:c][u][l]+
| [@._from_json_list:c][a][l][s][e]
| [@._from_json_raw:c][r][u][e]
| [@._from_json_list:c][r][u][e]
[@._from_json_string:stm] ::=
| [@._from_json_string:c][@._from_json_string:stm]
| [@._from_json_dict:stm]
| [@._from_json_raw:c][@._from_json_string:stm]
| [@._from_json_list:c][@._from_json_string:stm]
| [@._from_json_list:stm]
| [@._from_json_string:r][@._from_json_string:c]
| [@._from_json_string:c]
| [@._from_json_dict:c][@._from_json_string:stm]
| [@._from_json_string:r][@._from_json_string:c][@._from_json_string:stm]
| [@.decode_escape:stm]
| [@._from_json_string:r][@._from_json_string:stm]
[@._from_json_string:c] ::=
| [^"\]
| [@._from_json_string:r]
| [@.decode_escape:c]
| [\]
| ["]
[@._from_json_string:r] ::=
| [@._from_json_dict:key]
| [^"\]
| [@._from_json_string:r][^"\]
| [@._from_json_string:r][@._from_json_string:c]
| [@._from_json_string:c][^"\]
| [@._from_json_dict:val]
[@.decode_escape:c] ::= [^u]
[@.decode_escape:stm] ::= [@._from_json_string:c][@._from_json_string:stm]
[@._from_json_list:stm] ::=
| [@._from_json_raw:c][@._from_json_list:stm]
| [@._from_json_list:c][@._from_json_list:stm]
| [@._from_json_number:c][@._from_json_list:stm]
| [@._from_json_list:c]
| [@._from_json_dict:stm]
| [@._from_json_raw:stm]
[@._from_json_list:c] ::=
| []]
| [@._from_json_raw:c]
| [,]
[@._from_json_number:stm] ::=
| [@._from_json_number:s][@._from_json_list:stm]
| [@._from_json_list:stm]
| [@._from_json_number:c][@._from_json_number:stm]
| [@._from_json_number:c]
| [@._from_json_list:c][@._from_json_number:stm]
[@._from_json_number:c] ::=
| [@._from_json_number:s]
| [@._from_json_list:c]
| [@._from_json_list:stm]
| [+-.0123456789Ee]
[@._from_json_number:s] ::=
| [+-.0123456789Ee]
| [@._from_json_list:c][+-.0123456789Ee]+
[@._from_json_dict:stm] ::=
| [@._from_json_raw:c][@._from_json_dict:stm]
| [@._from_json_dict:c][@._from_json_dict:stm]
| [@._from_json_string:stm]
| [@._from_json_dict:c]
| [@._from_json_list:stm]
| [@._from_json_raw:stm]
[@._from_json_dict:c] ::=
| [:]
| [}]
| [,}]
| ["]
[@._from_json_dict:key] ::= [@._from_json_string:r][@._from_json_string:c]
[@._from_json_dict:val] ::= [@._from_json_string:r][@._from_json_string:c]

Command along with the generated input and comparisons

$ env LOG_COMPARISONS=1 R=87 NOCTRL=1 python3 bin/mychains.py subjects/microjson.py
Arg: '{"JXl":[8]}'

Comparison trace (part of output)

0,eq,'{','"'
0,eq,'{','{'
1,eq,'"',''
1,eq,'"','}'
1,eq,'"',','
1,eq,'"','"'
2,eq,'J',''
2,eq,'J','\\'
2,eq,'J','"'
3,eq,'X',''
3,eq,'X','\\'
3,eq,'X','"'
4,eq,'l',''
4,eq,'l','\\'
4,eq,'l','"'
5,eq,'"',''
5,eq,'"','\\'
5,eq,'"','"'
6,ne,':',':'
7,eq,'[','"'
7,eq,'[','{'
7,eq,'[','['
8,eq,'8',''
8,eq,'8',']'
8,eq,'8',','
8,eq,'8','"'
8,eq,'8','{'
8,eq,'8','['
8,eq,'8','t'
8,eq,'8','f'
8,eq,'8','n'
8,eq,'8','8'
8,eq,'8','8'
8,eq,'8','-'
8,eq,'8','.'
8,eq,'8','e'
8,eq,'8','E'
9,eq,']',''
9,eq,']',']'
10,eq,'}',''
10,eq,'}','}'
10,eq,'}','}'

Result

Accept

Execution trace along with the exceptions produced at each point

Arg: '{"JXl":[8]}'
'>> s'
'Exception malformed JSON data at position 0, "\'s\'"'
(87, 0, <EState.Trim: 1>, 'is tainted', True)
'>> {'
'Exception truncated JSON data at position 1, "\'\'"'
(87, 1, <EState.Append: 2>, 'is tainted', True)
'>> {y'
'Exception malformed JSON data at position 1, "\'y\'"'
(87, 2, <EState.Trim: 1>, 'is tainted', True)
'>> {f'
'Exception malformed JSON data at position 1, "\'f\'"'
(87, 3, <EState.Trim: 1>, 'is tainted', True)
'>> {.'
'Exception malformed JSON data at position 1, "\'.\'"'
(87, 4, <EState.Trim: 1>, 'is tainted', True)
'>> {E'
'Exception malformed JSON data at position 1, "\'E\'"'
(87, 5, <EState.Trim: 1>, 'is tainted', True)
'>> {M'
'Exception malformed JSON data at position 1, "\'M\'"'
(87, 6, <EState.Trim: 1>, 'is tainted', True)
'>> {w'
'Exception malformed JSON data at position 1, "\'w\'"'
(87, 7, <EState.Trim: 1>, 'is tainted', True)
'>> {j'
'Exception malformed JSON data at position 1, "\'j\'"'
(87, 8, <EState.Trim: 1>, 'is tainted', True)
'>> {L'
'Exception malformed JSON data at position 1, "\'L\'"'
(87, 9, <EState.Trim: 1>, 'is tainted', True)
'>> {1'
'Exception malformed JSON data at position 1, "\'1\'"'
(87, 10, <EState.Trim: 1>, 'is tainted', True)
'>> {T'
'Exception malformed JSON data at position 1, "\'T\'"'
(87, 11, <EState.Trim: 1>, 'is tainted', True)
'>> {"'
'Exception truncated JSON data at position 1, "\'"\'"'
(87, 12, <EState.Append: 2>, 'is tainted', True)
'>> {"J'
'Exception truncated JSON data at position 2, "\'J\'"'
(87, 13, <EState.Append: 2>, 'is tainted', True)
'>> {"JX'
'Exception truncated JSON data at position 3, "\'X\'"'
(87, 14, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl'
'Exception truncated JSON data at position 4, "\'l\'"'
(87, 15, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl"'
'Exception missing colon after key at position 6, "\'\'"'
(87, 16, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl"$'
'Exception missing colon after key at position 7, "\'\'"'
(87, 17, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":'
'Exception malformed JSON data at position 7, "\'\'"'
(87, 18, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl":]'
'Exception malformed JSON data at position 7, "\']\'"'
(87, 19, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":['
'Exception truncated JSON data at position 8, "\'\'"'
(87, 20, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl":[G'
'Exception malformed JSON data at position 8, "\'G\'"'
(87, 21, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8'
'Exception truncated JSON data at position 8, "\'8\'"'
(87, 22, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl":[8`'
'Exception malformed JSON data at position 9, "\'`\'"'
(87, 23, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8i'
'Exception malformed JSON data at position 9, "\'i\'"'
(87, 24, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8+'
"Exception invalid literal for int() with base 10: '8+'"
(87, 25, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8I'
'Exception malformed JSON data at position 9, "\'I\'"'
(87, 26, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8$'
'Exception malformed JSON data at position 9, "\'$\'"'
(87, 27, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8F'
'Exception malformed JSON data at position 9, "\'F\'"'
(87, 28, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8Z'
'Exception malformed JSON data at position 9, "\'Z\'"'
(87, 29, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8t'
'Exception malformed JSON data at position 9, "\'t\'"'
(87, 30, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8|'
'Exception malformed JSON data at position 9, "\'|\'"'
(87, 31, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8]'
'Exception truncated JSON data at position 1, "\'"JXl":[8]\'"'
(87, 32, <EState.Append: 2>, 'is tainted', True)
'>> {"JXl":[8]P'
'Exception malformed JSON data at position 10, "\'P\'"'
(87, 33, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8]u'
'Exception malformed JSON data at position 10, "\'u\'"'
(87, 34, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8]w'
'Exception malformed JSON data at position 10, "\'w\'"'
(87, 35, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8]['
'Exception malformed JSON data at position 10, "\'[\'"'
(87, 36, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8];'
'Exception malformed JSON data at position 10, "\';\'"'
(87, 37, <EState.Trim: 1>, 'is tainted', True)
'>> {"JXl":[8]}'

Command along with the generated input and comparisons

$env R=32 LOG_COMPARISONS=1  NOCTRL=1 python3 bin/mychains.py subjects/microjson.py 
Arg: '[false,{}]'

Comparison trace (part of output)

[False, {}]
0,eq,'[','"'
0,eq,'[','{'
0,eq,'[','['
1,eq,'f',''
1,eq,'f',']'
1,eq,'f',','
1,eq,'f','"'
1,eq,'f','{'
1,eq,'f','['
1,eq,'f','t'
1,eq,'f','f'
1,eq,'f','f'
2,eq,'a','a'
3,eq,'l','l'
4,eq,'s','s'
5,eq,'e','e'
6,eq,',',''
6,eq,',',']'
6,eq,',',','
7,eq,'{','"'
7,eq,'{','{'
8,eq,'}',''
8,eq,'}','}'
8,eq,'}','}'
9,eq,']',''
9,eq,']',']'

Result

Accept

Execution trace along with the exceptions produced at each point

'>> j'
'Exception malformed JSON data at position 0, "\'j\'"'
(32, 0, <EState.Trim: 1>, 'is tainted', True)
'>> ['
'Exception truncated JSON data at position 1, "\'\'"'
(32, 1, <EState.Append: 2>, 'is tainted', True)
'>> [s'
'Exception malformed JSON data at position 1, "\'s\'"'
(32, 2, <EState.Trim: 1>, 'is tainted', True)
'>> [G'
'Exception malformed JSON data at position 1, "\'G\'"'
(32, 3, <EState.Trim: 1>, 'is tainted', True)
'>> [|'
'Exception malformed JSON data at position 1, "\'|\'"'
(32, 4, <EState.Trim: 1>, 'is tainted', True)
'>> [?'
'Exception malformed JSON data at position 1, "\'?\'"'
(32, 5, <EState.Trim: 1>, 'is tainted', True)
'>> [b'
'Exception malformed JSON data at position 1, "\'b\'"'
(32, 6, <EState.Trim: 1>, 'is tainted', True)
'>> [$'
'Exception malformed JSON data at position 1, "\'$\'"'
(32, 7, <EState.Trim: 1>, 'is tainted', True)
'>> [&'
'Exception malformed JSON data at position 1, "\'&\'"'
(32, 8, <EState.Trim: 1>, 'is tainted', True)
'>> [/'
'Exception malformed JSON data at position 1, "\'/\'"'
(32, 9, <EState.Trim: 1>, 'is tainted', True)
'>> [O'
'Exception malformed JSON data at position 1, "\'O\'"'
(32, 10, <EState.Trim: 1>, 'is tainted', True)
'>> [i'
'Exception malformed JSON data at position 1, "\'i\'"'
(32, 11, <EState.Trim: 1>, 'is tainted', True)
'>> [Q'
'Exception malformed JSON data at position 1, "\'Q\'"'
(32, 12, <EState.Trim: 1>, 'is tainted', True)
'>> [*'
'Exception malformed JSON data at position 1, "\'*\'"'
(32, 13, <EState.Trim: 1>, 'is tainted', True)
'>> [m'
'Exception malformed JSON data at position 1, "\'m\'"'
(32, 14, <EState.Trim: 1>, 'is tainted', True)
'>> [f'
'Exception expected boolean at position 1, "\'f\'"'
(32, 15, <EState.Append: 2>, 'is tainted', True)
'>> [fV'
'Exception expected boolean at position 1, "\'fV\'"'
(32, 16, <EState.Trim: 1>, 'is tainted', True)
'>> [fa'
'Exception expected boolean at position 1, "\'fa\'"'
(32, 17, <EState.Append: 2>, 'is tainted', True)
'>> [fa('
'Exception expected boolean at position 1, "\'fa(\'"'
(32, 18, <EState.Trim: 1>, 'is tainted', True)
'>> [fal'
'Exception expected boolean at position 1, "\'fal\'"'
(32, 19, <EState.Append: 2>, 'is tainted', True)
'>> [fal&'
'Exception expected boolean at position 1, "\'fal&\'"'
(32, 20, <EState.Trim: 1>, 'is tainted', True)
'>> [fals'
'Exception expected boolean at position 1, "\'fals\'"'
(32, 21, <EState.Append: 2>, 'is tainted', True)
'>> [fals!'
'Exception expected boolean at position 1, "\'fals!\'"'
(32, 22, <EState.Trim: 1>, 'is tainted', True)
'>> [false'
'Exception truncated JSON data at position 1, "\'false\'"'
(32, 23, <EState.Append: 2>, 'is tainted', True)
'>> [falseK'
'Exception malformed JSON data at position 6, "\'K\'"'
(32, 24, <EState.Trim: 1>, 'is tainted', True)
'>> [false:'
'Exception malformed JSON data at position 6, "\':\'"'
(32, 25, <EState.Trim: 1>, 'is tainted', True)
'>> [false\\'
'Exception malformed JSON data at position 6, "\'\\\\\'"'
(32, 26, <EState.Trim: 1>, 'is tainted', True)
'>> [false+'
'Exception malformed JSON data at position 6, "\'+\'"'
(32, 27, <EState.Trim: 1>, 'is tainted', True)
'>> [falseN'
'Exception malformed JSON data at position 6, "\'N\'"'
(32, 28, <EState.Trim: 1>, 'is tainted', True)
'>> [false1'
'Exception malformed JSON data at position 6, "\'1\'"'
(32, 29, <EState.Trim: 1>, 'is tainted', True)
'>> [false%'
'Exception malformed JSON data at position 6, "\'%\'"'
(32, 30, <EState.Trim: 1>, 'is tainted', True)
'>> [falsek'
'Exception malformed JSON data at position 6, "\'k\'"'
(32, 31, <EState.Trim: 1>, 'is tainted', True)
'>> [false2'
'Exception malformed JSON data at position 6, "\'2\'"'
(32, 32, <EState.Trim: 1>, 'is tainted', True)
'>> [false9'
'Exception malformed JSON data at position 6, "\'9\'"'
(32, 33, <EState.Trim: 1>, 'is tainted', True)
'>> [falseb'
'Exception malformed JSON data at position 6, "\'b\'"'
(32, 34, <EState.Trim: 1>, 'is tainted', True)
'>> [false#'
'Exception malformed JSON data at position 6, "\'#\'"'
(32, 35, <EState.Trim: 1>, 'is tainted', True)
'>> [falsec'
'Exception malformed JSON data at position 6, "\'c\'"'
(32, 36, <EState.Trim: 1>, 'is tainted', True)
'>> [false)'
'Exception malformed JSON data at position 6, "\')\'"'
(32, 37, <EState.Trim: 1>, 'is tainted', True)
">> [false'"
'Exception malformed JSON data at position 6, ""\'""'
(32, 38, <EState.Trim: 1>, 'is tainted', True)
'>> [falsew'
'Exception malformed JSON data at position 6, "\'w\'"'
(32, 39, <EState.Trim: 1>, 'is tainted', True)
'>> [falseY'
'Exception malformed JSON data at position 6, "\'Y\'"'
(32, 40, <EState.Trim: 1>, 'is tainted', True)
'>> [falseG'
'Exception malformed JSON data at position 6, "\'G\'"'
(32, 41, <EState.Trim: 1>, 'is tainted', True)
'>> [false>'
'Exception malformed JSON data at position 6, "\'>\'"'
(32, 42, <EState.Trim: 1>, 'is tainted', True)
'>> [falsen'
'Exception malformed JSON data at position 6, "\'n\'"'
(32, 43, <EState.Trim: 1>, 'is tainted', True)
'>> [falseU'
'Exception malformed JSON data at position 6, "\'U\'"'
(32, 44, <EState.Trim: 1>, 'is tainted', True)
'>> [falset'
'Exception malformed JSON data at position 6, "\'t\'"'
(32, 45, <EState.Trim: 1>, 'is tainted', True)
'>> [false@'
'Exception malformed JSON data at position 6, "\'@\'"'
(32, 46, <EState.Trim: 1>, 'is tainted', True)
'>> [false|'
'Exception malformed JSON data at position 6, "\'|\'"'
(32, 47, <EState.Trim: 1>, 'is tainted', True)
'>> [falseV'
'Exception malformed JSON data at position 6, "\'V\'"'
(32, 48, <EState.Trim: 1>, 'is tainted', True)
'>> [false0'
'Exception malformed JSON data at position 6, "\'0\'"'
(32, 49, <EState.Trim: 1>, 'is tainted', True)
'>> [false('
'Exception malformed JSON data at position 6, "\'(\'"'
(32, 50, <EState.Trim: 1>, 'is tainted', True)
'>> [falseX'
'Exception malformed JSON data at position 6, "\'X\'"'
(32, 51, <EState.Trim: 1>, 'is tainted', True)
'>> [falseM'
'Exception malformed JSON data at position 6, "\'M\'"'
(32, 52, <EState.Trim: 1>, 'is tainted', True)
'>> [falseZ'
'Exception malformed JSON data at position 6, "\'Z\'"'
(32, 53, <EState.Trim: 1>, 'is tainted', True)
'>> [falsed'
'Exception malformed JSON data at position 6, "\'d\'"'
(32, 54, <EState.Trim: 1>, 'is tainted', True)
'>> [false,'
'Exception malformed JSON data at position 7, "\'\'"'
(32, 55, <EState.Append: 2>, 'is tainted', True)
'>> [false,F'
'Exception malformed JSON data at position 7, "\'F\'"'
(32, 56, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{'
'Exception truncated JSON data at position 8, "\'\'"'
(32, 57, <EState.Append: 2>, 'is tainted', True)
'>> [false,{Z'
'Exception malformed JSON data at position 8, "\'Z\'"'
(32, 58, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{F'
'Exception malformed JSON data at position 8, "\'F\'"'
(32, 59, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{X'
'Exception malformed JSON data at position 8, "\'X\'"'
(32, 60, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}'
'Exception truncated JSON data at position 1, "\'false,{}\'"'
(32, 61, <EState.Append: 2>, 'is tainted', True)
'>> [false,{}i'
'Exception malformed JSON data at position 9, "\'i\'"'
(32, 62, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}^'
'Exception malformed JSON data at position 9, "\'^\'"'
(32, 63, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}"'
'Exception malformed JSON data at position 9, "\'"\'"'
(32, 64, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}9'
'Exception malformed JSON data at position 9, "\'9\'"'
(32, 65, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}\\'
'Exception malformed JSON data at position 9, "\'\\\\\'"'
(32, 66, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}6'
'Exception malformed JSON data at position 9, "\'6\'"'
(32, 67, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}-'
'Exception malformed JSON data at position 9, "\'-\'"'
(32, 68, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{})'
'Exception malformed JSON data at position 9, "\')\'"'
(32, 69, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}4'
'Exception malformed JSON data at position 9, "\'4\'"'
(32, 70, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}~'
'Exception malformed JSON data at position 9, "\'~\'"'
(32, 71, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}H'
'Exception malformed JSON data at position 9, "\'H\'"'
(32, 72, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}('
'Exception malformed JSON data at position 9, "\'(\'"'
(32, 73, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}r'
'Exception malformed JSON data at position 9, "\'r\'"'
(32, 74, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}O'
'Exception malformed JSON data at position 9, "\'O\'"'
(32, 75, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}:'
'Exception malformed JSON data at position 9, "\':\'"'
(32, 76, <EState.Trim: 1>, 'is tainted', True)
'>> [false,{}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment