Program specialization for execution monitoring

  • Authors:
  • Peter Thiemann

  • Affiliations:
  • Institut für Informatik, Universitát Freiburg, Georges-Köhler-Allee 079, D-79110 Freiburg i.Br., Germany (e-mail: thiemann@informatik.uni-freiburg.de)

  • Venue:
  • Journal of Functional Programming
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Execution monitoring is a proven tool for securing program execution and to enforce safety properties on applets and mobile code, in particular. Inlining monitoring tools perform their task by inserting certain run-time checks into the monitored application before executing it. For efficiency reasons, they attempt to insert as few checks as possible using techniques ranging from simple ad hoc optimizations to theorem proving. Partial evaluation is a powerful tool for specifying and implementing program transformations. The present work demonstrates that standard partial evaluation techniques are sufficient to transform an interpreter equipped with monitoring code into a non-standard compiler. This compiler generates application code, which contains the inlined monitoring code. If the monitor is enforcing a security policy, then the result is a secured application code. If the policy is defined using a security automaton, then the transformation can elide many run-time checks by using abstract interpretation. Our approach relies on proper staging of the monitoring interpreter. The transformation runs in linear time, produces code linear in the size of the original program, and is guaranteed not to duplicate incoming code.