Types in Logic Programming by Frank Pfenning