2003 · 42 citations · 8 references
ComputingComputer ScienceProgramming LanguagesSyntaxSystems ProgrammingAbstract Syntax TreesApplication Programming InterfacesControl-flow AnalysisData-flow AnalysisType CheckingType SystemsAspect-oriented Programming
We define a generic join point model for checking the Law of Demeter (LoD). Join points are trees, pointcuts are predicates over join points, and advice is checked statically similar to how declare warning is checked in AspectJ. We illustrate how the joint point form is mapped to the object and class forms of LoD, and provide an implementation in AspectJ that approximates LoD's class form by dynamically checking a particular execution using only the join points' static part. The paper proposes two ways to extend AspectJ to provide access to lexical join points directly. The first proposes statically executable advice and pointcut designators over lexical join points. The second proposes statically executable meta-advice over the exposed abstract syntax tree of the program and using Demeter style traversals to mirror AspectJ pointcuts.
8
Assuring good style for object-oriented programs
Karl Lieberherr, Ian M. Holland · IEEE Software · 1989 · 228 citations
Compilation Semantics of Aspect-Oriented Programs
Hidehiko Masuhara, Gregor Kiczales, Chris Dutchyn · 2002 · 66 citations
Formulations and benefits of the law of demeter
K. J. Lienberherr · ACM SIGPLAN Notices · 1989 · 38 citations
Mati Shomrat, Amiram Yehudai · 2002 · 37 citations