13 research outputs found

    On the use of a multiple view interactive environment for MATLAB and octave program comprehension

    Get PDF
    WOS:000364988500049 (Nº de Acesso Web of Science)MATLAB or GNU/Octave programs can become very large and complex and therefore difficult to understand and maintain. The objective of this paper is presenting an approach to mitigate this problem, based upon a multiple view interactive environment (MVIE) called OctMiner. The latter provides visual resources to support program comprehension, namely the selection and configuration of several views to meet developers’ needs. For validation purposes, the authors conducted two case studies to characterize the use of OctMiner in the context of software comprehension activities. The results provided initial evidences of its effectiveness to support the comprehension of programs written in the aforementioned languages

    Domain-specific languages

    Get PDF
    Domain-Specific Languages are used in software engineering in order to enhance quality, flexibility, and timely delivery of software systems, by taking advantage of specific properties of a particular application domain. This survey covers terminology, risks and benefits, examples, design methodologies, and implementation techniques of domain-specific languages as used for the construction and maintenance of software systems. Moreover, it covers an annotated selection of 75 key publications in the area of domain-specific languages

    Model-driven search-based loop fusion optimization for handwritten code

    Get PDF
    The Tensor Contraction Engine (TCE) is a compiler that translates high-level, mathematical tensor contraction expressions into efficient, parallel Fortran code. A pair of optimizations in the TCE, the fusion and tiling optimizations, have proven successful for minimizing disk-to-memory traffic for dense tensor computations. While other optimizations are specific to tensor contraction expressions, these two model-driven search-based optimization algorithms could also be useful for optimizing handwritten dense array computations to minimize disk to memory traffic. In this thesis, we show how to apply the loop fusion algorithm to handwritten code in a procedural language. While in the TCE the loop fusion algorithm operated on high-level expression trees, in a standard compiler it needs to operate on abstract syntax trees. For simplicity, we use the fusion algorithm only for memory minimization instead of for minimizing disk-to-memory traffic. Also, we limit ourselves to handwritten, dense array computations in which loop bounds expressions are constant, subscript expressions are simple loop variables, and there are no common subexpressions. After type-checking, we canonicalize the abstract syntax tree to move side effects and loop-invariant code out of larger expressions. Using dataflow analysis, we then compute reaching definitions and add use-def chains to the abstract syntax tree. After undoing any partial loop fusion, a generalized loop fusion algorithm traverses the abstract syntax tree together with the use-def chains. Finally, the abstract syntax tree is rewritten to reflect the loop structure found by the loop fusion algorithm. We outline how the constraints on loop bounds expressions and array index expressions could be removed in the future using an algebraic cost model and an analysis of the iteration space using a polyhedral model

    TOWARD EASING THE INSTANTIATION OF APPLICATIONS USING GRENJ FRAMEWORK BY MEANS OF A DOMAIN SPECIFIC LANGUAGE

    Get PDF
    White-box frameworks are a collection of extensible classes representing reusable designs that can be extended, to varying degrees, to instantiate custom-tailored software systems. Due to its inherent benefits (e.g., large-scale reuse of code, design, and domain knowledge), such domain-specific reuse approach has become a de facto standard to implement business systems. However, in order to fully realize the advantages of white-box frameworks, developers need to have substantial architectural and technical knowledge. In effect, developers must be familiar with the framework's extension points (e.g., hot spots) and how to program those extensions using the programming language in which the framework was implemented. GRENJ is a white-box framework implemented in Java. Thus, instantiating applications through such framework is quite complex and demands detailed architectural knowledge and advanced Java programming skills. In order to lessen the amount of source code, effort, and expertise required to instantiate applications by using GRENJ framework, we have developed a domain specific language that manages all application instantiation issues systematically. This domain specific language facilitates the application instantiation process by acting as a facade over GRENJ framework as well as providing the user with a more concise, human-readable syntax than Java. In this paper, we contrast the major differences and benefits resulting from instantiating applications solely using GRENJ framework and indirectly reusing its source code by applying our domain specific language.White-box frameworks are a collection of extensible classes representing reusable designs that can be extended, to varying degrees, to instantiate custom-tailored software systems. Due to its inherent benefits (e.g., large-scale reuse of code, design, and domain knowledge), such domain-specific reuse approach has become a de facto standard to implement business systems. However, in order to fully realize the advantages of white-box frameworks, developers need to have substantial architectural and technical knowledge. In effect, developers must be familiar with the framework's extension points (e.g., hot spots) and how to program those extensions using the programming language in which the framework was implemented. GRENJ is a white-box framework implemented in Java. Thus, instantiating applications through such framework is quite complex and demands detailed architectural knowledge and advanced Java programming skills. In order to lessen the amount of source code, effort, and expertise required to instantiate applications by using GRENJ framework, we have developed a domain specific language that manages all application instantiation issues systematically. This domain specific language facilitates the application instantiation process by acting as a facade over GRENJ framework as well as providing the user with a more concise, human-readable syntax than Java. In this paper, we contrast the major differences and benefits resulting from instantiating applications solely using GRENJ framework and indirectly reusing its source code by applying our domain specific language

    ONTODL+: an ontology description language and its compiler

    Get PDF
    Dissertação de mestrado em Engenharia InformáticaOntologies are very powerful tools when it comes to handling knowledge. They offer a good solution to exchange, store, search and infer large volumes of information. Throughout the years various solutions for knowledge-based systems use ontologies at their core. OntoDL has been developed as a Domain Specific Language using ANTLR4, to allow for the specification of ontologies. This language has already been used by experts of various fields has a way to use computer-based solutions to solve their problems. In this thesis, included on the second year of the Master degree in Informatics Engineering, OntoDL+ was created as an expansion of the original OntoDL. Both the language and its compiler have been improved. The language was extended to improve usability and productivity for its users, while ensuring an easy to learn and understand language. The compiler was expanded to translate the language specifications to a vaster array of languages, increasing the potential uses of the DSL with the features provided by the languages. The compiler and some examples of the DSL can be downloaded at the website https: //epl.di.uminho.pt/∼gepl/GEPL DS/OntoDL/ created for the application and presented in the final chapters of the thesis.As ontologias são formalismos muito poderosos no que toca a manipulação de conhecimento. Estas oferecem uma boa solução para trocar, armazenar, procurar e inferir grandes volumes de informação. Ao longo dos anos, várias soluções para sistemas baseados em conhecimento usaram ontologias como uma parte central do sistema. A OntoDL é uma Linguagem de Domínio Específico que foi desenvolvida através do uso de ANTLR4, para permitir a especificação de ontologias. Esta linguagem foi já utilizada por especialistas de diversas áreas como forma de utilizar soluções informáticas para resolver os seus problemas. Nesta tese, incluída no segundo ano do Mestrado em Engenharia Informática, OntoDL+ foi criado como uma expansão tanto à linguagem e como ao seu compilador. A linguagem foi extendida para melhorar a usabilidade e produtividade dos seus utilizadores, mantendo se fácil de aprender e perceber. O compilador foi expandido para ser capaz de traduzir as especificações de OntoDL+ para um leque de linguagens mais vasto, aumentando os potenciais usos da DSL através das funcionalidades providenciadas pelas linguagens alvo. O compilador e alguns exemplos da DSL podem ser acedidos no sítio https://epl.di. uminho.pt/∼gepl/GEPL DS/OntoDL/ criado para a aplicação e mostrado nos capítulos finais da tese

    Search-based Model-driven Loop Optimizations for Tensor Contractions

    Get PDF
    Complex tensor contraction expressions arise in accurate electronic structure models in quantum chemistry, such as the coupled cluster method. The Tensor Contraction Engine (TCE) is a high-level program synthesis system that facilitates the generation of high-performance parallel programs from tensor contraction equations. We are developing a new software infrastructure for the TCE that is designed to allow experimentation with optimization algorithms for modern computing platforms, including for heterogeneous architectures employing general-purpose graphics processing units (GPGPUs). In this dissertation, we present improvements and extensions to the loop fusion optimization algorithm, which can be used with cost models, e.g., for minimizing memory usage or for minimizing data movement costs under a memory constraint. We show that our data structure and pruning improvements to the loop fusion algorithm result in significant performance improvements that enable complex cost models being use for large input equations. We also present an algorithm for optimizing the fused loop structure of handwritten code. It determines the regions in handwritten code that are safe to be optimized and then runs the loop fusion algorithm on the dependency graph of the code. Finally, we develop an optimization framework for generating GPGPU code consisting of loop fusion optimization with a novel cost model, tiling optimization, and layout optimization. Depending on the memory available on the GPGPU and the sizes of the tensors, our framework decides which processor (CPU or GPGPU) should perform an operation and where the result should be moved. We present extensive measurements for tuning the loop fusion algorithm, for validating our optimization framework, and for measuring the performance characteristics of GPGPUs. Our measurements demonstrate that our optimization framework outperforms existing general-purpose optimization approaches both on multi-core CPUs and on GPGPUs

    Design and optimisation of scientific programs in a categorical language

    Get PDF
    This thesis presents an investigation into the use of advanced computer languages for scientific computing, an examination of performance issues that arise from using such languages for such a task, and a step toward achieving portable performance from compilers by attacking these problems in a way that compensates for the complexity of and differences between modern computer architectures. The language employed is Aldor, a functional language from computer algebra, and the scientific computing area is a subset of the family of iterative linear equation solvers applied to sparse systems. The linear equation solvers that are considered have much common structure, and this is factored out and represented explicitly in the lan-guage as a framework, by means of categories and domains. The flexibility introduced by decomposing the algorithms and the objects they act on into separate modules has a strong performance impact due to its negative effect on temporal locality. This necessi-tates breaking the barriers between modules to perform cross-component optimisation. In this instance the task reduces to one of collective loop fusion and array contrac

    A Semantics-Based Approach to Optimizing Unstructured Mesh Abstractions

    Full text link
    Computational scientists are frequently confronted with a choice: implement algorithms using high-level abstractions, such as matrices and mesh entities, for greater programming productivity or code them using low-level language constructs for greater execution efficiency. We have observed that the cost of implementing a representative unstructured mesh code with high-level abstractions is poor computational intensity---the ratio of floating point operations to memory accesses. Related scientific applications frequently produce little ``science per cycle'' because their abstractions both introduce additional overhead and hinder compiler analysis and subsequent optimization. Our work exploits the semantics of abstractions, as employed in unstructured mesh codes, to overcome these limitations and to guide a series of manual, domain-specific optimizations that significantly improve computational intensity. We propose a framework for the automation of such high-level optimizations within the ROSE source-to-source compiler infrastructure. The specification of optimizations is left to domain experts and library writers who best understand the semantics of their applications and libraries and who are thus best poised to describe their optimization. Our source-to-source approach translates different constructs (e.g., C code written in a procedural style or C++ code written in an object-oriented style) to a procedural form in order to simplify the specification of optimizations. This is accomplished through raising operators, which are specified by a domain expert and are used to project a concrete application from an implementation space to an abstraction space, where optimizations are applied. The transformed code in the abstraction space is then reified as a concrete implementation via lowering operators, which are automatically inferred by inverting the raising operators. Applying optimizations within the abstraction space, rather than the implementation space, leads to greater optimization portability. We use this framework to automate two high-level optimizations. The first uses an inspector/executor approach to avoid costly and redundant traversals of a static mesh by memoizing the relatively few references required to perform the mathematical computations. During the executor phase, the stored entities are accessed directly without resort to the indirection inherent in the original traversal. The second optimization lowers an object-oriented mesh framework, which uses C++ objects to access the mesh and iterate over mesh entities, to a low-level implementation, which uses integer-based access and iteration.Support was provided by a DOE High-Performance Computer Science Fellowship administered by The Krell Institute, Ames, IA

    A type-based prototype compiler for telescoping languages

    Get PDF
    Scientists want to encode their applications in domain languages with high-level operators that reflect the way they conceptualize computations in their domains. Telescoping languages calls for automatically generating optimizing compilers for these languages by pre-compiling the underlying libraries that define them to generate multiple variants optimized for use in different possible contexts, including different argument types. The resulting compiler replaces calls to the high-level constructs with calls to the optimized variants. This approach aims to automatically derive high-performance executables from programs written in high-level domain-specific languages. TeleGen is a prototype telescoping-languages compiler that performs type-based specializations. For the purposes of this dissertation, types include any set of variable properties such as intrinsic type, size and array sparsity pattern. Type inference and specialization are cornerstones of the telescoping-languages strategy. Because optimization of library routines must occur before their full calling contexts are available, type inference gives critical information needed to determine which specialized variants to generate as well as how to best optimize each variant to achieve the highest performance. To build the prototype compiler, we developed a precise type-inference algorithm that infers all legal type tuples, or type configurations, for the program variables, including routine arguments, for all legal calling contexts. We use the type information inferred by our algorithm to drive specialization and optimization. We demonstrate the practical value of our type-inference algorithm and the type-based specialization strategy in TeleGen
    corecore