Executing behavioural definitions in higher-order logic