Implementation of Invarian Checker