Static cost analysis


It’s oen useful to ask questions about programs without actually running them. For example, we might want to know if a program contains some class of bugs such as division by zero or memory access errors. For compilers static information is vital for good quality machine code generation. Another class of questions is about cost of running a program. For instance, we might want to know if the program will terminate, or howmuch memory it uses, or we might need to approximate its run-time. Approximation of run-time is a useful in distributed systems for optimally planning execution of tasks. It’s well known that in general answering questions about non-trivial properties of programs is undecidable. However, this doesn’t mean that we cannot answer questions about wide class of programs or that we cannot provide approximations of answers we want to get. We call analysis of programs that is performed without actually executing the program a static program analysis. We will focus on static analysis of imperative programs. High-level programming languages are oen quite complicated and present significant challenge if we want to analyse the code wrien in one directly. e more syntactic cases to handle the more difficult the analysis problem becomes. is isn’t to say that static analysis can’t be done directly on high-level language, it oen is, and many static program analysis tools, that focus on detecting programmer errors, are designed in such way. However, in order to reduce complexity, a high-level program code is oen converted to a simpler, easy to handle, but semantically equivalent, form. is simpler form is either called intermediate code or representation. In this work we do not work on a concrete high-level language, but assume that program is represented as a sequence of simple statements. is could stand as an

1 Figure or Table

Cite this paper

@inproceedings{Randmets2012StaticCA, title={Static cost analysis}, author={Jaak Randmets}, year={2012} }