A virtual machine comprising: • a translator operable in the virtual machine, the translator comprising: • a receiving unit adapted to receive a program code to be executed on the virtual machine, wherein the receiving unit is further adapted to receive a rule from a policy provider external to the virtual machine, the rule referring to the execution of the program code, • a code unit adapted to create a rule infused machine code based on the program code and the rule, by inserting instructions into the program code, wherein the instructions enforce a set of rules for the execution of the program code, such that the rule is enforced when the rule infused machine code is executed on the virtual machine, and wherein the rule infused machine code comprises the set of rules in form of rule elements in a machine code, • a private memory area, wherein the private memory area is private such that only the rule elements in the rule infused machine code can access values in the private memory area, and • an executing unit adapted to: • execute the rule infused machine code, and • check if the execution of the rule infused machine code complies with the rule, wherein the executing unit is further adapted to, based on the check, store a value in the private memory area, and at a later check, access the value and perform an action based on the value. • a translator operable in the virtual machine, the translator comprising: • a receiving unit adapted to receive a program code to be executed on the virtual machine, wherein the receiving unit is further adapted to receive a rule from a policy provider external to the virtual machine, the rule referring to the execution of the program code, • a code unit adapted to create a rule infused machine code based on the program code and the rule, by inserting instructions into the program code, wherein the instructions enforce a set of rules for the execution of the program code, such that the rule is enforced when the rule infused machine code is executed on the virtual machine, and wherein the rule infused machine code comprises the set of rules in form of rule elements in a machine code, • a private memory area, wherein the private memory area is private such that only the rule elements in the rule infused machine code can access values in the private memory area, and • an executing unit adapted to: • execute the rule infused machine code, and • check if the execution of the rule infused machine code complies with the rule, wherein the executing unit is further adapted to, based on the check, store a value in the private memory area, and at a later check, access the value and perform an action based on the value. • a receiving unit adapted to receive a program code to be executed on the virtual machine, wherein the receiving unit is further adapted to receive a rule from a policy provider external to the virtual machine, the rule referring to the execution of the program code, • a code unit adapted to create a rule infused machine code based on the program code and the rule, by inserting instructions into the program code, wherein the instructions enforce a set of rules for the execution of the program code, such that the rule is enforced when the rule infused machine code is executed on the virtual machine, and wherein the rule infused machine code comprises the set of rules in form of rule elements in a machine code, • a private memory area, wherein the private memory area is private such that only the rule elements in the rule infused machine code can access values in the private memory area, and • an executing unit adapted to: • execute the rule infused machine code, and • check if the execution of the rule infused machine code complies with the rule, • execute the rule infused machine code, and • check if the execution of the rule infused machine code complies with the rule,