29 research outputs found

    SCT and the idempotence condition

    No full text
    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

    Get PDF
    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

    Full text link
    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

    Get PDF
    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

    No full text
    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

    Get PDF
    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

    Full text link
    We consider the partition lattice Πκ\Pi_\kappa on any set of transfinite cardinality κ\kappa and properties of Πκ\Pi_\kappa 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 κ\kappa; (II) there are maximal chains in Πκ\Pi_\kappa of cardinality >κ> \kappa; (III) if, for every cardinal λ<κ\lambda < \kappa, we have 2λ<2κ2^{\lambda} < 2^\kappa, there exists a maximal chain of cardinality <2κ< 2^{\kappa} (but κ\ge \kappa) in Π2κ\Pi_{2^\kappa}; (IV) every non-trivial maximal antichain in Πκ\Pi_\kappa has cardinality between κ\kappa and 2κ2^{\kappa}, and these bounds are realized. Moreover we can construct maximal antichains of cardinality max(κ,2λ)\max(\kappa, 2^{\lambda}) for any λκ\lambda \le \kappa; (V) all cardinals of the form κλ\kappa^\lambda with 0λκ0 \le \lambda \le \kappa occur as the number of complements to some partition PΠκ\mathcal{P} \in \Pi_\kappa, 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

    Get PDF
    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

    No full text
    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
    corecore