Rules and specification patterns