Space-for-Time Optimization Aspects A Case for Harmless Aspects with around Advice

The space-for-time trade-off is one of the earliest to be discovered in computer science. Taking program complexity into account, we can safely call it “space and elegance”for-time trade-off. Contemporary algorithms text books often tackle the complexity problem by first presenting algorithms in an elegant, but inefficient form, followed by a few paragraphs informally describing optimizations. We used aspects to improve the presentation of several algorithms like Topological Ordering, Dijkstra’s shortest path, Closest Pair, Stable Marriage, etc. Harmlessness is a key safety requirement for optimization aspects. Existing models for harmless aspects disallow general around advice which is indispensable for expressing optimization aspects. We present a model for harmless aspects with around advice. We also present a domain specific model for space-for-time optimization aspects that rules out several situations when the optimization aspect is not improving the runtime efficiency and enables more informative error messages.

[1]  David Walker,et al.  Harmless advice , 2006, POPL '06.

[2]  Lodewijk Bergmans,et al.  Prototyping and Composing Aspect Languages , 2008, ECOOP.

[3]  Robert Harper,et al.  Self-adjusting computation , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[4]  Éva Tardos,et al.  Algorithm design , 2005 .

[5]  Yanhong A. Liu,et al.  Efficiency by Incrementalization: An Introduction , 2000, High. Order Symb. Comput..

[6]  Rémi Douence,et al.  Aspects preserving properties , 2008, PEPM '08.

[7]  Gary T. Leavens,et al.  Translucid contracts for modular reasoning about aspect-oriented programs , 2010, SPLASH/OOPSLA Companion.

[8]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[9]  Ondrej Lhoták,et al.  Aspects for Trace Monitoring , 2006, FATES/RV.

[10]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[11]  Jianjun Zhao,et al.  Pipa: A Behavioral Interface Specification Language for AspectJ , 2003, FASE.

[12]  Yanhong A. Liu,et al.  Incrementalization across object abstraction , 2005, OOPSLA '05.

[13]  Gary T. Leavens,et al.  Spectators and Assistants: Enabling Modular Aspect-Oriented Reasoning , 2002 .

[14]  Roel Wuyts,et al.  Composing aspects with aspects , 2010, AOSD.

[15]  Gregor Kiczales,et al.  D: A Language Framework for Distributed Programming , 1997 .

[16]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[17]  Robert Harper Self-adjusting computation , 2004, LICS 2004.