Begin to check semantic error checker

1. Update docs.
2. Create base class for checking semantic error.
3. Update test case.