5 research outputs found
Injecting Abstract Interpretations into Linear Cost Models
We present a semantics based framework for analysing the quantitative
behaviour of programs with regard to resource usage. We start from an
operational semantics equipped with costs. The dioid structure of the set of
costs allows for defining the quantitative semantics as a linear operator. We
then present an abstraction technique inspired from abstract interpretation in
order to effectively compute global cost information from the program.
Abstraction has to take two distinct notions of order into account: the order
on costs and the order on states. We show that our abstraction technique
provides a correct approximation of the concrete cost computations
Cost analysis of object-oriented bytecode programs
AbstractCost analysis statically approximates the cost of programs in terms of their input data size. This paper presents, to the best of our knowledge, the first approach to the automatic cost analysis of object-oriented bytecode programs. In languages such as Java and C#, analyzing bytecode has a much wider application area than analyzing source code since the latter is often not available. Cost analysis in this context has to consider, among others, dynamic dispatch, jumps, the operand stack, and the heap. Our method takes a bytecode program and a cost model specifying the resource of interest, and generates cost relations which approximate the execution cost of the program with respect to such resource. We report on COSTA, an implementation for Java bytecode which can obtain upper bounds on cost for a large class of programs and complexity classes. Our basic techniques can be directly applied to infer cost relations for other object-oriented imperative languages, not necessarily in bytecode form
Long-Run Cost Analysis by Approximation of Linear Operators over Dioids
We present a static analysis technique for modeling and approxi- mating the long-run resource usage of programs. The approach is based on a quantitative semantic framework where programs are represented as linear op- erators over dioids. We show how to extract the long-run cost of a program from the matrix representation of its semantics. An essential contribution is to provide abstraction techniques which make it feasible to compute safe over- approximations of this cost. A theorem is proved stating that such abstractions yield correct approximations of the program's long-run cost. The theoretical developments are illustrated on a concrete example taken from the analysis of the cache behaviour of a simple bytecode language
Long-Run Cost Analysis by Approximation of Linear Operators over Dioids
International audienceIn this paper we present a semantics-based framework for analysing the quantitative behaviour of programs with respect to resource usage. We start from an operational semantics in which costs are modelled using a dioid structure. The dioid structure of costs allows the definition of the quantitative semantics as a linear operator. We then develop a theory of approximation of such a semantics, which is akin to what is offered by the theory of abstract interpretation for analysing qualitative properties, in order to compute effectively global cost information from the program. We focus on the notion of long-run cost, which models the asymptotic average cost of a program. The abstraction of the semantics has to take two distinct notions of order into account: the order on costs and the order on states. We prove that our abstraction technique provides a correct approximation of the concrete long-run cost of a program