modify semantic analysis for class, protocol