Hi all,
Currently I am doing some work on CIL. I would like to obtain the
conditional result (true/false) in the DOT file generated by CIL. Therefore,
I modified the code in ext/cfg.ml.
let d_cfgedge (src) () (dest) =
match src.skind with
| If (_, tb, fb, _) ->
(if (List.mem dest tb.bstmts) then
dprintf "%a -> %a [label=\"true\"]"
d_cfgnodename src
d_cfgnodename dest
else if (List.mem dest fb.bstmts) then
dprintf "%a -> %a [label=\"false\"]"
d_cfgnodename src
d_cfgnodename dest
else
dprintf "%a -> %a [label=\"true$\"]"(*true likely, note that no false
likely!!!*)
d_cfgnodename src
d_cfgnodename dest);
| _ -> dprintf "%a -> %a"
d_cfgnodename src
d_cfgnodename dest
However, I am wondering whether my solution is correct becuase there is no
related document explaining this issue. In particularly, in my real cases, I
found the highlighted case is also hit. I am also wondering whether there
are other cases that I don't consider here.
Look forward to your reply. Any concern or feedback would be greatly
appreciated.
Thanks,
Haihao
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users