Semantic analysis

TODO

Type Inference