Tutor Tutor
Tutor Tutor

Reputation: 61

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 me

x = 25
prod = x * 20

When I want to output the part of the program that depends of the variable x then I should get the output

x = 25
prod = x * 20
div = x / 5

I was looking at the tool https://github.com/romanofski/programslice but it doesn't help much.

Thanks in Advance

Upvotes: 6

Views: 569

Answers (0)

Related Questions