checking that program is treeless