add functions to semantics parsing, including checking types compliance of functions composition