[Cs4800] Algorithm Development Using Aspects

Karl Lieberherr lieber at ccs.neu.edu
Tue Nov 16 08:29:44 EST 2010


http://www.ccs.neu.edu/home/lieber/courses/algorithms/cs4800/f10/homeworks/hw8/ahmed/cp/

contains Ahmed''s algorithm designs that we discussed yesterday in class.

You get here a view of a snapshot of programming language/ software
engineering research.
The idea is that we want programming languages that allow us to
express algorithms without tangling
different concerns together. This are is called Aspect-Oriented Programming.

In the ClosestPair case we have the following concerns:
1. Elegant but inefficient divide and conquer algorithm (O(n^2))
2. Merge sort to avoid sorting wrt y at each level
3. Presort to avoid sorting wrt x at each level

We can merge the concerns as follows:
1. and 2. and 3. to get an O(n*log(n)) algorithm
1. and twice 3. also to get an O(n*log(n)) algorithm

 The merging of methods that you have to do manually can be done by a
compiler, given appropriate directives.
The hope is that in a few years you have a programming language
available that supports this kind of merging.

For now in our algorithms class we do the merging manually but we have
a nice design language to
reason about the closest pair algorithm.

-- Karl



More information about the Cs4800 mailing list