License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/OASIcs.WCET.2015.85
URN: urn:nbn:de:0030-drops-52598
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2015/5259/
Go to the corresponding OASIcs Volume Portal


Holsti, Niklas ; Gustafsson, Jan ; Källberg, Linus ; Lisper, Björn

Analysing Switch-Case Code with Abstract Execution

pdf-format:
10.pdf (0.4 MB)


Abstract

Constructing the control-flow graph (CFG) of machine code is made difficult by dynamic transfers of control (DTC), where the address of the next instruction is computed at run-time. Switchcase statements make compilers generate a large variety of machine-code forms with DTC. Two analysis approaches are commonly used: pattern-matching methods identify predefined instruction patterns to extract the target addresses, while analytical methods try to compute the set of target addresses using a general value-analysis. We tested the abstract execution method of the SWEET tool as a value analysis for switch-case code. SWEET is here used as a plugin to the Bound-T tool: thus our work can also be seen as an experiment in modular tool design, where a general value-analysis tool is used to aid the CFG construction in a WCET analysis tool. We find that the abstract-execution analysis works at least as well as the switch-case analyses in Bound-T itself, which are mostly based on pattern-matching. However, there are still some weaknesses: the abstract domains available in SWEET are not well suited to representing sets of DTC target addresses, which are small but sparse and irregular. Also, in some cases the abstract-execution analysis fails because the used domain is not relational, that is, does not model arithmetic relationships between the values of different variables. Future work will be directed towards the design of abstract domains eliminating these weaknesses.

BibTeX - Entry

@InProceedings{holsti_et_al:OASIcs:2015:5259,
  author =	{Niklas Holsti and Jan Gustafsson and Linus K{\"a}llberg and Bj{\"o}rn Lisper},
  title =	{{Analysing Switch-Case Code with Abstract Execution}},
  booktitle =	{15th International Workshop on Worst-Case Execution Time Analysis (WCET 2015)},
  pages =	{85--94},
  series =	{OpenAccess Series in Informatics (OASIcs)},
  ISBN =	{978-3-939897-95-8},
  ISSN =	{2190-6807},
  year =	{2015},
  volume =	{47},
  editor =	{Francisco J. Cazorla},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2015/5259},
  URN =		{urn:nbn:de:0030-drops-52598},
  doi =		{10.4230/OASIcs.WCET.2015.85},
  annote =	{Keywords: ynamic control flow, indexed branch, machine-code analysis, WCET analysis}
}

Keywords: ynamic control flow, indexed branch, machine-code analysis, WCET analysis
Collection: 15th International Workshop on Worst-Case Execution Time Analysis (WCET 2015)
Issue Date: 2015
Date of publication: 06.07.2015


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI