1. A method of generating a slice from a plan-based representation of a program, the method comprising: constructing a plan representation of a program, wherein the plan representation comprises a plurality of nodes, edges, and ports; receiving one or more slicing criteria from a user, wherein the slicing criteria comprise one or more variable occurrences or statements from the program; and generating a slice from the plan representation according to the slicing criteria.