Methods and apparatus, including computer systems and program products,
that relate to diversification of computer code. The methods feature a
machine-implemented method that includes receiving input computer code,
and automatically generating multiple versions of diversified computer
code, where each version of the diversified computer code is distinct
from but functionally equivalent to the input computer code. The input
computer code can include source code or binary code and automatically
generating multiple versions of diversified computer code can include
automatically generating multiple versions of diversified source and/or
binary code. Automatically generating diversified computer code can
include applying multiple diversification operations.