58,419 research outputs found
On the strength of dependent products in the type theory of Martin-L\"of
One may formulate the dependent product types of Martin-L\"of type theory
either in terms of abstraction and application operators like those for the
lambda-calculus; or in terms of introduction and elimination rules like those
for the other constructors of type theory. It is known that the latter rules
are at least as strong as the former: we show that they are in fact strictly
stronger. We also show, in the presence of the identity types, that the
elimination rule for dependent products--which is a "higher-order" inference
rule in the sense of Schroeder-Heister--can be reformulated in a first-order
manner. Finally, we consider the principle of function extensionality in type
theory, which asserts that two elements of a dependent product type which are
pointwise propositionally equal, are themselves propositionally equal. We
demonstrate that the usual formulation of this principle fails to verify a
number of very natural propositional equalities; and suggest an alternative
formulation which rectifies this deficiency.Comment: 18 pages; v2: final journal versio
Nominal Abstraction
Recursive relational specifications are commonly used to describe the
computational structure of formal systems. Recent research in proof theory has
identified two features that facilitate direct, logic-based reasoning about
such descriptions: the interpretation of atomic judgments through recursive
definitions and an encoding of binding constructs via generic judgments.
However, logics encompassing these two features do not currently allow for the
definition of relations that embody dynamic aspects related to binding, a
capability needed in many reasoning tasks. We propose a new relation between
terms called nominal abstraction as a means for overcoming this deficiency. We
incorporate nominal abstraction into a rich logic also including definitions,
generic quantification, induction, and co-induction that we then prove to be
consistent. We present examples to show that this logic can provide elegant
treatments of binding contexts that appear in many proofs, such as those
establishing properties of typing calculi and of arbitrarily cascading
substitutions that play a role in reducibility arguments.Comment: To appear in the Journal of Information and Computatio
Automatic Termination Analysis of Programs Containing Arithmetic Predicates
For logic programs with arithmetic predicates, showing termination is not
easy, since the usual order for the integers is not well-founded. A new method,
easily incorporated in the TermiLog system for automatic termination analysis,
is presented for showing termination in this case.
The method consists of the following steps: First, a finite abstract domain
for representing the range of integers is deduced automatically. Based on this
abstraction, abstract interpretation is applied to the program. The result is a
finite number of atoms abstracting answers to queries which are used to extend
the technique of query-mapping pairs. For each query-mapping pair that is
potentially non-terminating, a bounded (integer-valued) termination function is
guessed. If traversing the pair decreases the value of the termination
function, then termination is established. Simple functions often suffice for
each query-mapping pair, and that gives our approach an edge over the classical
approach of using a single termination function for all loops, which must
inevitably be more complicated and harder to guess automatically. It is worth
noting that the termination of McCarthy's 91 function can be shown
automatically using our method.
In summary, the proposed approach is based on combining a finite abstraction
of the integers with the technique of the query-mapping pairs, and is
essentially capable of dividing a termination proof into several cases, such
that a simple termination function suffices for each case. Consequently, the
whole process of proving termination can be done automatically in the framework
of TermiLog and similar systems.Comment: Appeared also in Electronic Notes in Computer Science vol. 3
Light Logics and the Call-by-Value Lambda Calculus
The so-called light logics have been introduced as logical systems enjoying
quite remarkable normalization properties. Designing a type assignment system
for pure lambda calculus from these logics, however, is problematic. In this
paper we show that shifting from usual call-by-name to call-by-value lambda
calculus allows regaining strong connections with the underlying logic. This
will be done in the context of Elementary Affine Logic (EAL), designing a type
system in natural deduction style assigning EAL formulae to lambda terms.Comment: 28 page
TreatJS: Higher-Order Contracts for JavaScript
TreatJS is a language embedded, higher-order contract system for JavaScript
which enforces contracts by run-time monitoring. Beyond providing the standard
abstractions for building higher-order contracts (base, function, and object
contracts), TreatJS's novel contributions are its guarantee of non-interfering
contract execution, its systematic approach to blame assignment, its support
for contracts in the style of union and intersection types, and its notion of a
parameterized contract scope, which is the building block for composable
run-time generated contracts that generalize dependent function contracts.
TreatJS is implemented as a library so that all aspects of a contract can be
specified using the full JavaScript language. The library relies on JavaScript
proxies to guarantee full interposition for contracts. It further exploits
JavaScript's reflective features to run contracts in a sandbox environment,
which guarantees that the execution of contract code does not modify the
application state. No source code transformation or change in the JavaScript
run-time system is required.
The impact of contracts on execution speed is evaluated using the Google
Octane benchmark.Comment: Technical Repor
- …