14 research outputs found

    Shortcut fusion rules for the derivation of circular and higher-order monadic programs

    Get PDF
    Functional programs often combine separate parts using intermediate data structures for communicating results. Programs so defined are modular, easier to understand and maintain, but suffer from inefficiencies due to the generation of those gluing data structures. To eliminate such redundant data structures, some program transformation techniques have been proposed. One such technique is shortcut fusion, and has been studied in the context of both pure and monadic functional programs. In this paper, we study several shortcut fusion extensions, so that, alternatively, circular or higher-order programs are derived. These extensions are also provided for effect-free programs and monadic ones. Our work results in a set of generic calculation rules, that are widely applicable, and whose correctness is formally established.(undefined

    Formal Semantics for Java-like Languages and Research Opportunities

    Get PDF
    The objective of this paper is twofold: first, we discuss the state of art on Java-like semantics, focusing on those that provide formal specification using operational semantics (big-step or small-step), studying in detail the most cited projects and presenting some derivative works that extend the originals aggregating useful features. Also, we filter our research for those that provide some insights in type-safety proofs. Furthermore, we provide a comparison between the most used projects in order to show which functionalities are covered in such projects. Second, our effort is focused towards the research opportunities in this area, showing some important works that can be applied to the previously presented projects to study features of object-oriented languages, and pointing for some possibilities to explore in future researches

    Watch out for that tree! A tutorial on shortcut deforestation

    Get PDF
    Functional programmers are strong enthusiasts of modular solutions to programming problems. Since software characteristics such as readability or maintainability are often directly proportional to modularity, this programming style naturally contributes to the beauty of functional programs. Unfortunately, in return of this beauty we often sacrifice efficiency: modular programs rely, at runtime, on the creation, use and elimination of intermediate data structures to connect its components. In this tutorial paper, we study an advanced technique that attempts to retain the best of this two worlds: (i) it allows programmers to implement beautiful, modular programs (ii) it shows how to transform such programs, in a way that can be incorporated in a compiler, into programs that do not construct any intermediate structure.- (undefined

    Formal semantics for java-like languages and research opportunities.

    Get PDF
    Currently, Java is one of the most used programming languages, being adopted in many large projects, where applications reach a level of complexity for which manual testing and human inspection are not enough to guarantee quality in software development. Because of that, there is a growing research field that concerns the formalization of small subsets of Java-like languages aimed to conduct studies that were impossible to achieve through informal approaches. In this context, the objective of this paper is twofold: the discussion of the state-of-the-art on Java-like semantics and the presentation of research opportunities in this area. For the first goal, we present a research about Java-like formal semantics, filtering those that provide some insights in type-safety proofs, choosing the four most cited projects to be presented in details. We also briefly present some related studies that extended the originals aggregating useful features. Additionally, we provide a comparison between the most cited projects in order to show which functionalities are covered by each one of them. As for the second goal, we discuss possible future studies that can be performed by using the presented formal semantics.Atualmente Java ?e uma das linguagens de programac? ?ao mais utilizadas, sendo adotada em muitos projetos de grande escala, onde aplicac? ?oes alcanc?am um n??vel de complexidade no qual testes e inspec? ?oes manuais n?ao s?ao suficientes para garantir qualidade no desenvolvimento de software. Por conta disso, existe um crescente campo de pesquisa que diz respeito a formalizac? ?ao de pequenos fragmentos de linguagens similares ao Java, almejando a conduc? ?ao de estudos os quais eram imposs??veis de realizar atrav?es de abordagens informais. Neste contexto, este artigo tem dois objetivos: a discuss?ao do estado da arte sobre sem?anticas similares ao Java e a apresentac? ?ao de oportunidades de pequisa nesta ?area. Para o primeiro objetivo, ?e proposta uma pequisa sobre sem?anticas formais da linguagem Java, filtrando aquelas que prov?eem provas de seguranc?a de tipos, escolhendo os quatro projetos mais citados para serem apresentados em detalhes. Tamb?em s?ao apresentados brevemente alguns estudos derivados que estendem os originais agregando funcionalidades. Adicionalmente, ?e apresentada uma comparac? ?ao entre os projetos mais citados como forma de demonstrar quais funcionalidades s?ao cobertas por cada um deles. Como segundo objetivo s?ao discutidos poss??veis trabalhos futuros que podem ser realizados atrav?es do uso das sem? anticas formais apresentadas

    Specifying design rules in aspect-oriented systems

    Get PDF
    Programação Orientada a Aspectos é conhecida como uma técnica para modularização de interesses transversais. Entretanto, construções que visam apoiar a modularidade transversal podem quebrar a modularidade de classe. Como consequência, os desenvolvedores de classes enfrentam problemas de modificabilidade, desenvolvimento em paralelo e entendimento, porque precisam estar conscientes da implementação dos aspectos sempre que forem desenvolver ou dar manutenção em uma classe. Ao mesmo tempo, aspectos são vulneráveis a mudanças nas classes, já que não existe um contrato especificando os pontos de interação entre estes elementos. Estes problemas podem ser mitigados através de Regras de Projeto entre classes e aspectos. Nós apresentamos uma linguagem para especificação de Regras de Projeto (LSD) e exploramos seus benefícios desde as fases iniciais do processo de desenvolvimento, especialmente com o objetivo de dar apoio ao desenvolvimento modular de classes e aspectos. Nós discutimos como nossa linguagem melhora a modularidade transversal sem quebrar a modularidade de classe. Além disso, especificamos a semântica da linguagem em Alloy. A linguagem é implementada através de uma extensão do abc (AspectBench Compiler), tornando mais fácil expressar e checar muitas das Regras de Projeto encontradas em sistemas Orientados a Aspectos. Nós avaliamos LSD usando o sistema Health Watcher como estudo de caso e comparamos com abordagens existentes._________________________________________________________________________________________ ABSTRACT: Aspect-Oriented Programming is known as a technique for modularizing crosscutting concerns. However, constructs aimed to support crosscutting modularity might actually break class modularity. As a consequence, class developers face changeability, parallel development and comprehensibility problems, because they must be aware of aspects whenever they develop or maintain a class. At the same time, aspects are vulnerable to changes in classes, since there is no contract specifying the points of interaction amongst these elements. These problems can be mitigated by using adequate Design Rules between classes and aspects. We present a Design Rule specification language (LSD) and explore its benefits since the initial phases of the development process, specially with the aim of supporting modular development of classes and aspects. We discuss how our language improves crosscutting modularity without breaking class modularity. Besides, we specify the language semantics in Alloy. The language is implemented through an extension of abc (AspectBench Compiler), making it easy to express and check most of the Design Rules found in Aspect-Oriented systems. We evaluate the language using the Health Watcher system as case study and compare it with existent approaches

    Políticas de Copyright de Publicações Científicas em Repositórios Institucionais: O Caso do INESC TEC

    Get PDF
    A progressiva transformação das práticas científicas, impulsionada pelo desenvolvimento das novas Tecnologias de Informação e Comunicação (TIC), têm possibilitado aumentar o acesso à informação, caminhando gradualmente para uma abertura do ciclo de pesquisa. Isto permitirá resolver a longo prazo uma adversidade que se tem colocado aos investigadores, que passa pela existência de barreiras que limitam as condições de acesso, sejam estas geográficas ou financeiras. Apesar da produção científica ser dominada, maioritariamente, por grandes editoras comerciais, estando sujeita às regras por estas impostas, o Movimento do Acesso Aberto cuja primeira declaração pública, a Declaração de Budapeste (BOAI), é de 2002, vem propor alterações significativas que beneficiam os autores e os leitores. Este Movimento vem a ganhar importância em Portugal desde 2003, com a constituição do primeiro repositório institucional a nível nacional. Os repositórios institucionais surgiram como uma ferramenta de divulgação da produção científica de uma instituição, com o intuito de permitir abrir aos resultados da investigação, quer antes da publicação e do próprio processo de arbitragem (preprint), quer depois (postprint), e, consequentemente, aumentar a visibilidade do trabalho desenvolvido por um investigador e a respetiva instituição. O estudo apresentado, que passou por uma análise das políticas de copyright das publicações científicas mais relevantes do INESC TEC, permitiu não só perceber que as editoras adotam cada vez mais políticas que possibilitam o auto-arquivo das publicações em repositórios institucionais, como também que existe todo um trabalho de sensibilização a percorrer, não só para os investigadores, como para a instituição e toda a sociedade. A produção de um conjunto de recomendações, que passam pela implementação de uma política institucional que incentive o auto-arquivo das publicações desenvolvidas no âmbito institucional no repositório, serve como mote para uma maior valorização da produção científica do INESC TEC.The progressive transformation of scientific practices, driven by the development of new Information and Communication Technologies (ICT), which made it possible to increase access to information, gradually moving towards an opening of the research cycle. This opening makes it possible to resolve, in the long term, the adversity that has been placed on researchers, which involves the existence of barriers that limit access conditions, whether geographical or financial. Although large commercial publishers predominantly dominate scientific production and subject it to the rules imposed by them, the Open Access movement whose first public declaration, the Budapest Declaration (BOAI), was in 2002, proposes significant changes that benefit the authors and the readers. This Movement has gained importance in Portugal since 2003, with the constitution of the first institutional repository at the national level. Institutional repositories have emerged as a tool for disseminating the scientific production of an institution to open the results of the research, both before publication and the preprint process and postprint, increase the visibility of work done by an investigator and his or her institution. The present study, which underwent an analysis of the copyright policies of INESC TEC most relevant scientific publications, allowed not only to realize that publishers are increasingly adopting policies that make it possible to self-archive publications in institutional repositories, all the work of raising awareness, not only for researchers but also for the institution and the whole society. The production of a set of recommendations, which go through the implementation of an institutional policy that encourages the self-archiving of the publications developed in the institutional scope in the repository, serves as a motto for a greater appreciation of the scientific production of INESC TEC

    Action semantics of unified modeling language

    Get PDF
    The Uni ed Modeling Language or UML, as a visual and general purpose modeling language, has been around for more than a decade, gaining increasingly wide application and becoming the de-facto industrial standard for modeling software systems. However, the dynamic semantics of UML behaviours are only described in natural languages. Speci cation in natural languages inevitably involves vagueness, lacks reasonability and discourages mechanical language implementation. Such semi-formality of UML causes wide concern for researchers, including us. The formal semantics of UML demands more readability and extensibility due to its fast evolution and a wider range of users. Therefore we adopt Action Semantics (AS), mainly created by Peter Mosses, to formalize the dynamic semantics of UML, because AS can satisfy these needs advantageously compared to other frameworks. Instead of de ning UML directly, we design an action language, called ALx, and use it as the intermediary between a typical executable UML and its action semantics. ALx is highly heterogeneous, combining the features of Object Oriented Programming Languages, Object Query Languages, Model Description Languages and more complex behaviours like state machines. Adopting AS to formalize such a heterogeneous language is in turn of signi cance in exploring the adequacy and applicability of AS. In order to give assurance of the validity of the action semantics of ALx, a prototype ALx-to-Java translator is implemented, underpinned by our formal semantic description of the action language and using the Model Driven Approach (MDA). We argue that MDA is a feasible way of implementing this source-to-source language translator because the cornerstone of MDA, UML, is adequate to specify the static aspect of programming languages, and MDA provides executable transformation languages to model mapping rules between languages. We also construct a translator using a commonly-used conventional approach, in i which a tool is employed to generate the lexical scanner and the parser, and then other components including the type checker, symbol table constructor, intermediate representation producer and code generator, are coded manually. Then we compare the conventional approach with the MDA. The result shows that MDA has advantages over the conventional method in the aspect of code quality but is inferior to the latter in terms of system performance

    Brazilian extreme wind climate

    Get PDF
    Uma característica importante da otimização dos processos de projeto em engenharia civil é a demanda pelo aperfeiçoamento da precisão das estimativas das cargas de projeto. As cargas de projeto devidas ao vento são baseadas em análises de registros de dados climatológicos para as quais modelos estatísticos são desenvolvidos. Tais modelos propõem níveis de carga com certas probabilidades de ocorrência durante um determinado período de retorno, ou intervalo médio de recorrência. Desde 1988, a NBR 6123: Forças devidas ao vento em edificações, a norma brasileira de cargas de vento, tem equilibrado a competição das necessidades de segurança e de conforto do usuário contra os custos de construção da cada vez mais alta silhueta urbana da nação. O mapa de isopletas do parâmetro de velocidade básica regional é o ponto inicial para todos os cálculos de cargas de projeto devidas ao vento na maior nação da América do Sul, com velocidades de vento regionais derivadas da distribuição de Fréchet, utilizando as máximas velocidades de rajada anuais equivalentes de 1950 a 1975 observadas, em aeródromos brasileiros. Além do potencial de utilizar mais de 40 anos de novos dados, incluindo dados da rede de observação automatizada do INMET, avanços nas comunidades científicas de engenharia do vento, meteorologia e estatística permitem o desenvolvimento de modelos climáticos mais detalhados e robustos. Há, também, uma crescente necessidade de separar os eventos de tempestades de vento em eventos não- sinóticos e sinóticos, devido às suas diferentes características. O estudo produz modelos climáticos regionais de ventos extremos atualizados em todo o Brasil, para serem usados tanto em casos de estados limite último e de serviço do projeto. Dados meteorológicos das duas maiores redes meteorológicas brasileiras, adquiridos de diversas fontes, foram utilizados, mas apenas após um exame completo da qualidade de cada fonte. Investigações foram feitas com relação a metadados históricos e atuais (altura, localização, tipo de anemômetro) de cada estação, com resultados variados. Correções de velocidades do vento foram feitas para terreno e altura, onde necessário. Algoritmos robustos para a separação de velocidades de vento pico não-sinóticas, sinóticas e duvidosas foram desenvolvidos e aplicados a uma série histórica de dados de 692 estações meteorológicas de superfície para gerar conjuntos de valores extremos para uma análise de valor extremo com Método de Tempestades Independentes modificado. Constatou-se que os ventos não-sinóticos são dominantes na maioria do Brasil para todos os períodos de retorno. Parâmetros meteorológicos relacionados a ventos extremos não-sinóticos e sinóticos foram mapeados por todo o país. Um mapa de isopletas de velocidades básicas do vento foi proposto para uma versão atualizada da NBR 6123, acompanhado dos fatores probabilísticos atualizados para uma DGVE Tipo I – Distribuição de Gumbel. Recomendações chave incluem a necessidade de maiores investigações sobre as características de ventos não-sinóticos no Brasil e o melhoramento dos registros de metadados por parte das organizações meteorológicas.A critical feature of the continual optimisation of civil engineering design processes is the demand to improve accuracy of design load estimations. Design wind loads are based on analyses of recorded historical meteorological data for which statistical models are developed. Such models propose load levels of certain probabilities of occurrence over a particular return period, or mean recurrence interval. Since 1988, NBR 6123: Forças devidas ao vento em edificações, Brazil’s wind loading code, has balanced the competing needs of public safety and tenant comfort against construction costs of the nation’s ever-growing skyline. The isopleth map of the regional basic velocity parameter is the basis for all wind design load calculations in South America’s largest nation, with regional wind speeds derived from the Fréchet distribution of annual maxima equivalent gust speeds from 1950 to 1975 observed at Brazilian aerodromes. Besides the potential to utilise more than 40 years of new data, including data from INMET’s automated observing network, advances across the scientific communities of wind engineering, meteorology and statistics allow for the development of more detailed and robust climatic models. There is also a growing need to separate wind storm events into non-synoptic and synoptic events due to their different characteristics. The study produces updated regional extreme wind climate models across Brazil to be used for both serviceability and ultimate design load cases. Meteorological data from the two Brazilian meteorological networks acquired from several sources were utilised, but only after thorough examination of the quality of each source. Investigations were made regarding historical and current metadata (height, location, anemometer type) of each station with mixed success. Corrections to wind speeds were made for terrain and height where necessary. Robust algorithms for the separation of non-synoptic, synoptic and suspicious peak wind speeds were developed and applied to time-series data from 692 surface weather stations to generate sets of extreme values for a modified Method of Independent Storms extreme value analysis. Non-synoptic winds were found to dominant the majority of Brazil for all return periods. Meteorological parameters relating to non-synoptic and synoptic extreme winds were mapped across the country. An isopleth map of basic wind speeds was proposed for an updated version of NBR 6123, with accompanying updated probabilistic factors for a GEVD Type I – Gumbel distribution. Key recommendations include the need for further investigations into non-synoptic wind characteristics in Brazil and the improvement of metadata records by meteorological organisations

    A theory of flow network typings and its optimization problems

    Full text link
    Many large-scale and safety critical systems can be modeled as flow networks. Traditional approaches for the analysis of flow networks are whole-system approaches in that they require prior knowledge of the entire network before an analysis is undertaken, which can quickly become intractable as the size of network increases. In this thesis we study an alternative approach to the analysis of flow networks, which is modular, incremental and order-oblivious. The formal mechanism for realizing this compositional approach is an appropriately defined theory of network typings. Typings are formalized differently depending on how networks are specified and which of their properties is being verified. We illustrate this approach by considering a particular family of flow networks, called additive flow networks. In additive flow networks, every edge is assigned a constant gain/loss factor which is activated provided a non-zero amount of flow enters that edge. We show that the analysis of additive flow networks, more specifically the max-flow problem, is NP-hard, even when the underlying graph is planar. The theory of network typings gives rise to different forms of graph decomposition problems. We focus on one problem, which we call the graph reassembling problem. Given an abstraction of a flow network as a graph G = (V,E), one possible definition of this problem is specified in two steps: (1) We cut every edge of G into two halves to obtain a collection of |V| one-vertex components, and (2) we splice the two halves of all the edges, one edge at a time, in some order that minimizes the complexity of constructing a typing for G, starting from the typings of its one-vertex components. One optimization is minimizing “maximum” edge-boundary degree of components encountered during the reassembling of G (denoted as α measure). Another is to minimize the “sum” of all edge-boundary degrees encountered during this process (denoted by β measure). Finally, we study different variations of graph reassembling (with respect to minimizing α or β) and their relation with problems such as Linear Arrangement, Routing Tree Embedding, and Tree Layout

    ADL based automatic compiler backend generation

    Get PDF
    Orientador: Paulo Cesar CentoducatteDissertação (mestrado) - Universidade Estadual de Campinas, Instituto de ComputaçãoResumo: O processo de automatização da criação de backends de compiladores, isto é, do componente responsável pela tradução final para código de máquina, é perseguido desde o surgimento dos primeiros compiladores. A separação entre os algoritmos empregados no backend e a descrição formal da máquina, que requer conhecimento sobre a arquitetura alvo, é uma característica bastante desejada, uma vez que propicia a criação de novos backends sem a necessidade de conhecer o projeto do compilador, mas apenas do processador. Por esse motivo, um esforço natural para manter o desenvolvimento simples e intuitivo é a concentração do conhecimento sobre a máquina alvo em uma forma concisa de descrição, a partir da qual seja possível especializar algoritmos genéricos de compilação para este alvo específico. Uma linguagem de descrição de arquiteturas (ADL) permite a especificação das características arquiteturais de processadores, incluindo o seu conjunto de instruções (ISA). Neste trabalho, um estudo de mecanismos para gerar backend de compiladores através de descrições arquiteturais de processadores é apresentado, com ênfase no estudo de caso da ADL ArchC com o compilador LLVM. Um protótipo de um gerador de backends para LLVM a partir de uma descrição em ArchC foi desenvolvido, e backends para as arquiteturas ARM, MIPS, SPARC e PowerPC foram gerados com sucesso. Para alcançar este objetivo, foi usado um algoritmo de busca para resolver o problema da programação automática e inferir como implementar fragmentos pré-selecionados da linguagem intermediária LLVM utilizando instruções de uma arquitetura alvo arbitrária. Quatro técnicas para aumentar a velocidade deste algoritmo são apresentadas, de forma a não somente viabilizar uma solução para a geração automática de backends, mas também concluir o processo em menos de 20 segundos para três das quatro arquiteturas testadas. Programas do benchmark Mibench foram compilados com os compiladores gerados, executados com simuladores ArchC e os resultados comparados com aqueles gerados a partir dos mesmos programas compilados com os compiladores gcc e LLVM original, validando os novos backends. A qualidade do código gerado pode ser comparada com a de compiladores consagrados, caso seja utilizado um otimizador peephole para realizar substituições simples de algumas sequências ineficientesAbstract: Researchers pursue the automation of compiler backend generation, the component responsible for final translation from intermediate language to machine code, since the begining of compilers theory creation. The separation between the algorithms used in the backend and formal machine description, which encompasses knowledge about the target architecture, is an important feature, since it facilitates the creation of new backends without the need for deep understanding of the compiler project. For this reason, an effort to maintain the development natural, simple and intuitive must concentrate the knowledge of the target machine in a concise description in a way it is possible to specialize generic algorithms to this target. An architecture description language (ADL) allows the specification of architectural features of processors, comprising the instruction set architecture available. This work presents a study of mechanisms for generating compiler backend through architectural descriptions of processors, with emphasis on a case study of the ArchC ADL with the LLVM compiler. We developed an automatic backend generator prototype for LLVM backends based on ArchC and successfully generated backends for the architectures ARM, MIPS, PowerPC and SPARC. To achieve this, we used a search algorithm to solve the problem of automatic programming and to infer how to implement pre-selected fragments of LLVM intermediate language using instructions of an arbitrary target architecture. We present four techniques to increase the speed of this algorithm which not only enables a solution for the automatic generation of backends, but also completes the process in less than 20 seconds for three of four architectures tested. Test compilation of Mibench benchmark programs attested the proper functioning of the backend and revealed that the quality of the generated code can compare with that of existing compilers, if a peephole optimizer were used to perform some simple substitutions of inefficient sequencesMestradoCiência da ComputaçãoMestre em Ciência da Computaçã
    corecore