Code for connecting an SMT solver with the type-checker.