- Research Article
- 10.1016/j.entcs.2004.11.021
Programmable Rewriting Strategies in Haskell: — White Paper —
- Apr 01, 2005
- Electronic Notes in Theoretical Computer Science
- Ralf Lämmel
Programmable Rewriting Strategies in Haskell: — White Paper —
A two-level data transformation consists of a type-level transformation of a data format coupled with value-level transformations of data instances corresponding to that format. Examples of two-level data transformations include XML schema evolution coupled with document migration, and data mappings used for interoperability and persistence. We provide a formal treatment of two-level data transformations that is type-safe in the sense that the well-formedness of the value-level transformations with respect to the type-level transformation is guarded by a strong type system. We rely on various techniques for generic functional programming to implement the formalization in Haskell. The formalization addresses various two-level transformation scenarios, covering fully automated as well as user-driven transformations, and allowing transformations that are information-preserving or not. In each case, two-level transformations are disciplined by one-step transformation rules and type-level transformations induce value-level transformations. We demonstrate an example hierarchical-relational mapping and subsequent migration of relational data induced by hierarchical format evolution.
Programmable Rewriting Strategies in Haskell: — White Paper —
Programmable Rewriting Strategies in Haskell: — White Paper —
PolyMigrate: Dynamic Schema Evolution and Data Migration in a Distributed Polystore
In the last years, polystore databases have been proposed to cope with the challenges stemming from increasingly dynamic and heterogeneous workloads. A polystore database provides a logical schema to the application, but materializes data in different data stores, different data models, and different physical schemas. When the access pattern to data changes, the polystore can decide to migrate data from one store to the other or from one data model to another. This necessitates a schema evolution in one or several data stores and the subsequent migration of data. Similarly, when applications change, the global schema might have to be changed as well, with similar consequences on local data stores in terms of schema evolution and data migration. However, the aspect of schema evolution in a polystore database has so far largely been neglected. In this paper, we present the challenges imposed by schema evolution and data migration in Polypheny-DB, a distributed polystore database. With our work-in-progress approach called PolyMigrate, we show how schema evolution and data migration affect the different layers of a distributed polystore and we identify different approaches to effectively and efficiently propagate these changes to the underlying stores.
Read moreThe Implementation of iData
The iData Toolkit is a toolkit that allows programmers to create interactive, type-safe, dynamic web applications with state on a high level of abstraction. The key element of this toolkit is the iData element. An iData element is a form that is generated automatically from a type definition and that can be plugged in in the web page of a web application. In this paper we show how this automatic generation of forms has been implemented. The technique relies essentially on generic programming. It has resulted in a concise and flexible implementation. The kernel of the implementation can be reused for any graphical package. The iData Toolkit is an excellent demonstration of the expressive power of modern generic (poly-typical) programming techniques.
Read moreMeta data management
By meta data management, we mean techniques for manipulating schemas and schema-like objects (such as interface definitions and web site maps) and mappings between them. Work on meta data problems goes back to at least the early 1970s, when data translation was the hot database research topic, even before relational databases caught on. Many popular research problems in the past five years are primarily meta data problems, such as data warehouse tools (e.g., ETL – to extract, transform and load), data integration, the semantic web, generation of XML or object-oriented wrappers for SQL databases, and generation of wrappers for web sites. Other classical meta data problems are information resource management, design tool support and integration, and schema evolution and data migration. Despite its longevity and continued importance, there is no widely-accepted conceptual framework for the meta data field, as there is for many other database topics, such as access methods, query processing, and transaction management. In this seminar, we propose such a conceptual framework. It consists of three layers: applications, design patterns, and basic operators. Applications are the end-user problems to be solved, like those listed in the previous paragraph. Design patterns are generic problems that need to be solved in support of many different applications, such as meta modeling (for all meta data problems), answering queries using views (for data integration and the semantic web), and change propagation (for data translation, schema evolution, and round-trip engineering). Basic operators are procedures that are needed to support multiple design patterns and applications, such as matching schemas to produce a mapping, merging schemas based on a mapping, and composing mappings. We will describe several meta data management problems, and for each, we will explain the design patterns and operators that are needed to solve it. We will summarize the main approaches to each design pattern and operator – the main choices of language, data structures, and algorithms – and will highlight the relevant papers that address it. This seminar is targeted at both practicing engineers and researchers. The former will learn about the latest solutions to important meta data problems and the many difficult unsolved problems that are best to avoid. Database researchers, especially professors, will benefit from considering the conceptual framework that we propose, since no database textbooks treat meta data management as a separate topic as far as we know.
Read moreScrap your boilerplate with XPath-like combinators
XML programming involves idioms for expressing 'structure shyness' such as the descendant axis of XPath or the default templates of XSLT. We initiate a discussion of the relationships between such XML idioms and generic functional programming, while focusing on the (Haskell-based) 'Scrap your boilerplate' style of generic programming (SYB). This work gives insight into mechanisms for traversal and selection. We compare SYB and XSLT. We approximate XPath in SYB. We make a case for SYB's programmability, when compared to XPath's fixed combinators. We allude to strengthened type checking for SYB traversals so as to reject certain, trivial behaviors.
Read moreGeneric functional programming with types and relations
A generic functional program is one which is parameterised by datatype. By installing specific choices, for example lists or trees, different programs are obtained that are, nevertheless, abstractly the same. The purpose of this paper is to explore the possibility of deriving generic programs. Part of the theory of lists that deals with segments is recast as a theory about ‘segments’ in a wide class of datatypes, and then used to pose and solve a generic version of a well-known problem.
Read moreThe OKS persistent in-memory object manager
The OKS (Object Kernel Support) is a library to support a simple, active persistent in-memory object manager. It is suitable for applications which need to create persistent structured information with fast access but do not require full database functionality. It can be used as the frame of configuration databases and real-time object managers for Data Acquisition and Detector Control Systems in such fields as setup, diagnostics and general configuration description. OKS is based on an object model that supports objects, classes, associations, methods, inheritance, polymorphism, object identifiers, composite objects, integrity constraints, schema evolution, data migration and active notification. OKS stores the class definitions and their instances in portable ASCII files. It provides query facilities, including indices support. The OKS has a C++ API (Application Program Interface) and includes Motif based GUI applications to design class schema and to manipulate objects. OKS has been developed on top of the Rogue Wave Tools h++ C++ class library.
Read moreA stabilized assumed deformation gradient finite element formulation for strongly coupled poromechanical simulations at finite strain
SUMMARYAn adaptively stabilized finite element scheme is proposed for a strongly coupled hydro‐mechanical problem in fluid‐infiltrating porous solids at finite strain. We first present the derivation of the poromechanics model via mixture theory in large deformation. By exploiting assumed deformation gradient techniques, we develop a numerical procedure capable of simultaneously curing the multiple‐locking phenomena related to shear failure, incompressibility imposed by pore fluid, and/or incompressible solid skeleton and produce solutions that satisfy the inf‐sup condition. The template‐based generic programming and automatic differentiation (AD) techniques used to implement the stabilized model are also highlighted. Finally, numerical examples are given to show the versatility and efficiency of this model. Copyright © 2013 John Wiley & Sons, Ltd.
Read moreA generic and self-optimizing polynomial library
Application of polynomial expressions is an important concept in scientific computing. The here presented implementation of such a polynomial library is designed to be generic and to be easily adoptable to new problems while providing the necessary performance. Generic programming and self optimization techniques are discussed. Examples from different areas of scientific computing conclude the presentation.
Read moreComputational experience with penalty-barrier methods for nonlinear programming
It was recently shown that modified barrier methods are not only theoretically but also computationally superior to classic barrier methods when applied to general nonlinear problems. In this paper, a penalty-barrier function is presented that was designed to overcome particular problems associated with modified log-barrier functions. A quadratic extrapolation of logarithmic terms as well as handling simple bounds separately are utilized. The resulting penalty-barrier method is outlined and compared to previous methods. The conclusion drawn from the computational tests is that the revised method exhibits superior performance on the test set of this study and consequently holds promise as a viable technique for general nonlinear programming.
Read moreGeneralized Lagrange multiplier technique for nonlinear programming
Our aim here is to present numerical methods for solving a general nonlinear programming problem. These methods are based on transformation of a given constrained minimization problem into an unconstrained maximin problem. This transformation is done by using a generalized Lagrange multiplier technique. Such an approach permits us to use Newton's and gradient methods for nonlinear programming. Convergence proofs are provided, and some numerical results are given.
Read moreScience, institutional archives and open access: an overview and a pilot survey on the Italian cancer research institutions
BackgroundThe Open Archive Initiative (OAI) refers to a movement started around the '90s to guarantee free access to scientific information by removing the barriers to research results, especially those related to the ever increasing journal subscription prices. This new paradigm has reshaped the scholarly communication system and is closely connected to the build up of institutional repositories (IRs) conceived to the benefit of scientists and research bodies as a means to keep possession of their own literary production. The IRs are high-value tools which permit authors to gain visibility by enabling rapid access to scientific material (not only publications) thus increasing impact (citation rate) and permitting a multidimensional assessment of research findings.MethodsA survey was conducted in March 2010 to mainly explore the managing system in use for archiving the research finding adopted by the Italian Scientific Institutes for Research, Hospitalization and Health Care (IRCCS) of the oncology area within the Italian National Health Service (Servizio Sanitario Nazionale, SSN). They were asked to respond to a questionnaire intended to collect data about institutional archives, metadata formats and posting of full-text documents. The enquiry concerned also the perceived role of the institutional repository DSpace ISS, built up by the Istituto Superiore di Sanità (ISS) and based on a XML scheme for encoding metadata. Such a repository aims at acting as a unique reference point for the biomedical information produced by the Italian research institutions. An in-depth analysis has also been performed on the collection of information material addressed to patients produced by the institutions surveyed.ResultsThe survey respondents were 6 out of 9. The results reveal the use of different practices and standard among the institutions concerning: the type of documentation collected, the software adopted, the use and format of metadata and the conditions of accessibility to the IRs.ConclusionsThe Italian research institutions in the field of oncology are moving the first steps towards the philosophy of OA. The main effort should be the implementation of common procedures also in order to connect scientific publications to researchers curricula. In this framework, an important effort is represented by the project of ISS aimed to set a common interface able to allow migration of data from partner institutions to the OA compliant repository DSpace ISS.
Read moreHolistic Approach for Design of Minimum Water Networks Using the Mixed Integer Linear Programming (MILP) Technique
Minimum fresh water consumption and wastewater generation in a facility can be achieved when all options for water minimization including source elimination, reduction, reuse/recycle, outsourcing, and regeneration have been considered. This work presents the development of a new generic mixed integer linear programming (MILP) model to holistically minimize fresh water consumption and wastewater generation for systems involving multiple contaminants where the various options for water minimization are simultaneously considered in order to ultimately generate a minimum water utilization network. The MILP model proposed in this work can be used to simultaneously generate the minimum water targets and design the minimum water network for global water-using operations for buildings and industry. This work also includes cases where fresh water concentrations for all contaminants are assumed to be either zero or non-zero. The approach has been successfully implemented in case studies involving an urban building (Sultan Ismail Mosque, UTM) and a manufacturing plant (a chlor-alkali plant).
Read moreModular and generic programming with interpreterlib
Modular monadic semantics (MMS) is a well-known technique for structuring modular denotational semantic definitions. Families of language constructs are independently defined using syntactic functors and semantic algebras that can be combined in a mix-and-match fashion to create complete language definitions. We introduce InterpreterLib, a Haskell library that implements and extends MMS techniques for writing composable analyses. In addition to modular analyses composition, InterpreterLib provides algebra combinators, explicit algebra semantics, preprocessors for boiler plate generation and generic programming techniques adapted to language analysis. The key benefits of these features are reliability, increased code reuse via modularity and the ability to rapidly retarget component analyses.
Read moreTesting a Generic Programming Technique for Computing Implied Volatility with Market Data
Testing a Generic Programming Technique for Computing Implied Volatility with Market Data