added spec for more ternary predicate
added kbPred and predict