add test cases for semantics analysis