75,660 research outputs found
Strong types for relational databases: functional pearl
Haskell's type system with multi-parameter constructor classes and functional dependencies allows static (compile-time) computations to be expressed by logic programming on the level of types. This emergent capability has been exploited for instance to model arbitrary-length tuples (heterogeneous lists), extensible records, functions with variable length argument lists, and (homogenous) lists of statically fixed length (vectors).We explain how type-level programming can be exploited to define a strongly-typed model of relational databases and operations on them. In particular, we present a strongly typed embedding of a significant subset of SQL in Haskell. In this model, meta-data is represented by type-level entities that guard the semantic correctness of database operations at compile time.Apart from the standard relational database operations, such as selection and join, we model functional dependencies (among table attributes), normal forms, and operations for database transformation. We show how functional dependency information can be represented at the type level, and can be transported through operations. This means that type inference statically computes functional dependencies on the result from those on the arguments.Our model shows that Haskell can be used to design and prototype typed languages for designing, programming, and transforming relational databasesFundação para a Ciência e a Tecnologia (FCT) - POSI/ICHS/44304/2002; SFRH/BPD/11609/2002
A Minimal Set of Shannon-type Inequalities for Functional Dependence Structures
The minimal set of Shannon-type inequalities (referred to as elemental
inequalities), plays a central role in determining whether a given inequality
is Shannon-type. Often, there arises a situation where one needs to check
whether a given inequality is a constrained Shannon-type inequality. Another
important application of elemental inequalities is to formulate and compute the
Shannon outer bound for multi-source multi-sink network coding capacity. Under
this formulation, it is the region of feasible source rates subject to the
elemental inequalities and network coding constraints that is of interest.
Hence it is of fundamental interest to identify the redundancies induced
amongst elemental inequalities when given a set of functional dependence
constraints. In this paper, we characterize a minimal set of Shannon-type
inequalities when functional dependence constraints are present.Comment: 5 pagers, accepted ISIT201
Static Analysis of Functional Programs
In this paper, the static analysis of programs in the functional programming language Miranda* is described based on two graph models. A new control-flow graph model of Miranda definitions is presented, and a model with four classes of callgraphs. Standard software metrics are applicable to these models. A Miranda front end for Prometrix, ¿, a tool for the automated analysis of flowgraphs and callgraphs, has been developed. This front end produces the flowgraph and callgraph representations of Miranda programs. Some features of the metric analyser are illustrated with an example program. The tool provides a promising access to standard metrics on functional programs
Supporting process reuse in PROMENADE
Process reuse (the ability to construct new processes by assembling already built ones) and process harvesting (the ability to build generic processes
that may be further reused, from existing ones) are two crucial issues in
process technology. Both activities involve defining a set of mechanisms,
like abstraction, adaptation, composition, etc. which are appropriate to
achieve their goals. In this report, we define a general framework to
process reuse and harvesting that proposes a complete set of mechanisms to
deal with both activities. This general framework is particularized to the
context of a process modelling language to model software processes, called
PROMENADE. A definition of the identified reuse and harvesting mecha-nisms
is proposed in the context of PROMENADE. Finally, two process reuse case
studies which composes various reuse mechanisms are presented.Postprint (published version
- …