Questions tagged [program-slicing]

Program slicing is a technique to analyze certain properties of a program by identifying a fragment of the program - the slice - according to a "slicing criterion". Program slicing is particularly useful when debugging programs.

Program slicing is a technique to analyze certain program properties by identifying a fragment of the program – the slice – according to a slicing criterion.

Program slicing is particularly useful when debugging programs.

Concrete slicing techniques:

To determine the reason for infinite loops in programs see .

42 questions
13
votes
3 answers

Dynamic slicing in C/C++

After reading the book of debugging from Andreas Zeller, I became interested in Dynamic Slicing. At the moment I only found relevant tools for Java analysis. Do you know such tools for C/C++?
Open the way
  • 26,225
  • 51
  • 142
  • 196
5
votes
0 answers

Program slicing in python

I am looking for some functionality to do program slicing. For example lets say I have the following code print("Starting") x = 25 prod = x * 20 div = x / 5 When I want the slice of the program that is needed for prod then the slicer should output…
4
votes
1 answer

Prevent Frama-C's slicing plugin from changing input code

Given a C file, I want to compute the backward slice for some criteria and compare the slice to the original code. Because I don't want to implement a slicing program from cratch, I've already tried to get used to Frama-C which seems to help with…
Paddre
  • 798
  • 1
  • 9
  • 19
4
votes
1 answer

Wala Java Slicer - Missing statements from slice

I just started using Wala Java Slicer to do some source code analysis tasks. I have a question about the proper use of the library. Assuming I have the following example code: public void main(String[] args) { ... UserType ut = userType; …
Rizkallah
  • 113
  • 6
4
votes
0 answers

How to use the plugin Kaveri and Indus?

From what I read Indus is a program slicer that identifies which parts of the program that influence or are influenced by a given set of program points, and Kaveri is a plugin that utilizes the Indus program slicing library to perform slicing in…
mina
  • 1,872
  • 1
  • 15
  • 20
4
votes
1 answer

Frama-C slice: parallelizable loop

I am trying to perform a backward slicing of an array element at specific position. I tried two different source codes. The first one is (first.c): const int in_array[5][5]={ 1,2,3,4,5, …
Jymas
  • 43
  • 4
4
votes
3 answers

Prolog Family Relation, unexpected failure

Could anyone tell me why my aunt relation isn't working? It just returns false whenever I try to call it. The Uncle relation I wrote under it seems to work perfectly. I can't figure out what the difference is. I tried (not(mother(X,Y)). at the end…
Danny
  • 343
  • 2
  • 5
  • 17
4
votes
3 answers

Prolog - get the factors for a given number doesn't stop?

I need to find the factors of a given number , e.g : ?- divisors2(40,R). R = [40,20,10,8,5,4,2,1]. The code : % get all the numbers between 1-X range(I,I,[I]). range(I,K,[I|L]) :- I < K, I1 is I + 1, range(I1,K,L). % calc the modulo of each…
JAN
  • 21,236
  • 66
  • 181
  • 318
3
votes
1 answer

How to use WALA for Forward Slicing

I have been working on program slicing for a while. Since that Backward slicing works on a control-flow graph (CFG) and there are plenty of tools that generates CFGs, I easily implemented the Backward slicing algorithm with Java. However, as read…
Ekin
  • 407
  • 1
  • 6
  • 17
3
votes
1 answer

How to install Impact Analysis Plug-in for Frama-c on Ubuntu 14.04?

I installed Frama-c on Ubuntu 14.04, using the following commands: sudo apt-get install frama-c However, when I open the GUI of frama-c using the following command: frama-c-gui I cannot find the "Impact Analysis" plug-in on the left-hand side…
shashibici
  • 33
  • 3
3
votes
2 answers

Selection sort in prolog

I'm new in Prolog and I'm trying to make the selection sort. Here is what I…
Petar D.
  • 149
  • 1
  • 5
  • 15
3
votes
1 answer

Frama-C: Get slice for C assert statement

Is there a way to use Frama-C's slicing plugin to compute slices for a specific C assert statement? For example, given the following code: int main() { double a=3; double b=4; double c=123; assert(b>=0); double d=a/b; …
Paddre
  • 798
  • 1
  • 9
  • 19
3
votes
1 answer

How to get Data & Control Dependency Slice using Frama-c

I was trying to do two things Get a dynamic backward slice based on a criteria. Map the slices statements back to the actual source code. Problem 1: The slice returned by Frama-C doesn't return the exact statements that were relevant for the…
3
votes
2 answers

Printing path in Prolog

I want to print the path of nodes in a directed graph. This code works properly for an edge but didn't work for the whole path. It returns false when it comes to path. Here is my code but it is only running for just an edge and not for the whole…
2
votes
1 answer

frama-c slicing plugin appears to discard used stack values

Problem description I'm developing a frama-c plugin that uses the slicing plugin as a library to remove unused bits of automatically generated code. Unfortunately the slicing plugin drops a bunch of stack values, which are actually used. They are…
1
2 3