1. A method of using binary code translation to introduce security policy for a program run on a data processor, comprising: a) translating code for said program at runtime by adding code to implement said security policy; b) holding said translation of code at branches with unknown targets, termed dynamic branches; c) continuing the said translation process at runtime when a dynamic branch is executed; d) said translation beginning at the target of the said dynamic branch; whereby code is translated on an as-needed basis to introduce a security policy.