Parameterized slicer for LLVM IR (ParaSlicer-0.1)

Rating: No reviews yet
Downloads: 18
Released: Mar 9, 2014
Updated: Apr 14, 2014 by zhangyz
Dev status: Alpha Help Icon

Recommended Download

Application ParaSlicer-0.1
application, 44692K, uploaded Mar 17, 2014 - 18 downloads

Release Notes

ParaSlicer - Paramiterized program slicing for LLVM IR

ParaSlicer is based on the novel context-sensitive slicing method, parameterized program slicing, in Low Level Virtual Machine (LLVM), including backward and forward slicing. ParaSlicer-0.1 ran on Linux such as (32-bit) Ubuntu with LLVM-3.2 (Clang-3.2).
---------------------------------------------------------------
Usage: ParaSlicer [-o | --output FILE/DIR] [-c | --criterion VARIABLE] [-d | --direction DIRECTION] FILE
Generate static slice based on paramiterized method for FILE (which can be bitcode,llvm assembly, or C/CPP sourcecode)

Available options:
-h,--help Show this help text
-o,--output FILE/DIR The destination of a file output
-c,--criterion VARIABLE The criterion variables (with the style of Var@Fun,such as x@main) for slicing. If null, just output the slice table
-d,--direction DIRECTION The type of output to slicing: Fwd, Bwd, Both. Default: Bwd
FILE The input file which can be bitcode,llvm assembly, or C/CPP sourcecode

Examples:
1. ./ParaSlicer sum3.c
Backward Static SliceTable:
Variable SrcLineNumbers
a@add {11,12,13,15,27,28,33,39,40}
b@add {}
i@main {12,13,15,28,33,39,40}
sum@main {11,12,13,15,27,28,33,39,40}
tmp@inc {39}
x@A {11,12,13,15,27,28,33,39,40}
y@A {12,13,15,28,33,39,40}
z@inc {12,13,15,28,33,39,40}

2. ./ParaSlicer -d Fwd -c n@main sum3.c
Forward Static Slice for "n@main":
<SourceLines> 9,13,15,16,18,19,20:
%n = alloca i32 , align 4
%4 = call i32 @isoc99_scanf ( i8* i8* getelementptr ( 3 x i8* @.str1 , i32 0, i32 0 ), i32* %n )
%8 = load i32* %n , align 4
%9 = icmp sle i32 %7 , %8
br i1 %9 , label %10 , label %11
call void @A ( i32* %sum, i32* %i )
%.pre = load i32* %i , align 4
br label %6
%12 = load i32* %sum , align 4
%13 = call i32 @printf ( i8* i8* getelementptr ( 10 x i8* @.str2 , i32 0, i32 0 ), i32 %12 )
%15 = load i32* %i , align 4
%16 = call i32 @printf ( i8* i8* getelementptr ( 8 x i8* @.str3 , i32 0, i32 0 ), i32 %15 )
ret i32 0

Reviews for this release

No reviews yet for this release.