Instantiation and variable type inference, translation of blocks