1.  Field of the Invention
The invention generally relates to the evaluation of programming language statements and in particular to a method and system for evaluating a programming language statement that includes a first and a second sub-statement. 
2.  Description of the Related Art
Presently, several techniques have been developed for evaluating programming language statements.  Discoveries and the progress in the area of programming language theories and methods are fundamental.  They have first a long term deep impact on other research areas, in particular computational semantics, type systems and programming models, and they strongly improve software development processes both in time and quality.  As an example, the object oriented paradigm and its application is probably the most fertile advance of the last two decades, pervading software production and design. 
The separation of declarative languages versus imperative languages is commonly accepted as two different ways of solving computational related problems.  With declarative languages, a programmer expresses what the solution is, while the imperative languages require the definition of how the solution is reached by specifying intermediate computation steps. 
Declarative languages are preferred when the application field is well defined and restricted, because they are simple and often rely on efficient algorithms, such as Prolog and Herbrand resolution, constraint solving system algorithms and the simplex algorithm.  On the other hand, imperative languages are useful for solving general problems, and allow the mastering of execution time.  However, imperative languages have a higher cost of providing a much more important amount of specification, and produce a complexity overload. 
There are today areas where programmers would need to combine both advantages of these two poles in a flexible and easy way.  The operations for transforming structured data, such as XML documents, typically range from simple operations to very complex ones, involving different levels of abstraction.  In such cases, programmers would prefer a common framework that enables the use of concise and declarative notations as long as this is possible, while reserving low level, fine grain imperative specifications to difficult cases. 
For such a framework, language theorists and designers are still looking for expressive, powerful, simple, clear and precise formalisms in order to capture the most fundamental operations.  However, considering both semantics and typing, general solutions at the right abstraction level have not been proposed yet.