Content area
Full Text
Abstract - This article is focused on presentation of a method for automated raise of programming language abstraction level. The base concept is a code pattern - recurring structure in program code. In contrast to design patterns, it has a specific representation at a code level and thus can be parameterized and replaced by a new language element. The paper presents an approach for language extension based on the found patterns. An algorithm PATACA (PATtern Analyzing and Collecting Algorithm) for automated recognition of patterns is described and examined. It is based on an interactive communication with the programming environment, where recognized patterns are suggested to a programmer and can be injected into the language in a form of new elements. Conducted experiments are evaluated in regard to the future perspective and contributions.
Keywords: PATACA; abstraction; code patterns; language extension; projectional editing.
(ProQuest: ... denotes formulae omitted.)
I. INTRODUCTION
With growth of software systems, expression complexity of their properties in a programming language mounts up as well. As the answer to complexity, higher levels of abstraction can be introduced, encapsulating complex expressions [1], allowing hide of implementation details. A promising solution can be an abstraction based on a language, allowing reduction of the complexity through defining new, more abstract concepts and language constructions.
As a background of abstraction we regard Voelter's DSL Engineering book [2] stating 2 ways of defining abstractions:
. Linguistic, with abstractions built into the language, what is typical for DSLs (Domain- Specific Languages),
. In-language, with abstractions expressed by concepts available in the language, typical for GPLs (General-Purpose Languages).
Linguistic abstraction assumes a programmer is able to use correct abstraction since DSL users are familiar with a particular domain. Thus, no analysis to reverse engineer the semantics is needed and no details irrelevant to the model are expressed, increasing conciseness and avoiding over-specification [2]. Via transformation rules tied to the identities of the language concepts, linguistic abstraction represents a simple process making the language suitable for domain experts. However, this way the language evolution has to be frequent and the abstractions have to be known in advance to be used.
Compared to the linguistic, in-language abstraction constitutes achieving conciseness by a GPL providing facilities allowing users to define new (non-linguistic) abstractions...