38 research outputs found

    A Tensor Library for Scientific Computing

    Get PDF
    The majority of physical phenomena and their computational simulations are described mathematically in terms of tensors and their different algebraic operations. Possibly the most used tensors are the ones of rank 1 and 2, which correspond to the algebraic concepts of vectors and matrices, respectively. Nevertheless, higher rank tensors (specially 3 and 4) appear at all times in different branches of physics and in numerical methods. One of the major drawbacks of high performance computing is that the code necessary to perform such tensor operations looks different and it is several lines longer than the corresponding one-line mathematical representation. Here we present a C++ tensor library, called LTensor, that we have developed using modern concepts of object oriented design and expression templates. As it will be shown, the LTensor library is able to mimic the classical indicial notation and follows Einstein convention about indices. Furthermore, it has other additional features than distinguish it from other libraries based on similar concepts: dynamic dimension size, arbitrary contraction order, customizable storage, inherited class structure, arbitrary looping positions on indicial notations, etc.Fil: Limache, Alejandro Cesar. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Santa Fe. Instituto de Desarrollo Tecnológico para la Industria Química. Universidad Nacional del Litoral. Instituto de Desarrollo Tecnológico para la Industria Química; ArgentinaFil: Rojas Fredini, Pablo Sebastián. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - Santa Fe. Instituto de Desarrollo Tecnológico para la Industria Química. Universidad Nacional del Litoral. Instituto de Desarrollo Tecnológico para la Industria Química; Argentin

    Implementing the mathematical model of the throughput of compressor station aggregates

    Get PDF
    The main aim of the European union energy policy is to ensure a continuous supply of natural gas for the member states. The Russian gas is transported through the Belarus, Ukraine, Slovakia (SR) and Czech Republic to Germany. This article shortly describes the transit system of Slovakia and compressor station KS1 – Vel'ké Kapušany. The throughput of this compressor station plays an important role in gas transport, because this station is the entry to the transit system of SR. To find the best combination of the aggregates used in gas transport a simulation algorithm was devised. We present the architecture of this simulation software together with the description of its development phases. The software was evaluated against data gained from the KS1 compressor station operation. The combinations of aggregates were found as dependent on inlet pressure, ambient temperature and compression ratio

    AOP++: A Generic Aspect-Oriented Programming Framework in C++

    Full text link
    Abstract. This paper presents AOP++, a generic aspect-oriented pro-gramming framework in C++. It successfully incorporates AOP with object-oriented programming as well as generic programming naturally in the framework of standard C++. It innovatively makes use of C++ templates to express pointcut expressions and match join points at com-pile time. It innovatively creates a full-fledged aspect weaver by using template metaprogramming techniques to perform aspect weaving. It is notable that AOP++ itself is written completely in standard C++, and requires no language extensions. With the help of AOP++, C++ programmers can facilitate AOP with only a little effort.

    Doctor of Philosophy

    Get PDF
    dissertationDomain-specific languages (DSLs) are increasingly popular, and there are a variety of ways to create a DSL. A DSL designer might write an interpreter from scratch, compile the DSL to another language, express DSL concepts using only the existing forms of an existing language, or implement DSL constructs using a language's extension capabilities, including macros. While extensible languages can offer the easiest opportunity for creating a DSL that takes advantage of the language's existing infrastructure, existing tools for debugging fail to adequately adapt the debugging experience to a given domain. This dissertation addresses the problem of debugging DSLs defined with macros and describes an event-oriented approach that works well with a macro-expansion view of language implementation. It pairs the mapping of DSL terms to host terms with an event mapping to convert primitive events back to domain-specific concepts. Domain-specific events can be further inspected or manipulated to construct domain-specific debuggers. This dissertation presents a core model of evaluation and events and also presents a language design-analogous to pattern-based notations for macros, but in the other direction-for describing how events in a DSL's expansion are mapped to events at the DSL's level. The domain-specific events can enable useful, domain-specific debuggers, and the dissertation introduces a design for a debugging framework to help with debugger construction. To validate the design of the debugging framework, a debugging framework, Ripple, is implemented, and this dissertation demonstrates that with a modest amount of work, Ripple can support building domain-specific debuggers

    Unification of Compile-Time and Runtime Metaprogramming in Scala

    Get PDF
    Metaprogramming is a technique that consists in writing programs that treat other programs as data. This paradigm of software development contributes to a multitude of approaches that improve programmer productivity, including code generation, program analysis and domain-specific languages. Many programming languages and runtime systems provide support for metaprogramming. Programming platforms often distinguish the notions of compile-time and runtime metaprogramming, depending on the phase of the program lifecycle when metaprograms execute. It is common for different lifecycle phases to be hosted in different environ- ments, so it is also common for different kinds of metaprogramming to provide different capabilities to metaprogrammers. In this dissertation, we present an exploration of the idea of unifying compile-time and runtime metaprogramming in Scala. We focus on the practical aspect of the exploration; most of the described designs are available as popular software products, and some of them have become part of the standard distribution of Scala. First, guided by the motivation to consolidate disparate metaprogramming techniques available in earlier versions of Scala, we introduce scala.reflect, a unified metaprogram- ming framework that uses a language model derived from the Scala compiler to run metaprograms both at compile time and at runtime. Secondly, armed by the newfound metaprogramming powers, we describe Scala macros, a language-integrated compile-time metaprogramming facility based on scala.reflect. Thanks to the comprehensive nature of scala.reflect, macros are able to work with both syntactic and semantic information about Scala programs, enabling a wide range of previously impractical or impossible use cases. Finally, based on our experience and user feedback, we identify key strengths and weaknesses of scala.reflect and macros. We propose scala.meta, a new unified metapro- gramming framework, and inline/meta, a new macro system based on scala.meta, that take the best from their predecessors and address the most important problems

    Testing of xtUML Models across Auto-Reflexive Software Architecture

    Get PDF
    Application of MDA in the software development enables a synchronization of the system models and corresponding source files used for the building of the executable version of a software system. Because of often use of manual modifications of some parts of code without equivalent changes in connected models, there is no guarantee that the output of the process of building of the target application will be consistent with the relevant design and implementation models. Possibility of generating of the source files from the models is a necessity, but not a sufficient condition in the process of development and modification of software systems synchronously with the changes in all related models.  More safe approach is building the target application with the use of an automated building process with nested steps for consistency verifications of all critical models and related source files and the usage of model compilers. This article describes the method and tools for extending the software process of building the target system using special files with specification of dependencies between models and source files. Such dependencies represent the core of the critical knowledge, and it is possible to make this knowledge an integral part of the proposed new software architecture

    Implementing the Factory Pattern with the Help of Reflection

    Get PDF
    Reflection, reflection-based programming and metaprogramming are valuable tools for many programming tasks, like the implementation of persistence and serialization-like operations, object-relational mapping, remote method invocation, automatic generation of user-interfaces, etc., and also for the implementation of several design patterns. C++ as one of the most prevalent programming languages still lacks support for standardised, compiler-assisted reflection. In this paper we introduce in short the Mirror reflection library which is a part of an ongoing effort to add reflection to C++ and we will show how reflection can be used to greatly simplify the implementation of object factories - classes constructing instances of other classes from various external data representations
    corecore