Apparatus for generating code for a transaction on a set of data, the transaction being subject to constraints and the apparatus comprising:a transaction description which describes operations performed in the transaction, the operations including at least one operation which may abort without affecting the set of data; a constraint specification which specifies the constraints to which the transa