sat: almost completed

add: addConstraint addFun postDeclareFun
tlpgp1: [WIP]

several modifications