Type inference building block in Python using pycosat.