Results 11 
18 of
18
Fixed points of type constructors and primitive recursion
 Computer Science Logic, 18th International Workshop, CSL 2004, 13th Annual Conference of the EACSL, Karpacz, Poland, September 2024, 2004, Proceedings, volume 3210 of Lecture Notes in Computer Science
, 2004
"... Our contribution to CSL 04 [AM04] contains a little error, which is easily corrected by 2 elementary editing steps (replacing one character and deleting another). Definition of wellformed contexts (fifth page). Typing contexts should, in contrast to kinding contexts, only contain type variable decla ..."
Abstract

Cited by 7 (3 self)
 Add to MetaCart
Our contribution to CSL 04 [AM04] contains a little error, which is easily corrected by 2 elementary editing steps (replacing one character and deleting another). Definition of wellformed contexts (fifth page). Typing contexts should, in contrast to kinding contexts, only contain type variable declarations without variance information. Hence, the second rule is too liberal; we must insist on p = ◦. The corrected set of rules is then: ⋄ cxt ∆ cxt ∆, X ◦κ cxt ∆ cxt ∆ ⊢ A: ∗ ∆, x:A cxt Definition of welltyped terms (immediately following). Since wellformed typing contexts ∆ contain no variance information, hence ◦ ∆ = ∆, we might drop the “◦ ” in the instantiation rule (fifth rule). The new set of rules is consequently, (x:A) ∈ ∆ ∆ cxt ∆ ⊢ x: A ∆, X ◦κ ⊢ t: A ∆ ⊢ t: ∀X κ. A ∆, x:A ⊢ t: B ∆ ⊢ λx.t: A → B ∆ ⊢ t: ∀X κ. A ∆ ⊢ F: κ
Generic Operations on Nested Datatypes
, 2001
"... Nested datatypes are a generalisation of the class of regular datatypes, which includes familiar datatypes like trees and lists. They typically represent constraints on the values of regular datatypes and are therefore used to minimise the scope for programmer error. ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
Nested datatypes are a generalisation of the class of regular datatypes, which includes familiar datatypes like trees and lists. They typically represent constraints on the values of regular datatypes and are therefore used to minimise the scope for programmer error.
Simulating Dependent Types with Guarded Algebraic Datatypes
"... Dependent type systems, in which types can depend on values, admit detailed specifications of function behavior and data invariants. Programming languages based on System F do not have dependent types, and are therefore more limited in what structure or function invariants can be encoded in the typ ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Dependent type systems, in which types can depend on values, admit detailed specifications of function behavior and data invariants. Programming languages based on System F do not have dependent types, and are therefore more limited in what structure or function invariants can be encoded in the type system. In this paper, we show how guarded algebraic datatypes can simulate dependent types. We formalize additions to a guardeddatatypesenhanced System F that allow types to depend on values. We discuss the resulting programming style, which is similar to theorem proving. Our technique can be applied to multiple existing programming languages, including Haskell and C#. We also introduce an idiom for eliminating any runtime costs associated with the use of simulated dependent types. We have developed a tool to automatically produce the boilerplate necessary for the simulation, and we have used it to enforce data structure invariants and to allow elision of runtime bounds checks.
Verification of the Redecoration Algorithm for Triangular Matrices
, 2007
"... Abstract. Triangular matrices with a dedicated type for the diagonal elements can be profitably represented by a nested datatype, i. e., a heterogeneous family of inductive datatypes. These families are fully supported since the version 8.1 of the Coq theorem proving environment, released in 2007. R ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Abstract. Triangular matrices with a dedicated type for the diagonal elements can be profitably represented by a nested datatype, i. e., a heterogeneous family of inductive datatypes. These families are fully supported since the version 8.1 of the Coq theorem proving environment, released in 2007. Redecoration of triangular matrices has a succinct implementation in this representation, thus giving the challenge of proving it correct. This has been achieved within Coq, using also induction with measures. An axiomatic approach allowed a verification in the Isabelle theorem prover, giving insights about the differences of both systems. 1
Generic validation in an XPathHaskell data binding
"... An XPath data binding for a given host language provides a translation of XPath expressions to expressions in the host language. This paper discusses an XPathHaskell data binding. XPath validation ensures that a path addresses a possibly nonempty set of nodes in XML documents described by an XML Sch ..."
Abstract
 Add to MetaCart
