A CLP-based Functional ATPG for Extended FSMs