29 research outputs found
SCT and the idempotence condition
5 pagesThese notes show how to get rid of the idempotence condition (G=G;G) in (delta)-Size Change Termination
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
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
Quasi-interpretations a way to control resources
International audienceThis paper presents in a reasoned way our works on resource analysis by quasi- interpretations. The controlled resources are typically the runtime, the runspace or the size of a result in a program execution. Quasi-interpretations allow analyzing system complexity. A quasi-interpretation is a numerical assignment, which provides an upper bound on computed func- tions and which is compatible with the program operational semantics. Quasi- interpretation method offers several advantages: (i) It provides hints in order to optimize an execution, (ii) it gives resource certificates, and (iii) finding quasi- interpretations is decidable for a broad class which is relevant for feasible com- putations. By combining the quasi-interpretation method with termination tools (here term orderings), we obtained several characterizations of complexity classes starting from Ptime and Pspace
Study of the NP-completeness of the compact table problem
ISBN 978-5-94057-377-7International audienceThe problem of compact tables is to maximise the overlap when building a word that is to include permutations of every given words (all the words being the same length). This problem is shown to be NP-complete in the general case, and some specific restrictions are studied
Computability in the lattice of equivalence relations
We investigate computability in the lattice of equivalence relations on the
natural numbers. We mostly investigate whether the subsets of appropriately
defined subrecursive equivalence relations -for example the set of all
polynomial-time decidable equivalence relations- form sublattices of the
lattice.Comment: In Proceedings DICE-FOPARA 2017, arXiv:1704.0516
Chains, Antichains, and Complements in Infinite Partition Lattices
We consider the partition lattice on any set of transfinite
cardinality and properties of whose analogues do not hold
for finite cardinalities. Assuming the Axiom of Choice we prove: (I) the
cardinality of any maximal well-ordered chain is always exactly ; (II)
there are maximal chains in of cardinality ; (III) if,
for every cardinal , we have , there
exists a maximal chain of cardinality (but ) in
; (IV) every non-trivial maximal antichain in has
cardinality between and , and these bounds are realized.
Moreover we can construct maximal antichains of cardinality for any ; (V) all cardinals of the form
with occur as the number of
complements to some partition , and only these
cardinalities appear. Moreover, we give a direct formula for the number of
complements to a given partition; (VI) Under the Generalized Continuum
Hypothesis, the cardinalities of maximal chains, maximal antichains, and
numbers of complements are fully determined, and we provide a complete
characterization.Comment: 24 pages, 2 figures. Submitted to Algebra Universalis on 27/11/201
Synthesis of Quasi-interpretations
This paper presents complexity results by showing that the synthesis of MaxPoly quasi-interpretations over reals is decidable in exponential time with fixed polynomial degrees and fixed max-degree and that the synthesis ofMaxPlus quasi-interpretations over reals is NPtime-complete with fixed multiplicative degrees and fixed max-degree. Quasi-interpretations are a tool that allows to control resources like the runtime, the runspace or the size of a result in a program execution. Quasi-interpretations assign to each program symbol a numerical function which is compatible with the computational semantics and roughly speaking provide an upper bound on sizes of intermediate values computed
Resource Control Graphs
International audienceResource Control Graphs can be seen as an abstract representation of programs. Each state of the program is abstracted as its size, and each instruction is abstracted as the effects it has on the size whenever it is executed. The Control Flow Graph of the programs gives indications on how the instructions might be combined during an execution. Termination proofs usually work by finding a decrease in some well-founded order. Here, the sizes of states are ordered and such kind of decrease is also found. This allows to build termination proofs similar to the ones in Size Change Termination. But the size of states can also be used to represent the space used by the program at each point. This leads to an alternate characterisation of the Non Size Increasing programs, that is the ones that can compute without allocating new memory. This new tool is able to encompass several existing analysis and similarities with other studies hint that even more analysis might be expressable in this framework thus giving hopes for a generic tool for studying programs