5

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

  • I'm not going to claim that no tool can do this or that I know of any but it's a steep uphill battle, especially with a dynamic language. – itdoesntwork Jun 01 '18 at 22:10
  • This sounds .... mathematically undecidable. In a `"you could prove this impossible to do completely and in finite time using Turing completeness"` kind of way. Am I missing something? – Max von Hippel Jun 01 '18 at 22:16
  • What do you mean by "some functionality"? Are you asking for a library or module recommendation? – Rory Daulton Jun 01 '18 at 22:17

0 Answers0