1. A method for representing programming constructs of a declarative programming model as a directed graph based on tree representations, including: receiving a representation of at least one syntax tree data structure for a declarative programming language; receiving at least one indication of lexical scope defining different ways to cross reference the at least one syntax tree data structure; and generating a directed graph data structure including at least one cross reference from a node from a first syntax tree data structure and a node from a second syntax tree data structure, the at least one cross reference determined based on the at least one indication of lexical scope.