[m-rev.] for review: .local_call_tree_full
Julien Fischer
jfischer at opturion.com
Thu Feb 29 21:06:36 AEDT 2024
On Thu, 29 Feb 2024, Zoltan Somogyi wrote:
> The diff does not yet contain the change to options.m;
> I will do that by copying the updated text in the user guide,
> once we agree on what that should be.
>
> I intend to add an entry to NEWS in a week or two,
> once everyone has had a chance to try out the new
> functionality, and maybe find possibilities for further
> improvements. For example, I have tried to find
> a better, more descriptive name for the new file than
> .local_call_tree_full, but failed. Any proposals?
I think .local_call_tree_full is fine.
> Write x.local_call_tree_full with --show-local-call-tree.
>
> Extend the --show-local-call-tree option. Until now, it asked the compiler
> to construct two files for the module:
>
> - .local_call_tree, which maps each local predicate to the list of
> *local* predicates it refers to *directly*, and
>
> - .local_call_tree_order, which was an extract from .local_call_tree.
>
> After this diff, the --show-local-call-tree will also ask the compiler
> to construct a third file:
>
> - .local_call_tree_full, which maps each local predicate to the list of
> both *local and nonlocal* predicates it refers to *either directly
> or indirectly*, via references that occur in the current module.
>
> This can tell programmers such information as "does the call tree of
> this predicate read or write this field of this structure", in situations
> in which all such actions have to go through getter/setter predicates.
...
> diff --git a/library/digraph.m b/library/digraph.m
> index d1b4e8d63..608d2fbd6 100644
> --- a/library/digraph.m
> +++ b/library/digraph.m
> @@ -7,13 +7,13 @@
> %---------------------------------------------------------------------------%
> %
> % File: digraph.m
> -% Main author: bromage, petdr
> +% Original authors: bromage, petdr
> % Stability: medium
> %
> % This module defines a data type representing directed graphs. A directed
> % graph of type digraph(T) is logically equivalent to a set of vertices of
> % type T, and a set of edges of type pair(T). The endpoints of each edge
> -% must be included in the set of vertices; cycles and loops are allowed.
> +% must be included in the set of vertices; cycles are allowed.
I would prefer the wording to be explicit about the fact that loops are allowed,
since that is not always the case with graphs. Perhaps:
cycles, including loops, are allowed.
?
The rest looks fine.
Julien.
More information about the reviews
mailing list