Chapter 8. What is the mother tongue of the object oriented programs?

Table of Contents

An analytical weaving
A robot soccer weaving

Abstract

The aim of the analytic aspect to be developed is to analyse large object oriented software systems. Now we investigate the Program W that was already used in the previous case study. This theme is presented in detail in the paper [ASZ] or in online form at http://hiradastechnika.hu/data/upload/file/2012/HT2011_2_05.pdf

„NAGY TESTVÉR SZEMMEL TART”

—1984 [ORWELL]

An analytical weaving

Like the previous case study, this one is also based on a publication, see [ASZ] . The related source codes and resources can be found at the author's website http://www.inf.unideb.hu/~nbatfai/asz/.

The idea is that we regard the logging of a running program as a corpus of an unknown language and the aspect to be developed simply listens to method calls. The form of the words of the unknown language is the following:

 the name of the caller class -> the name of the called class
        

and in another given case

 caller class.caller method -> called class.called method
        

We are going to investigate the question: whether this language has the same word frequency distribution as can be observed in case of spoken languages?

We use the next pointcut to capture all method calls

pointcut fgvHivas() : call(* *(..))
        && !cflow(adviceexecution());

then the advice

before() : fgvHivas() { ... String
        honnan =
        thisEnclosingJoinPointStaticPart.getSignature().getDeclaringType().toString();
        String hova =
        thisJoinPointStaticPart.getSignature().getDeclaringType() .toString();
        ...

logs the honnan -> hova-shaped, or in English from -> to words.

Example 8.1. Weaving this aspect into ALICE

Weave this aspect into ALICE, simply use the Ant script provided in the package http://www.inf.unideb.hu/~nbatfai/asz/.