Font Size: a A A

Functional adaptive programming

Posted on:2011-08-27Degree:Ph.DType:Dissertation
University:Northeastern UniversityCandidate:Chadwick, BryanFull Text:PDF
GTID:1468390011471385Subject:Computer Science
Abstract/Summary:
The development of complex software requires the implementation of operations over recursively defined data structures. Complex data structures lead to an increase of code dealing with structure access and navigation. This 'boilerplate' code in turn makes programs tedious to develop, difficult to maintain, prone to errors, and separates important functionality, all of which result in the loss of clarity. Generic (or polytypic) programming and higher-order functions can resolve some of these issues, but are usually too general to be practically useful for large collections of data types.;This dissertation proposes a new approach to developing structure-based functions and describes an implementation of these ideas in Java, called DemeterF. Our approach uses function-objects over an adaptive traversal to implement deep, fold-like functions over data structures. Function-classes (and objects) provide a useful and flexible form of generic programming that adapts to different data structures using a type-based multiple dispatch. We model DemeterF with function sets and structural recursion, and give it a type system that shows our function-objects, multiple dispatch, and traversals can be checked for safety. In order to show that our approach is efficient we present the results of several performance tests comparing DemeterF to handwritten methods and visitor implementations in Java.
Keywords/Search Tags:Data structures
Related items