Validator for the language defined in [Suenaga, Fukuda & Igarashi OOPSLA2012]