Rewrote constrainst check + unit test 

this will break unit tests and cfengine_stdlib.cf