[PRL] Accumulator for container capacity

Felix S Klock II pnkfelix at ccs.neu.edu
Fri Sep 30 11:58:02 EDT 2005


Karl-

On Sep 30, 2005, at 11:41 AM, Karl Lieberherr wrote:

> Adaptive Programming (AP) takes the principle of Structural  
> Recursion (SR)
> to a new level. In SR you organize your program following the  
> structure of
> your data. SR is an old principle and has recently been promoted
> systematically in HtDP. AP applies SR to focusing on the difference  
> between
> the structural recursion template and the desired program. The  
> information
> in the structural recursion template (that is systematically  
> defined by the
> data type definition), is not repeated in the adaptive program.
>

What does AP give you that Polytypic programming does not?

Polytypic programming does not repeat the information from the template.

In fact, in a sense polytypic programs are parameterized over the  
template.  (More precisely, polytypic programs are parameterized over  
the client's choice of type-constructor; the template is then derived  
from the structure of the type constructor to yield a particular  
instantiation of a polytypic program.)

My memory is poor; I can imagine potential additions provided by AP  
(e.g. the ability to inspect the name given to a class, which  
polytypic programs in their purely structural form do not allow), but  
I am not familiar enough with AP technology to be certain of what it  
provides.  I just want to understand the reasons that one would  
select AP over PolyP.

-Felix




More information about the PRL mailing list