36 research outputs found
Light types for polynomial time computation in lambda-calculus
We propose a new type system for lambda-calculus ensuring that well-typed
programs can be executed in polynomial time: Dual light affine logic (DLAL).
DLAL has a simple type language with a linear and an intuitionistic type
arrow, and one modality. It corresponds to a fragment of Light affine logic
(LAL). We show that contrarily to LAL, DLAL ensures good properties on
lambda-terms: subject reduction is satisfied and a well-typed term admits a
polynomial bound on the reduction by any strategy. We establish that as LAL,
DLAL allows to represent all polytime functions. Finally we give a type
inference procedure for propositional DLAL.Comment: 20 pages (including 10 pages of appendix). (revised version; in
particular section 5 has been modified). A short version is to appear in the
proceedings of the conference LICS 2004 (IEEE Computer Society Press
A type system for PSPACE derived from light linear logic
We present a polymorphic type system for lambda calculus ensuring that
well-typed programs can be executed in polynomial space: dual light affine
logic with booleans (DLALB).
To build DLALB we start from DLAL (which has a simple type language with a
linear and an intuitionistic type arrow, as well as one modality) which
characterizes FPTIME functions. In order to extend its expressiveness we add
two boolean constants and a conditional constructor in the same way as with the
system STAB.
We show that the value of a well-typed term can be computed by an alternating
machine in polynomial time, thus such a term represents a program of PSPACE
(given that PSPACE = APTIME).
We also prove that all polynomial space decision functions can be represented
in DLALB.
Therefore DLALB characterizes PSPACE predicates.Comment: In Proceedings DICE 2011, arXiv:1201.034
An Embedding of the BSS Model of Computation in Light Affine Lambda-Calculus
This paper brings together two lines of research: implicit characterization
of complexity classes by Linear Logic (LL) on the one hand, and computation
over an arbitrary ring in the Blum-Shub-Smale (BSS) model on the other. Given a
fixed ring structure K we define an extension of Terui's light affine
lambda-calculus typed in LAL (Light Affine Logic) with a basic type for K. We
show that this calculus captures the polynomial time function class FP(K):
every typed term can be evaluated in polynomial time and conversely every
polynomial time BSS machine over K can be simulated in this calculus.Comment: 11 pages. A preliminary version appeared as Research Report IAC CNR
Roma, N.57 (11/2004), november 200
Loop Quasi-Invariant Chunk Motion by peeling with statement composition
Several techniques for analysis and transformations are used in compilers.
Among them, the peeling of loops for hoisting quasi-invariants can be used to
optimize generated code, or simply ease developers' lives. In this paper, we
introduce a new concept of dependency analysis borrowed from the field of
Implicit Computational Complexity (ICC), allowing to work with composed
statements called Chunks to detect more quasi-invariants. Based on an
optimization idea given on a WHILE language, we provide a transformation method
- reusing ICC concepts and techniques - to compilers. This new analysis
computes an invariance degree for each statement or chunks of statements by
building a new kind of dependency graph, finds the maximum or worst dependency
graph for loops, and recognizes if an entire block is Quasi-Invariant or not.
This block could be an inner loop, and in that case the computational
complexity of the overall program can be decreased. We already implemented a
proof of concept on a toy C parser 1 analysing and transforming the AST
representation. In this paper, we introduce the theory around this concept and
present a prototype analysis pass implemented on LLVM. In a very near future,
we will implement the corresponding transformation and provide benchmarks
comparisons.Comment: In Proceedings DICE-FOPARA 2017, arXiv:1704.0516
Complexity Information Flow in a Multi-threaded Imperative Language
We propose a type system to analyze the time consumed by multi-threaded
imperative programs with a shared global memory, which delineates a class of
safe multi-threaded programs. We demonstrate that a safe multi-threaded program
runs in polynomial time if (i) it is strongly terminating wrt a
non-deterministic scheduling policy or (ii) it terminates wrt a deterministic
and quiet scheduling policy. As a consequence, we also characterize the set of
polynomial time functions. The type system presented is based on the
fundamental notion of data tiering, which is central in implicit computational
complexity. It regulates the information flow in a computation. This aspect is
interesting in that the type system bears a resemblance to typed based
information flow analysis and notions of non-interference. As far as we know,
this is the first characterization by a type system of polynomial time
multi-threaded programs
A feasible algorithm for typing in Elementary Affine Logic
We give a new type inference algorithm for typing lambda-terms in Elementary
Affine Logic (EAL), which is motivated by applications to complexity and
optimal reduction. Following previous references on this topic, the variant of
EAL type system we consider (denoted EAL*) is a variant without sharing and
without polymorphism. Our algorithm improves over the ones already known in
that it offers a better complexity bound: if a simple type derivation for the
term t is given our algorithm performs EAL* type inference in polynomial time.Comment: 20 page
Typing a Core Binary Field Arithmetic in a Light Logic
We design a library for binary field arithmetic and we supply a core API
which is completely developed in DLAL, extended with a fix point formula. Since
DLAL is a restriction of linear logic where only functional programs with
polynomial evaluation cost can be typed, we obtain the core of a functional
programming setting for binary field arithmetic with built-in polynomial
complexity
Memoization for Unary Logic Programming: Characterizing PTIME
We give a characterization of deterministic polynomial time computation based
on an algebraic structure called the resolution semiring, whose elements can be
understood as logic programs or sets of rewriting rules over first-order terms.
More precisely, we study the restriction of this framework to terms (and logic
programs, rewriting rules) using only unary symbols. We prove it is complete
for polynomial time computation, using an encoding of pushdown automata. We
then introduce an algebraic counterpart of the memoization technique in order
to show its PTIME soundness. We finally relate our approach and complexity
results to complexity of logic programming. As an application of our
techniques, we show a PTIME-completeness result for a class of logic
programming queries which use only unary function symbols.Comment: Soumis {\`a} LICS 201
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
Infinitary -Calculi from a Linear Perspective (Long Version)
We introduce a linear infinitary -calculus, called
, in which two exponential modalities are available, the
first one being the usual, finitary one, the other being the only construct
interpreted coinductively. The obtained calculus embeds the infinitary
applicative -calculus and is universal for computations over infinite
strings. What is particularly interesting about , is that
the refinement induced by linear logic allows to restrict both modalities so as
to get calculi which are terminating inductively and productive coinductively.
We exemplify this idea by analysing a fragment of built around
the principles of and . Interestingly, it enjoys
confluence, contrarily to what happens in ordinary infinitary
-calculi