Welcome!
To use the personalized features of this site, please log in or register.
If you have forgotten your username or password, we can help.
|
 |
A Guide for Manual Construction of Difference-List Procedures
| |
|
A Guide for Manual Construction of Difference-List Procedures
Ulrich Geske22 and Hans-Joachim Goltz23 
| (22) |
University of Potsdam, |
| (23) |
Fraunhofer FIRST, Berlin, |
Abstract
The difference-list technique is an effective method for extending lists to the right without using the append/3 procedure.
There exist some proposals for automatic transformation of list programs into difference-list programs. However, we are interested
in a construction of difference-list programs by the programmer, avoiding the need of a transformation. In [9] it was demonstrated,
how left-recursive procedures with a dangling call of append/3 can be transformed into right-recursion using the unfolding
technique. For some types of right-recursive procedures, the equivalence of the accumulator technique and difference-list
technique was shown and rules for writing corresponding difference-list programs were given. In the present paper, improved
and simplified rules are derived which substitute the formerly given ones. We can show that these rule allow us to write difference-list
programs which supply result-lists that are either constructed in top-down -manner (elements in append order) or in bottom-up
manner (elements in inverse order) in a simple schematic way.
Fulltext Preview (Small, Large)
 References secured to subscribers.
|
|
|
|
|
|