Skip to content
Snippets Groups Projects
Commit a8162067 authored by Allan Blanchard's avatar Allan Blanchard Committed by Virgile Prevosto
Browse files

[Kernel/test] queueInstr in ghost

parent 63fa5407
No related branches found
No related tags found
No related merge requests found
[kernel] Parsing tests/cil/queue_ghost_instr.i (no preprocessing)
/* Generated by Frama-C */
int main(void)
{
int __retres;
;
int i = 0;
/*@ ghost ; */
/*@ ghost int j = 0; */
;
i ++;
/*@ ghost ; */
/*@ ghost j ++; */
{
/*@ ghost ; */
/*@ ghost int x = 0; */
/*@ ghost ; */
/*@ ghost x ++; */
}
;
__retres = 0;
return __retres;
}
/* run.config
OPT: -load-script tests/cil/queue_ghost_instr.ml -print
*/
int main(){
int i = 0 ;
//@ ghost int j = 0 ;
i++ ;
//@ ghost j++ ;
{
//@ ghost int x = 0;
//@ ghost x++ ;
}
}
class add_skip = object(this)
inherit Visitor.frama_c_inplace
method! vfunc f =
File.must_recompute_cfg f ;
Cil.DoChildren
method! vinst _ =
let open Cil_types in
this#queueInstr([Skip(Cil.CurrentLoc.get())]) ;
Cil.DoChildren
end
let run () =
Visitor.visitFramacFileSameGlobals (new add_skip) (Ast.get())
let () =
Db.Main.extend run
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment