Transparent shaping of existing software to support pervasive and autonomic computing