48 research outputs found
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
Quasi-friendly sup-interpretations
In a previous paper, the sup-interpretation method was proposed as a new tool
to control memory resources of first order functional programs with pattern
matching by static analysis. Basically, a sup-interpretation provides an upper
bound on the size of function outputs. In this former work, a criterion, which
can be applied to terminating as well as non-terminating programs, was
developed in order to bound polynomially the stack frame size. In this paper,
we suggest a new criterion which captures more algorithms computing values
polynomially bounded in the size of the inputs. Since this work is related to
quasi-interpretations, we compare the two notions obtaining two main features.
The first one is that, given a program, we have heuristics for finding a
sup-interpretation when we consider polynomials of bounded degree. The other
one consists in the characterizations of the set of function computable in
polynomial time and in polynomial space
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
On Quasi-Interpretations, Blind Abstractions and Implicit Complexity
Quasi-interpretations are a technique to guarantee complexity bounds on
first-order functional programs: with termination orderings they give in
particular a sufficient condition for a program to be executable in polynomial
time, called here the P-criterion. We study properties of the programs
satisfying the P-criterion, in order to better understand its intensional
expressive power. Given a program on binary lists, its blind abstraction is the
nondeterministic program obtained by replacing lists by their lengths (natural
numbers). A program is blindly polynomial if its blind abstraction terminates
in polynomial time. We show that all programs satisfying a variant of the
P-criterion are in fact blindly polynomial. Then we give two extensions of the
P-criterion: one by relaxing the termination ordering condition, and the other
one (the bounded value property) giving a necessary and sufficient condition
for a program to be polynomial time executable, with memoisation.Comment: 18 page
Unbounded Recursion and Non-size-increasing Functions
We investigate the computing power of function algebras defined by means of unbounded recursion on notation. We introduce two function algebras which contain respectively the regressive logspace computable functions and the non-size-increasing logspace computable functions. However, such algebras are unlikely to be contained in the set of logspace computable functions because this is equivalent to L=P . Finally, we introduce a function algebra based on simultaneous recursion on notation for the non-size-increasing functions computable in polynomial time and linear space
Polynomial Time and Dependent Types
We combine dependent types with linear type systems that soundly and
completely capture polynomial time computation. We explore two systems for
capturing polynomial time: one system that disallows construction of iterable
data, and one, based on the LFPL system of Martin Hofmann, that controls
construction via a payment method. Both of these are extended to full dependent
types via Quantitative Type Theory, allowing for arbitrary computation in types
alongside guaranteed polynomial time computation in terms. We prove the
soundness of the systems using a realisability technique due to Dal Lago and
Hofmann.
Our long-term goal is to combine the extensional reasoning of type theory
with intensional reasoning about the resources intrinsically consumed by
programs. This paper is a step along this path, which we hope will lead both to
practical systems for reasoning about programs' resource usage, and to
theoretical use as a form of synthetic computational complexity theory
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
Quantitative Models and Implicit Complexity
We give new proofs of soundness (all representable functions on base types
lies in certain complexity classes) for Elementary Affine Logic, LFPL (a
language for polytime computation close to realistic functional programming
introduced by one of us), Light Affine Logic and Soft Affine Logic. The proofs
are based on a common semantical framework which is merely instantiated in four
different ways. The framework consists of an innovative modification of
realizability which allows us to use resource-bounded computations as realisers
as opposed to including all Turing computable functions as is usually the case
in realizability constructions. For example, all realisers in the model for
LFPL are polynomially bounded computations whence soundness holds by
construction of the model. The work then lies in being able to interpret all
the required constructs in the model. While being the first entirely semantical
proof of polytime soundness for light logi cs, our proof also provides a
notable simplification of the original already semantical proof of polytime
soundness for LFPL. A new result made possible by the semantic framework is the
addition of polymorphism and a modality to LFPL thus allowing for an internal
definition of inductive datatypes.Comment: 29 page