Demeter Interfaces: Adaptive Programming Without Surprises [chapter]

Therapon Skotiniotis, Jeffrey Palm, Karl Lieberherr
<span title="">2006</span> <i title="Springer Berlin Heidelberg"> <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/2w3awgokqne6te4nvlofavy5a4" style="color: black;">Lecture Notes in Computer Science</a> </i> &nbsp;
Adaptive Programming (AP) provides advanced modularization mechanisms for traversal related concerns over data structures in Object-Oriented programs. Computation along a traversal is defined through specialized Visitors while the traversal itself is separately defined against a graph-based model of the underlying data structure with the ability to abstract over graph node names and edges. Modifying, under certain restrictions, the program's data structure does not alter the program's overall
more &raquo; ... havior. Even though AP is geared towards more easily evolveable systems, certain limitations of current AP tools hamper code reuse and system evolveability. Reasoning about adaptive code becomes difficult since there is no guarantee that a modification to a data structure will not alter the meaning of the program. Furthermore, adaptive programs are defined directly against a program's complete underlying data structure exposing unrelated information and introducing hardcoded dependencies decreasing reusability, modularity and hampering evolution. In this paper we present Demeter Interfaces through which a more thorough design method of adaptive programs allows for more resilient software. Traversal specifications and Visitors are defined against an interface class graph augmented with additional constraints that capture structural properties that must hold in order for the adaptive code to function correctly. A program implements a Demeter interface by providing a mapping between the program's concrete data structure and the interface class graph. We show how Demeter interfaces allow for higher levels of reusability and modularity of adaptive code while the static verification of constraints guard against behavior altering modifications. We also discuss the applicability of Demeter Interfaces to XML technologies.
<span class="external-identifiers"> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1007/11785477_27">doi:10.1007/11785477_27</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/czg5ok3ccbfl5kf6v6qfbrsyp4">fatcat:czg5ok3ccbfl5kf6v6qfbrsyp4</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20101117213025/http://www.ccs.neu.edu/research/demeter/papers/icse-04-keynote/ecoop06.pdf" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/a7/9f/a79fcc78cff67b361fbabe78322bb76bc67dd3dc.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.1007/11785477_27"> <button class="ui left aligned compact blue labeled icon button serp-button"> <i class="external alternate icon"></i> springer.com </button> </a>