Security-aware program transformations