29,388 research outputs found
Compilation of extended recursion in call-by-value functional languages
This paper formalizes and proves correct a compilation scheme for
mutually-recursive definitions in call-by-value functional languages. This
scheme supports a wider range of recursive definitions than previous methods.
We formalize our technique as a translation scheme to a lambda-calculus
featuring in-place update of memory blocks, and prove the translation to be
correct.Comment: 62 pages, uses pi
Data Definitions in the ACL2 Sedan
We present a data definition framework that enables the convenient
specification of data types in ACL2s, the ACL2 Sedan. Our primary motivation
for developing the data definition framework was pedagogical. We were teaching
undergraduate students how to reason about programs using ACL2s and wanted to
provide them with an effective method for defining, testing, and reasoning
about data types in the context of an untyped theorem prover. Our framework is
now routinely used not only for pedagogical purposes, but also by advanced
users.
Our framework concisely supports common data definition patterns, e.g. list
types, map types, and record types. It also provides support for polymorphic
functions. A distinguishing feature of our approach is that we maintain both a
predicative and an enumerative characterization of data definitions.
In this paper we present our data definition framework via a sequence of
examples. We give a complete characterization in terms of tau rules of the
inclusion/exclusion relations a data definition induces, under suitable
restrictions. The data definition framework is a key component of
counterexample generation support in ACL2s, but can be independently used in
ACL2, and is available as a community book.Comment: In Proceedings ACL2 2014, arXiv:1406.123
Beating the Productivity Checker Using Embedded Languages
Some total languages, like Agda and Coq, allow the use of guarded corecursion
to construct infinite values and proofs. Guarded corecursion is a form of
recursion in which arbitrary recursive calls are allowed, as long as they are
guarded by a coinductive constructor. Guardedness ensures that programs are
productive, i.e. that every finite prefix of an infinite value can be computed
in finite time. However, many productive programs are not guarded, and it can
be nontrivial to put them in guarded form.
This paper gives a method for turning a productive program into a guarded
program. The method amounts to defining a problem-specific language as a data
type, writing the program in the problem-specific language, and writing a
guarded interpreter for this language.Comment: In Proceedings PAR 2010, arXiv:1012.455
Inductive-data-type Systems
In a previous work ("Abstract Data Type Systems", TCS 173(2), 1997), the last
two authors presented a combined language made of a (strongly normalizing)
algebraic rewrite system and a typed lambda-calculus enriched by
pattern-matching definitions following a certain format, called the "General
Schema", which generalizes the usual recursor definitions for natural numbers
and similar "basic inductive types". This combined language was shown to be
strongly normalizing. The purpose of this paper is to reformulate and extend
the General Schema in order to make it easily extensible, to capture a more
general class of inductive types, called "strictly positive", and to ease the
strong normalization proof of the resulting system. This result provides a
computation model for the combination of an algebraic specification language
based on abstract data types and of a strongly typed functional language with
strictly positive inductive types.Comment: Theoretical Computer Science (2002
Algebraic optimization of recursive queries
Over the past few years, much attention has been paid to deductive databases. They offer a logic-based interface, and allow formulation of complex recursive queries. However, they do not offer appropriate update facilities, and do not support existing applications. To overcome these problems an SQL-like interface is required besides a logic-based interface.\ud
\ud
In the PRISMA project we have developed a tightly-coupled distributed database, on a multiprocessor machine, with two user interfaces: SQL and PRISMAlog. Query optimization is localized in one component: the relational query optimizer. Therefore, we have defined an eXtended Relational Algebra that allows recursive query formulation and can also be used for expressing executable schedules, and we have developed algebraic optimization strategies for recursive queries. In this paper we describe an optimization strategy that rewrites regular (in the context of formal grammars) mutually recursive queries into standard Relational Algebra and transitive closure operations. We also describe how to push selections into the resulting transitive closure operations.\ud
\ud
The reason we focus on algebraic optimization is that, in our opinion, the new generation of advanced database systems will be built starting from existing state-of-the-art relational technology, instead of building a completely new class of systems
The Guarded Lambda-Calculus: Programming and Reasoning with Guarded Recursion for Coinductive Types
We present the guarded lambda-calculus, an extension of the simply typed
lambda-calculus with guarded recursive and coinductive types. The use of
guarded recursive types ensures the productivity of well-typed programs.
Guarded recursive types may be transformed into coinductive types by a
type-former inspired by modal logic and Atkey-McBride clock quantification,
allowing the typing of acausal functions. We give a call-by-name operational
semantics for the calculus, and define adequate denotational semantics in the
topos of trees. The adequacy proof entails that the evaluation of a program
always terminates. We introduce a program logic with L\"ob induction for
reasoning about the contextual equivalence of programs. We demonstrate the
expressiveness of the calculus by showing the definability of solutions to
Rutten's behavioural differential equations.Comment: Accepted to Logical Methods in Computer Science special issue on the
18th International Conference on Foundations of Software Science and
Computation Structures (FoSSaCS 2015
- …