Partial evaluation of machine code

Abstract

This paper presents an algorithm for off-line partial evaluation of machine code. The algorithm follows the classical two-phase approach of binding-time analysis (BTA) followed by specialization. However, machine-code partial evaluation presents a number of new challenges, and it was necessary to devise new techniques for use in each phase. - Our BTA algorithm makes use of an instruction-rewriting method that ``decouples'' multiple updates performed by a single instruction. This method counters the cascading imprecision that would otherwise occur with a more naive approach to BTA. - Our specializer specializes an explicit representation of the semantics of an instruction, and emits residual code via machine-code synthesis. Moreover, to create code that allows the stack and heap to be at different positions at run-time than at specialization-time, the specializer represents specialization-time addresses using symbolic constants, and uses a symbolic state for specialization. Our experiments show that our algorithm can be used to specialize binaries with respect to commonly used inputs to produce faster binaries, as well as to extract an executable component from a bloated binary.

Document Details

Document Type
Pub Defense Publication
Publication Date
Oct 23, 2015
Source ID
10.1145/2858965.2814321

Entities

People

  • Thomas Reps
  • Venkatesh Srinivasan

Organizations

  • Air Force Research Laboratory
  • Defense Advanced Research Projects Agency
  • National Science Foundation
  • University of Wisconsin–Madison
  • Wisconsin Alumni Research Foundation

Tags

Fields of Study

  • Computer science

Readers

  • Computer Programming and Software Development.
  • Neural Network Machine Learning.
  • Parallel and Distributed Computing.