Implementing TAP using compilers