Hostname: page-component-89b8bd64d-r6c6k Total loading time: 0 Render date: 2026-05-11T20:15:40.315Z Has data issue: false hasContentIssue false

Forward slicing of functional logic programs by partial evaluation*

Published online by Cambridge University Press:  01 January 2007

JOSEP SILVA
Affiliation:
DSIC, Technical University of Valencia, Camino de Vera s/n, E-46022 Valencia, Spain (e-mail; jsilva@dsic.upv.es, gvidal@dsic.upv.es
GERMÁN VIDAL
Affiliation:
DSIC, Technical University of Valencia, Camino de Vera s/n, E-46022 Valencia, Spain (e-mail; jsilva@dsic.upv.es, gvidal@dsic.upv.es

Abstract

Program slicing has been mainly studied in the context of imperative languages, where it has been applied to a wide variety of software engineering tasks, like program understanding, maintenance, debugging, testing, code reuse, etc. This work introduces the first forward slicing technique for declarative multi-paradigm programs which integrate features from functional and logic programming. Basically, given a program and a slicing criterion (a function call in our setting), the computed forward slice contains those parts of the original program which are reachable from the slicing criterion. Our approach to program slicing is based on an extension of (online) partial evaluation. Therefore, it provides a simple way to develop program slicing tools from existing partial evaluators and helps to clarify the relation between both methodologies. A slicing tool for the multi-paradigm language Curry, which demonstrates the usefulness of our approach, has been implemented in Curry itself.

Information

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2007

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable