implemented attr constraint checker

Also removed nested class inside ExpEvaluator.
Neither have been tested.