introduce semantics_context to gather the result of semantics check