[scala] add constraint trait & classes; implement global valuation functions
[scala] add skeleton methods to class Constraint: toDNF, to3CNF, normalise
[scala] implement action
[scala] fix action; refactor type & type-environment