1. A method of performing pattern matching comprising: determining one or more conditions under which a tree expression is true, said tree expression to match a first pattern, represented as a first tree, with a second pattern, represented as a second tree.