Initial implementation of struct-type contract generation.