Uma ferramenta de apoio à edição e validação de OVMs textuais para dar suporte ao processo de análise automática

The Software Product Line Engineering is a software development paradigm aimed to reuse of common artifacts, being the Variability its main element, defined by a Variability Model, which can be represented using different notations. The Orthogonal Variability Model is one of these models, which objective is to represent the Product Line. The size these models grow up exponentially as is added elements, making impossible the its manual analysis. To solve this problem, the Automatic Analysis of Variability Models has the intention analyze this models, creating a way to manage the Software Product Line. One of the tools that implement the Automatic Analysis process is FaMa-OVM, which receive as input parameter a textual model written with OVM language, together with operations that are interpreted and processed, resulting in outputs like True or False, a Product, many Products, among others. However, in case of errors on input model, the tool will not make the analysis and the process will result in error. To solve this problem, is needed a editor with syntax validation resources, and a tool that integrate this editor with the FaMa-OVM analysis tool. Being OVM a Domain Specific Language, is pertinent the use of Language Workbenches to build the editor. One of the most known and complete Language Workbenches existing on open source community is the Xtext, having, among others features, support to grammar creation with BNF notation, validation, formatting, syntax highlighting besides of the resources provided by the Eclipse platform, where Xtext works as plug-in. The paper was developed in three main stages. Firstly,was made a study of concepts of Software Product Line Engineering and Domain Specific Languages. The second stage was the stage of implementation of grammar using the tool chosen and its validation. The last phase was the creation of a Graphic Interface for a better integration with the analysis tool FaMa-OVM. Key-words: Software Engineering. Software Product Line Engineering. Variability Models. Automated Analisys of Variability Models. Domain Specific Language. Grammar. Textual Language. Orthogonal Variability Model. Xtext. Lista de ilustrações Figura 1 – Custo de desenvolvimento para Sistemas Únicos e Família de Sistemas. 16 Figura 2 – Time to market para Sistemas Únicos e Família de Sistemas. . . . . . . 17 Figura 3 – Framework para SPLE. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figura 4 – Pirâmide da variabilidade. . . . . . . . . . . . . . . . . . . . . . . . . . 20 Figura 5 – Exemplo de modelo de variabilidade usando Feature Model. . . . . . . . 21 Figura 6 – Metamodelo da OVM em UML2. . . . . . . . . . . . . . . . . . . . . . . 22 Figura 7 – Notação gráfica da OVM. . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Figura 8 – Exemplo de modelo de variabilidade usando OVM. . . . . . . . . . . . . 23 Figura 9 – Metamodelo baseado em atributos. . . . . . . . . . . . . . . . . . . . . 24 Figura 10 – Exemplo de atributos básicos (cinza) e derivados (branco). . . . . . . . 25 Figura 11 – Restrições de Domínio em uma AOVM. . . . . . . . . . . . . . . . . . . 26 Figura 12 – Processo para a análise automática de Modelos de Variabilidade. . . . . 28 Figura 13 – Casos comuns de Características mortas em cinza. . . . . . . . . . . . 29 Figura 14 – Exemplos de DSLs gráfica(a) e textual(b). . . . . . . . . . . . . . . . . . 31 Figura 15 – Formalismo de Backus-Naur. . . . . . . . . . . . . . . . . . . . . . . . . 31 Figura 16 – Xtext workflow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figura 17 – Editor gerado pelo Xtext. . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figura 18 – Eclipse com Xtext. Novo projeto (esquerda). Estrutura de diretórios (direita). 36 Figura 19 – Editor com a Validação em funcionamento. . . . . . . . . . . . . . . . . 41 Figura 20 – Editor com detalhes de caracteres escondidos usados na formatação. . 43 Figura 21 – Editor com Sintax Highlighting (esquerda) e sem (direita). . . . . . . . . 45 Figura 22 – Tela de criação de novo projeto gerado pelo Assistente. . . . . . . . . . 46 Figura 23 – Novo Projeto de Plugin no Eclipse. . . . . . . . . . . . . . . . . . . . . . 50 Figura 24 – Arquivo MANIFEST.MF. . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Figura 25 – Arquivo ovm.product. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Figura 26 – Plataformas do DeltaPack disponíveis. . . . . . . . . . . . . . . . . . . 53 Figura 27 – Logo do Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Figura 28 – Question Dead Feature na Interface do FaMa-OVM. . . . . . . . . . . . 55 Figura 29 – Question All Products na Interface do FaMa-OVM. . . . . . . . . . . . . 55 Figura 30 – Representação gráfica da Gramática Model. . . . . . . . . . . . . . . . 61 Figura 31 – Representação gráfica da Gramática Relationships. . . . . . . . . . . . 61 Figura 32 – Representação gráfica da Gramática Constraints . . . . . . . . . . . . 62 Figura 33 – Representação gráfica da Gramática Atributos Globais . . . . . . . . . 62 Figura 34 – Representação gráfica da Gramática Atributos. . . . . . . . . . . . . . 63 Figura 35 – Modelo em OVM Database Tools. . . . . . . . . . . . . . . . . . . . . 64 Figura 36 – Modelo em OVM Billing. . . . . . . . . . . . . . . . . . . . . . . . . . . 64