5 research outputs found
Mobile resource guarantees (evaluation paper)
This paper summarises the main outcomes of the Mobile Resource Guarantees (MRG) project, which focused on a proof-carrying-code (PCC) infrastructure for resources to be applied to mobile code. MRG was a three year project funded by the EC under the FET proactive initiative on Global Computing. We give an overview of the projects\u2019 results, discuss the lessons learnt from it and introduce follow-up work in new projects that will build on these results
Estimating the Cost of Native Method Calls for Resource-bounded Functional Programming Languages
AbstractWe address the problem of applying resource-bounded functional programming languages in practice on object-oriented virtual machines which include calls to native methods coded in low-level languages without garbage collection support. We consider the application of a functional language with a high-level type system which incorporates measures of heap space consumption in types on such an execution platform. We supplement the syntactic type inference procedure of the functional language with a separate analysis which estimates the costs of memory leaks incurred by calls to garbage collection-ignorant functions
Automated Amortised Analysis
Steffen Jost researched a novel static program analysis that automatically infers formally guaranteed upper bounds on the use of compositional quantitative resources. The technique is based on the manual amortised complexity analysis. Inference is achieved through a type system
annotated with linear constraints. Any solution to the collected constraints yields the coefficients of a formula, that expresses an upper bound on the resource consumption of a program through the sizes of its various inputs.
The main result is the formal soundness proof of the proposed analysis for a functional language. The strictly evaluated language features higher-order types, full mutual recursion, nested data types, suspension of evaluation, and can deal with aliased data. The presentation focuses on heap space bounds. Extensions allowing the inference of bounds on stack space usage and worst-case execution time
are demonstrated for several realistic program examples. These bounds were inferred by the created generic implementation of the technique. The implementation is highly efficient, and solves even large examples within seconds.Steffen Jost stellt eine neuartige statische Programmanalyse vor, welche vollautomatisch Schranken an den Verbrauch quantitativer Ressourcen berechnet. Die Grundidee basiert auf der Technik der Amortisierten KomplexitĂ€tsanalyse, deren nicht-triviale Automatisierung durch ein erweitertes Typsystem erreicht wird. Das Typsystem berechnet als Nebenprodukt ein lineares Gleichungssystem, dessen Lösungen Koeffizienten fĂŒr lineare Formeln liefern. Diese Formeln stellen garantierte obere Schranken an den Speicher- oder Zeitverbrauch des analysierten Programms dar, in AbhĂ€ngigkeit von den verschiedenen EingabegröĂen des Programms. Die Relevanz der einzelnen EingabegröĂen auf den Ressourcenverbrauch
wird so deutlich beziffert.
Die formale Korrektheit der Analyse wird fĂŒr eine funktionale Programmiersprache bewiesen. Die strikte Sprache erlaubt: Typen höherer Ordnung, volle Rekursion, verschachtelte Datentypen, explizites Aufschieben der Auswertung und Aliasing. Die formale Beschreibung der Analyse befasst sich primĂ€r mit dem Verbrauch von dynamischen Speicherplatz. FĂŒr eine Reihe von realistischen Programmbeispielen wird demonstriert, dass die angefertigte generische Implementation auch gute Schranken an den Verbrauch von Stapelspeicher und der maximalen AusfĂŒhrungszeit ermitteln kann. Die Analyse ist sehr effizient implementierbar, und behandelt auch gröĂere Beispielprogramme vollstĂ€ndig in wenigen Sekunden
Type-based amortized stack memory prediction
Controlling resource usage is important for the reliability, efficiency and security of
software systems. Automated analyses for bounding resource usage can be invaluable
tools for ensuring these properties.
Hofmann and Jost have developed an automated static analysis for finding linear
heap space bounds in terms of the input size for programs in a simple functional programming
language. Memory requirements are amortized by representing them as a
requirement for an abstract quantity, potential, which is supplied by assigning potential
to data structures in proportion to their size. This assignment is represented by annotations
on their types. The type system then ensures that all potential requirements can
be met from the original inputâs potential if a set of linear constraints can be solved.
Linear programming can optimise this amount of potential subject to the constraints,
yielding a upper bound on the memory requirements.
However, obtaining bounds on the heap space requirements does not detect a faulty
or malicious program which uses excessive stack space.
In this thesis, we investigate extending Hofmann and Jostâs techniques to infer
bounds on stack space usage, first by examining two approaches: using the Hofmann-
Jost analysis unchanged by applying a CPS transformation to the program being analysed,
then showing that this predicts the stack space requirements of the original program;
and directly adapting the analysis itself, which we will show is more practical.
We then consider how to deal with the different allocation patterns stack space
usage presents. In particular, the temporary nature of stack allocation leads us to a
system where we calculate the total potential after evaluating an expression in terms
of assignments of potential to the variables appearing in the expression as well as the
result. We also show that this analysis subsumes our previous systems, and improves
upon them.
We further increase the precision of the bounds inferred by noting the importance
of expressing stack memory bounds in terms of the depth of data structures and by
taking the maximum of the usage bounds of subexpressions. We develop an analysis
which uses richer definitions of the potential calculation to allow depth and maxima to
be used, albeit with a more subtle inference process