From a HLA to another HLA I From code to code through HLA* Code Code’ Code Code’ HLA HLA’ Language Model Code Code’ HLA HLA’ Language Model * Higher level abstracion
to the internal structure of software to make ot easier to understand and cheaper to modify without changing its observable behavior ” [MF99] I This includes: – Use of pre-/post-conditions [WFO92] – Definition of high level refactorings [MÓC00]
is a framework that facilitates the transformation of UML model. Once the model has been linearized, map, filter and reduce functions can be composed and applied on it. But some problems of semantic remain. ”
their FAMIX Model [FAMOOS]: “ the FAMIX model provides for a language-independent representation of object-oriented sources and contains the required information of the reengineering tasks performed [by our present tools]. ”
focuses on refactorings: – What refactorings are interesting? [MF99] – How to prove they don’t change the behaviour of the program? [WFO92, DBR99] – How to compose them? [MÓC00] – How to support them [DR97, JREFACTORY, IJRENAMER, XREFACTORY] I BUT...
been done on detecting the spots where to apply the refactoring I This involves formalizing: – The refactorings – The “bad smells” [BFWFO94, WJB98] – The “refactoring patterns” I AND...
automatize refactoring? – How to automatically detect spots that should be refactored? [IRM96, MMF99] – What refactorings should be applied? – How to prove the applied refactorings do not change the behavior of the program? – What improvements are expected?
at a higher level: HLA – Formalize the refactoring patterns using the same HLA – Match a refactoring pattern with the HLA – Formalize the set of refactorings to apply – Appply the refactorings – Prove they do not change the behaviour of the program
I Design defect formalization and detection [SGWAEQQY98, WJB98, MMF99] I Static and dynamic analysis [JVRNHJSU92, JH90] I Constraints/Logic programing [JESS]
preserve behaviour or just behaviour within a specified domain? – What HLA should be used [HAAYGG00], AOL [GARFLC98], UML, FAMIX? – How to detect “bad smells” in this HLA?
directions: – How to detect? – What HLA is needed? – What refactorings, high-leve refactorings and refactoring patterns? Code Code’ HLA HLA’ Language Model
meta-model for structural patterns with a hint of behaviour [HAAYGG00] I Difference between association, aggregation and composition [YGG00] (plus delegation [GARFLC98]) I Mix refactoring and tests I Use of explicative constraints?
a design pattern with constraints – Represent the code as a domain – Apply the constraints on the domain I Constraints to express and to check – Express the transformation with constraints – Express the pre-/post-conditions