# Characterizing Minimal Semantics-preserving Slices of predicate-linear,   Free, Liberal Program Schemas

**Authors:** Sebastian Danicic, Robert M Hierons, Michael R Laurence

arXiv: 1705.09615 · 2017-05-29

## TL;DR

This paper characterizes the minimal predicate-minimal slices of certain program schemas, showing that Weiser's static slicing algorithm is effective for predicate-linear, free, liberal schemas under specific conditions, with some limitations.

## Contribution

It extends previous work by proving the correctness of static slicing for predicate-linear schemas and clarifies conditions under which the algorithm produces minimal slices.

## Key findings

- Weiser's slicing algorithm yields predicate-minimal slices for specified schemas.
- The result applies to schemas with predicate-linearity, freedom, and liberal conditions.
- The approach does not hold for termination-based slicing criteria.

## Abstract

A program schema defines a class of programs, all of which have identical statement structure, but whose functions and predicates may differ. A schema thus defines an entire class of programs according to how its symbols are interpreted. A subschema of a schema is obtained from a schema by deleting some of its statements. We prove that given a schema $S$ which is predicate-linear, free and liberal, such that the true and false parts of every if predicate satisfy a simple additional condition, and a slicing criterion defined by the final value of a given variable after execution of any program defined by $S$, the minimal subschema of $S$ which respects this slicing criterion contains all the function and predicate symbols `needed' by the variable according to the data dependence and control dependence relations used in program slicing, which is the symbol set given by Weiser's static slicing algorithm. Thus this algorithm gives predicate-minimal slices for classes of programs represented by schemas satisfying our set of conditions. We also give an example to show that the corresponding result with respect to the slicing criterion defined by termination behaviour is incorrect. This complements a result by the authors in which $S$ was required to be function-linear, instead of predicate-linear.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1705.09615/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/1705.09615/full.md

## References

17 references — full list in the complete paper: https://tomesphere.com/paper/1705.09615/full.md

---
Source: https://tomesphere.com/paper/1705.09615