some initial work for purity checking traversal. need additional effect for tracking assignments to local variables