
Benoit Perrot.
Task graph and data dependencies.
CSI Seminar
The task system used in the Tiger Compiler is actually
based on handwritten tasks's dependencies: for instance
the developper, who knows that the "parse" task must be
done before the "type-check" one, explicitely wrote a
dependency between "parse" and "type-check".
A clever way to express thoose dependencies would be to
inform the tasks of what they need (in term of
instanciated/allocated/realized objects) and what
they produce (idem). This concept is well illustrated
in the "make" utility, where for instance, a binary
program depends on its objects, and thoose objects
depend on their sources.
Building such a graph would allow dynamical data
analysis, particularly detection of "dead objects",
i.e. objects that could be safely destroyed after
use (avoiding memory dummy consumption or leak).
The challenge is here to express tasks and dependencies
in terms of "resources" and "products" of "process",
considering class hierarchies as manipulated entities.
Indeed, a simple abstract syntax tree is a resource
of the "ast-display" task and also of the "type-check"
one, but not of "hir-compute". But the product of
"type-check", which is a "decorated" (or a derivated ?)
abstract syntax tree is always a valid resource of
"ast-display" and became a resource of "hir-compute"!
to top