Andrea Caracciolo. A Unified Approach to Architecture Conformance Checking. PhD thesis, University of Bern, March 2016. Details.
Architectural decisions can be interpreted as structural and behavioral constraints that must be enforced in order to guarantee overarching qualities in a system. Enforcing those constraints in a fully automated way is often challenging and not well supported by current tools. Current approaches for checking architecture conformance either lack in usability or offer poor options for adaptation. To overcome this problem we analyze the current state of practice and propose an approach based on an extensible, declarative and empirically-grounded specification language. This solution aims at reducing the overall cost of setting up and maintaining an architectural conformance monitoring environment by decoupling the conceptual representation of a user-defined rule from its technical specification prescribed by the underlying analysis tools. By using a declarative language, we are able to write tool-agnostic rules that are simple enough to be understood by untrained stakeholders and, at the same time, can be can be automatically processed by a conformance checking validator. Besides addressing the issue of cost, we also investigate opportunities for increasing the value of conformance results by evaluating a technique which guides developers in removing package cycles. We perform various case studies to show how our approach can be successfully adopted to support truly diverse industrial projects. We also investi- gate the dynamics involved in choosing and adopting a new automated conformance checking solution within an industrial context.
Andrea Caracciolo. On the Evaluation of a DSL for Architectural Consistency Checking. In Extended Abstracts of the Eighth Seminar on Advanced Techniques and Tools for Software Evolution (SATToSE 2015), p. 55—57, July 2015. Details.
Software architecture erodes over time and needs to be constantly monitored to be kept consistent with its original intended design. Consistency is rarely monitored using automated techniques. The cost associated to such an activity is typically not considered proportional to its benefits. To improve this situation, we propose Dicto, a uniform DSL for specifying architectural invariants. This language is designed to reduce the cost of consistency checking by offering a framework in which existing validation tools can be matched to newly-defined language constructs. In this paper we discuss how such a DSL can be qualitatively and qualitatively evaluated in practice.
Andrea Caracciolo, Bledar Aga, Mircea Lungu, and Oscar Nierstrasz. Marea: a Semi-automatic Decision Support System for Breaking Dependency Cycles. to appear. Details.
Dependency cycles are commonly recognized as one of the most critical quality anti-patterns. Cycles compromise the modularity of a system, prevent proper reuse and increase the cost of maintenance and testing. Many tools are capable of detecting and visualizing package cycles existing within software projects. Unfortunately, detecting cycles is only half of the work. Once detected, cycles need to be removed and this typically results in a complex process that is only partially supported by current tools. We propose a tool that offers an intelligent guidance mechanism to support developers in removing package cycles. Our tool, Marea, simulates different refactoring strategies and suggests the most cost-effective sequence of refactoring operations that will break the cycle. The optimal refactoring strategy is determined based on a custom profit function. Our approach has been validated on multiple projects and executes in linear time.
Boris Spasojević, Mircea Lungu, and Oscar Nierstrasz. A Case Study on Type Hints in Method Argument Names in Pharo Smalltalk Projects. to appear. Details.
A common practice when writing Smalltalk source code is to name method arguments in a way that hints at their expected type (i.e., aString, anInteger, aDictionary). This practice makes code more readable, but the prevalence of this practice is unknown, thus its reliability is questionable. Tools such as the auto complete feature in the Pharo Smalltalk code editor rely on these hints to improve the developer experience. The default algorithm used in Pharo to extract type information from these hints succeeds in extracting a type in slightly over 36% of method arguments taken from 114 Pharo projects. In this paper we present the results of analyzing the failing method argument names, and provide several simple heuristics that can increase the rate of success to slightly over 50%. We also present a case study on the relation between type hints and run-time types of method arguments that shows that type hints, in a great majority of cases, reflect run-time types.
Joël Guggisberg. Automatic Token Classification — An attempt to mine useful information for parsing. Bachelor’s thesis, University of Bern, December 2015. Details.
Developers need software models to make decisions while developing software systems. Static software models are commonly imported by parsing source code. But building a custom parser is a difficult task in most programming languages. To build such a custom parser the grammar of the programming language is needed. If the grammar is not available, which is the case for many languages and notably dialects, it has to be inferred from the source code. Automatically finding the keywords of those languages can help the process of inferring a grammar because many keywords identify beginnings and endings of the basic building blocks of programs. We tested four heuristics of finding keywords in source code of unknown languages: i) the most common words are keywords; ii) words that occur in most of the files are keywords; iii) words at the first position of the line before an indent are keywords; and iv) words at the beginning of a line are keywords. With our third method we achieved the best results. It found 26 of the 50 Java keywords, 10 out of 17 of the Shell keywords and 9 out of 20 of the Haskell keywords. Our data suggests that the more source code is available the more precise the results get. Adding more source code produced the most improvements when using the first or second method.