Working Semantic analyzer for functions and procs