An XPath data binding for a given host language provides a translation of XPath expressions to expressions in the host language. This paper discusses an XPathHaskell data binding. XPath validation ensures that a path addresses a possibly nonempty set of nodes in XML documents described by an XML Schema. We present a generic function (defined by induction on the type structure) that validates XPath expressions with respect to an XML Schema. We use Generic Haskell, an extension of Haskell that supports the construction of generic programs. Furthermore we present generic programs that use a valid XPath expression to query and update documents in a typed way.
Theoretical Foundations for Practical ‘Totally Functional Programming’
, 2007
"... Interpretation is an implicit part of today’s programming; it has great power but is overused and has
significant costs. For example, interpreters are typically significantly hard to understand and hard
to reason about. The methodology of “Totally Functional Programming” (TFP) is a reasoned
attempt ..."
Abstract
 Add to MetaCart
Interpretation is an implicit part of today’s programming; it has great power but is overused and has
significant costs. For example, interpreters are typically significantly hard to understand and hard
to reason about. The methodology of “Totally Functional Programming” (TFP) is a reasoned
attempt to redress the problem of interpretation. It incorporates an awareness of the undesirability
of interpretation with observations that definitions and a certain style of programming appear to
offer alternatives to it. Application of TFP is expected to lead to a number of significant outcomes,
theoretical as well as practical. Primary among these are novel programming languages to lessen or
eliminate the use of interpretation in programming, leading to betterquality software. However,
TFP contains a number of lacunae in its current formulation, which hinder development of these
outcomes. Among others, formal semantics and typesystems for TFP languages are yet to be
discovered, the means to reduce interpretation in programs is to be determined, and a detailed
explication is needed of interpretation, definition, and the differences between the two. Most
important of all however is the need to develop a complete understanding of the nature of
interpretation. In this work, suitable typesystems for TFP languages are identified, and guidance
given regarding the construction of appropriate formal semantics. Techniques, based around the
‘fold’ operator, are identified and developed for modifying programs so as to reduce the amount of
interpretation they contain. Interpretation as a means of languageextension is also investigated.
v
Finally, the nature of interpretation is considered. Numerous hypotheses relating to it considered in
detail. Combining the results of those analyses with discoveries from elsewhere in this work leads
to the proposal that interpretation is not, in fact, symbolbased computation, but is in fact something
more fundamental: computation that varies with input. We discuss in detail various implications of
this characterisation, including its practical application. An often moreuseful property, ‘inherent
interpretiveness’, is also motivated and discussed in depth. Overall, our inquiries act to give
conceptual and theoretical foundations for practical TFP.
Haskell Programming with Nested Types: A Principled Approach †
"... Abstract. Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured r ..."
Abstract
 Add to MetaCart
Abstract. Initial algebra semantics is one of the cornerstones of the theory of modern functional programming languages. For each inductive data type, it provides a Church encoding for that type, a build combinator which constructs data of that type, a fold combinator which encapsulates structured recursion over data of that type, and a fold/build rule which optimises modular programs by eliminating from them data constructed using the build combinator, and immediately consumed using the fold combinator, for that type. It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types in Haskell. Specifically, the standard folds derived from initial algebra semantics have been considered too weak to capture commonly occurring patterns of recursion over data of nested types in Haskell, and no build combinators or fold/build rules have until now been defined for nested types. This paper shows that standard folds are, in fact, sufficiently expressive for programming with nested types in Haskell. It also defines build combinators and fold/build fusion rules for nested types. It thus shows how initial algebra semantics provides a principled, expressive, and elegant foundation for programming with nested types in Haskell. 1.