Results 1  10
of
33
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.
Parametric Prediction of Heap Memory Requirements
, 2008
"... This work presents a technique to compute symbolic polynomial approximations of the amount of dynamic memory required to safely execute a method without running out of memory, for Javalike imperative programs. We consider object allocations and deallocations made by the method and the methods it tra ..."
Abstract

Cited by 28 (6 self)
 Add to MetaCart
(Show Context)
This work presents a technique to compute symbolic polynomial approximations of the amount of dynamic memory required to safely execute a method without running out of memory, for Javalike imperative programs. We consider object allocations and deallocations made by the method and the methods it transitively calls. More precisely, given an initial configuration of the stack and the heap, the peak memory consumption is the maximum space occupied by newly created objects in all states along a run from it. We overapproximate the peak memory consumption using a scopedmemory management where objects are organized in regions associated with the lifetime of methods. We model the problem of computing the maximum memory occupied by any region configuration as a parametric polynomial optimization problem over a polyhedral domain and resort to Bernstein basis to solve it. We apply the developed tool to several benchmarks.
Qin Analysing memory resource bounds for lowlevel programs
 In ISMM 08
, 2008
"... Embedded systems are becoming more widely used but these systems are often resource constrained. Programming models for these systems should take into formal consideration resources such as stack and heap. In this paper, we show how memory resource bounds can be inferred for assemblylevel programs. ..."
Abstract

Cited by 22 (1 self)
 Add to MetaCart
Embedded systems are becoming more widely used but these systems are often resource constrained. Programming models for these systems should take into formal consideration resources such as stack and heap. In this paper, we show how memory resource bounds can be inferred for assemblylevel programs. Our inference process captures the memory needs of each method in terms of the symbolic values of its parameters. For better precision, we infer pathsensitive information through a novel guarded expression format. Our current proposal relies on a Presburger solver to capture memory requirements symbolically, and to perform fixpoint analysis for loops and recursion. Apart from safety in memory adequacy, our proposal can provide estimate on memory costs for embedded devices and improve performance via fewer runtime checks against memory bound. 1.
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.
Carbon Credits” for ResourceBounded Computations Using Amortised Analysis
 In Formal Methods (FM ’09), LNCS 5850
, 2009
"... Abstract. Bounding resource usage is important for a number of areas, notably realtime embedded systems and safetycritical systems. In this paper, we present a fully automatic static typebased analysis for inferring upper bounds on resource usage for programs involving general algebraic datatypes ..."
Abstract

Cited by 11 (9 self)
 Add to MetaCart
Abstract. Bounding resource usage is important for a number of areas, notably realtime embedded systems and safetycritical systems. In this paper, we present a fully automatic static typebased analysis for inferring upper bounds on resource usage for programs involving general algebraic datatypes and full recursion. Our method can easily be used to bound any countable resource, without needing to revisit proofs. We apply the analysis to the important metrics of worstcase execution time, stack and heapspace usage. Our results from several realistic embedded control applications demonstrate good matches between our inferred bounds and measured worstcase costs for heap and stack usage. For time usage we infer good bounds for one application. Where we obtain less tight bounds, this is due to the use of software floatingpoint libraries. 1
Tracking linear and affine resources with Java(X)
 IN EUROPEAN CONFERENCE ON OBJECTORIENTED PROGRAMMING
, 2007
"... Java(X) is a framework for type refinement. It extends Java’s type language with annotations drawn from an algebra X and structural subtyping in terms of the annotations. Each instantiation of X yields a different refinement type system with guaranteed soundness. The paper presents some application ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
(Show Context)
Java(X) is a framework for type refinement. It extends Java’s type language with annotations drawn from an algebra X and structural subtyping in terms of the annotations. Each instantiation of X yields a different refinement type system with guaranteed soundness. The paper presents some applications, formalizes a core language, states a generic type soundness result, and sketches the extensions required for the full Java language (without generics). The main technical innovation of Java(X) is its concept of activity annotations paired with the notion of droppability. An activity annotation is a capability which can grant exclusive write permission for a field in an object and thus facilitates a typestate change (strong update). Propagation of capabilities is either linear or affine (if they are droppable). Thus, Java(X) can perform protocol checking as well as refinement typing. Aliasing is addressed with a novel splitting relation on types.
Collected Size Semantics for Functional Programs
 Implementation and Application of Functional Languages: 20 th International Workshop, IFL 2008, Hertfordshire
"... Abstract. Size analysis is an important prerequisite for heap consumption analysis. This paper is a part of ongoing work about typing support for checking outputoninput size dependencies for function definitions in a strict functional language. A significant restriction for our earlier results is ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
(Show Context)
Abstract. Size analysis is an important prerequisite for heap consumption analysis. This paper is a part of ongoing work about typing support for checking outputoninput size dependencies for function definitions in a strict functional language. A significant restriction for our earlier results is that inner data structures (e.g. in a list of lists) all must have the same size. Here, we make a big step forwards by overcoming this limitation via the introduction of higherorder size annotations such that variate sizes of inner data structures can be expressed. 1
Finding heapbounds for hardware synthesis
 In FMCAD’09
, 2009
"... Abstract—Dynamically allocated and manipulated data structures cannot be translated into hardware unless there is an upper bound on the amount of memory the program uses during all executions. This bound can depend on the generic parameters to the program, i.e., program inputs that are instantiated ..."
Abstract

Cited by 8 (4 self)
 Add to MetaCart
(Show Context)
Abstract—Dynamically allocated and manipulated data structures cannot be translated into hardware unless there is an upper bound on the amount of memory the program uses during all executions. This bound can depend on the generic parameters to the program, i.e., program inputs that are instantiated at synthesis time. We propose a constraint based method for the discovery of memory usage bounds, which leads to the firstknown Ctogates hardware synthesis supporting programs with nontrivial use of dynamically allocated memory, e.g., linked lists maintained with malloc and free. We illustrate the practicality of our tool on a range of examples. I.
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.
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.