[m-dev.] I want to move and rename the dependency_graph module
Julien Fischer
jfischer at opturion.com
Mon Feb 6 22:53:44 AEDT 2017
Hi Paul,
On Mon, 6 Feb 2017, Paul Bone wrote:
> compiler/dependency_graph.m has types and routines used to to build and use
> a dependency graph of the HLDS. I want to add the same for the MLDS. To
> avoid confusion I want to rename this module hlds.dependency_graph.m so I
> also have mlds.dependency_graph.m
In keeping with the names of existing modules that define the HLDS and
MLDS respectively I would name them hlds_dependency_graph.m and
ml_dependency_graph.m.
> I also plan to extract the common code and probably put it in either
> dependency_graph.m or libs.dependency_graph.m
What code will end up in common? Would any of the common code be better
placed in library/digraph.m?
> The current dependency_graph module is part of the transform_hlds module. I
> would also like to move it to the hlds module. I think it makes more sense
> there since it's utility code rather than a transformation.
There is some sense in that as it's imported by other packages in the
compiler, notably top_level and check_hlds.
> So. I have:
>
> dependency_graph.m:
> Move this from the transform_hlds to the hlds parent module.
>
> Rename it hlds.dependency_graph.m
>
> mlds.dependency_graph.m:
> A new module.
>
> dependency_graph.m or
> libs.dependency_graph.m:
> The code common to the two above modules, plus some code from
> hlds_module which also belongs here. Calling it dependency_graph.m is
> okay, because it's generic. But it could confuse people looking for
> hlds.dependency_graph.m. So I should probably call it
> libs.dependency_graph.m
>
> Does anyone see any problems with this?
Other than that I don't like the module / filenames you've picked, no.
Julien.
More information about the developers
mailing list