Add input predicates

Fixes #102.