Results 1  10
of
26
Multivariate Amortized Resource Analysis
, 2010
"... We study the problem of automatically analyzing the worstcase resource usage of procedures with several arguments. Existing automatic analyses based on amortization, or sized types bound the resource usage or result size of such a procedure by a sum of unary functions of the sizes of the arguments. ..."
Abstract

Cited by 47 (8 self)
 Add to MetaCart
(Show Context)
We study the problem of automatically analyzing the worstcase resource usage of procedures with several arguments. Existing automatic analyses based on amortization, or sized types bound the resource usage or result size of such a procedure by a sum of unary functions of the sizes of the arguments. In this paper we generalize this to arbitrary multivariate polynomial functions thus allowing bounds of the form mn which had to be grossly overestimated by m 2 + n 2 before. Our framework even encompasses bounds like ∑ i,j≤n mimj where the mi are the sizes of the entries of a list of length n. This allows us for the first time to derive useful resource bounds for operations on matrices that are represented as lists of lists and to considerably improve bounds on other superlinear operations on lists such as longest common subsequence and removal of duplicates from lists of lists. Furthermore, resource bounds are now closed under composition which improves accuracy of the analysis of composed programs when some or all of the components exhibit superlinear resource or size behavior. The analysis is based on a novel multivariate amortized resource analysis. We present it in form of a type system for a simple firstorder functional language with lists and trees, prove soundness, and describe automatic type inference based on linear programming. We have experimentally validated the automatic analysis on a wide range of examples from functional programming with lists and trees. The obtained bounds were compared with actual resource consumption. All bounds were asymptotically tight, and the constants were close or even identical to the optimal ones.
Static Determination of Quantitative Resource Usage for HigherOrder Programs
 IN: 37TH ACM SYMP. ON PRINCIPLES OF PROG. LANGS
, 2010
"... We describe a new automatic static analysis for determining upperbound functions on the use of quantitative resources for strict, higherorder, polymorphic, recursive programs dealing with possiblyaliased data. Our analysis is a variant of Tarjan’s manual amortised cost analysis technique. We use ..."
Abstract

Cited by 25 (5 self)
 Add to MetaCart
