Contract Formalization