(Show Context)
We describe a new automatic static analysis for determining upperbound functions on the use of quantitative resources for strict, higherorder, polymorphic, recursive programs dealing with possiblyaliased data. Our analysis is a variant of Tarjan’s manual amortised cost analysis technique. We use a typebased approach, exploiting linearity to allow inference, and place a new emphasis on the number of references to a data object. The bounds we infer depend on the sizes of the various inputs to a program. They thus expose the impact of specific inputs on the overall cost behaviour. The key novel aspect of our work is that it deals directly with polymorphic higherorder functions without requiring sourcelevel transformations that could alter resource usage. We thus obtain safe and accurate compiletime bounds. Our work is generic in that it deals with a variety of quantitative resources. We illustrate our approach with reference to dynamic memory allocations/deallocations, stack usage, and worstcase execution time, using metrics taken from a real implementation on a simple microcontroller platform that is used in safetycritical automotive applications.
Amortised resource analysis with separation logic
 IN EUROPEAN SYMPOSIUM ON PROGRAMMING (ESOP
, 2010
"... Typebased amortised resource analysis following Hofmann and Jost—where resources are associated with individual elements of data structures and doled out to the programmer under a linear typing discipline—have been successful in providing concrete resource bounds for functional programs, with good ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
(Show Context)
Typebased amortised resource analysis following Hofmann and Jost—where resources are associated with individual elements of data structures and doled out to the programmer under a linear typing discipline—have been successful in providing concrete resource bounds for functional programs, with good support for inference. In this work we translate the idea of amortised resource analysis to imperative languages by embedding a logic of resources, based on Bunched Implications, within Separation Logic. The Separation Logic component allows us to assert the presence and shape of mutable data structures on the heap, while the resource component allows us to state the resources associated with each member of the structure. We present the logic on a small imperative language with procedures and mutable heap, based on Java bytecode. We have formalised the logic within the Coq proof assistant and extracted a certified verification condition generator. We demonstrate the logic on some examples, including proving termination of inplace list reversal on lists with cyclic tails.
Amortized resource analysis with polymorphic recursion and partial bigstep operational semantics
 In Proc. 8th APLAS, volume 6461 of LNCS
, 2010
"... Abstract. This paper studies the problem of statically determining upper bounds on the resource consumption of firstorder functional programs. A previous work approached the problem with an automatic typebased amortized analysis for polynomial resource bounds. The analysis is parametric in the re ..."
Abstract

Cited by 7 (6 self)
 Add to MetaCart
(Show Context)
Abstract. This paper studies the problem of statically determining upper bounds on the resource consumption of firstorder functional programs. A previous work approached the problem with an automatic typebased amortized analysis for polynomial resource bounds. The analysis is parametric in the resource and can be instantiated to heap space, stack space, or clock cycles. Experiments with a prototype implementation have shown that programs are analyzed efficiently and that the computed bounds exactly match the measured worstcase resource behavior for many functions. This paper describes the inference algorithm that is used in the implementation of the system. It can deal with resourcepolymorphic recursion which is required in the type derivation of many functions. The computation of the bounds is fully automatic if a maximal degree of the polynomials is given. The soundness of the inference is proved with respect to a novel operational semantics for partial evaluations to show that the inferred bounds hold for terminating as well as nonterminating computations. A corollary is that runtime bounds also establish the termination of programs.
A static cost analysis for a higherorder language
 in: PLPV, ACM Press
"... We develop a static complexity analysis for a higherorder functional language with structural list recursion. The complexity of an expression is a pair consisting of a cost and a potential. The former is defined to be the size of the expression’s evaluation derivation in a standard bigstep operat ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
We develop a static complexity analysis for a higherorder functional language with structural list recursion. The complexity of an expression is a pair consisting of a cost and a potential. The former is defined to be the size of the expression’s evaluation derivation in a standard bigstep operational semantics. The latter is a measure of the “future ” cost of using the value of that expression. A translation function ‖· ‖ maps target expressions to complexities. Our main result is the following Soundness Theorem: If t is a term in the target language, then the cost component of ‖t ‖ is an upper bound on the cost of evaluating t. The proof of the Soundness Theorem is formalized in Coq, providing certified upper bounds on the cost of any expression in the target language. Categories and Subject Descriptors F.3.1 [Logics and Mean
Tasklevel analysis for a language with async/finish parallelism
 In LCTES
"... The task level of a program is the maximum number of tasks that can be available (i.e., not finished nor suspended) simultaneously during its execution for any input data. Static knowledge of the task level is of utmost importance for understanding and debugging parallel programs as well as for guid ..."
Abstract

Cited by 5 (5 self)
 Add to MetaCart
(Show Context)
The task level of a program is the maximum number of tasks that can be available (i.e., not finished nor suspended) simultaneously during its execution for any input data. Static knowledge of the task level is of utmost importance for understanding and debugging parallel programs as well as for guiding task schedulers. We present, to the best of our knowledge, the first static analysis which infers safe and precise approximations on the task level for a language with asyncfinish parallelism. In parallel languages, async and finish are basic constructs for, respectively, spawning tasks and waiting until they terminate. They are the core of modern, parallel, distributed languages like X10. Given a (parallel) program, our analysis returns a tasklevel upper bound, i.e., a function on the program’s input arguments that guarantees that the task level of the program will never exceed its value along any execution. Our analysis provides a series of useful (over)approximations, going from the total number of tasks spawned in the execution up to an accurate estimation of the task level.
Interpolationbased height analysis for improving a recurrence solver
 IN DRAFT PROCEEDINGS OF THE 2ND INTERNATIONAL WORKSHOP ON FOUNDATIONAL PRACTICAL ASPECTS OF RESOURCE ANALYSIS (FOPARA 2011). TECHNICAL REPORT SIC08/11. DPTO. DE SISTEMAS INFORMÁTICOS Y COMPUTACIÓN. UNIVERSIDAD COMPLUTENSE DE MADRID
, 2011
"... The COSTA system infers resource consumption bounds from Java bytecode using an internal recurrence solver PUBS. This paper suggests an improvement of the COSTA system, such that it can solve a larger number of recurrences. The idea is to replace one of its static analyses, the ranking function an ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
(Show Context)
The COSTA system infers resource consumption bounds from Java bytecode using an internal recurrence solver PUBS. This paper suggests an improvement of the COSTA system, such that it can solve a larger number of recurrences. The idea is to replace one of its static analyses, the ranking function analysis, by another kind of analysis, height analysis, in such a way that polynomial bounds of any degree may be inferred instead of just linear expressions. The work can be seen as an application of some polynomial interpolation techniques used by some of the authors in prior analyses. Finding a way to choose proper test nodes is the key to the solution presented in this paper.
A On the Inference of Resource Usage Upper and Lower Bounds
"... Cost analysis aims at determining the amount of resources required to run a program in terms of its input data sizes. The most challenging step is to infer the cost of executing the loops in the program. This requires bounding the number of iterations of each loop and finding tight bounds for the co ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
Cost analysis aims at determining the amount of resources required to run a program in terms of its input data sizes. The most challenging step is to infer the cost of executing the loops in the program. This requires bounding the number of iterations of each loop and finding tight bounds for the cost of each of its iterations. This article presents a novel approach to infer upper and lower bounds from cost relations. These relations are an extended form of standard recurrence equations which can be nondeterministic, contain inexact size constraints and have multiple arguments that increase and/or decrease. We propose novel techniques to automatically transform cost relations into worstcase and bestcase deterministic oneargument recurrence relations. The solution of each recursive relation provides a precise upperbound and lowerbound forexecuting a corresponding loop in the program. Importantly, since the approach isdeveloped at the level of the cost equations, our techniques are programming language independent.
Making Resource Analysis Practical for RealTime Java
, 2012
"... For realtime and embedded systems limiting the consumption of time and memory resources is often an important part of the requirements. Being able to predict bounds on the consumption of these resources during the development process of the code can be of great value. Recent research results have a ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
For realtime and embedded systems limiting the consumption of time and memory resources is often an important part of the requirements. Being able to predict bounds on the consumption of these resources during the development process of the code can be of great value. Recent research results have advanced the state of the art of resource consumption analysis. In this paper we present a tool that makes it possible to apply these research results in practice for realtime systems enabling Java developers to analyse loop bounds, bounds on heap size and bounds on stack size. We describe which theoretical additions were needed in order to achieve this. We give an overview of the capabilities of the tool ResAna that is the result of this effort. The tool can not only perform generally applicable analyses, but it also contains a part of the analysis which is dedicated to the developers ’ (realtime) virtual machine, such that the results apply directly to the actual development environment that is used in practice.
Resource Aware ML
"... Abstract. The automatic determination of the quantitative resource consumption of programs is a classic research topic which has many applications in software development. Recently, we developed a novel multivariate amortized resource analysis that automatically computes polynomial resource bounds f ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
(Show Context)
Abstract. The automatic determination of the quantitative resource consumption of programs is a classic research topic which has many applications in software development. Recently, we developed a novel multivariate amortized resource analysis that automatically computes polynomial resource bounds for firstorder functional programs. In this tool paper, we describe Resource Aware ML (RAML), a functional programming language that implements our analysis. Other than in earlier articles, we focus on the practical aspects of the implementation. We describe the syntax of RAML, the code transformation prior to the analysis, the web interface, the output of the analysis, and the results of our experiments with the analysis of examples programs. This is the first presentation of the prototype implementation at a conference.