Automatically generate dependencies?

Suggestions for new Logtalk features

Moderator: Paulo Moura

Post Reply
Parker
Posts: 33
Joined: Wed Feb 27, 2008 2:51 pm

Automatically generate dependencies?

Post by Parker » Wed Feb 27, 2008 4:36 pm

When an application has a large number of files (objects, categories, protocols etc), it is laborious to track the dependencies between them. As the number of files grows this becomes progressively worse.

Should it be possible to generate the dependencies automatically?

If so, this could be useful:
1) to render unimportant the order of files in logtalk_load calls, and
2) for generating a graphical display of object dependencies (eg with graphviz).

Paulo Moura
Logtalk developer
Posts: 474
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: Automatically generate dependencies?

Post by Paulo Moura » Sat Mar 01, 2008 11:31 am

Hi!

The first tool to implement would be a cross-referencer for both entities and methods. This would give you a list of all dependencies that could be used for constructing a graphical representation. Any takers? I believe there are some Prolog code for cross-referencing floating on the net that could be used as a start point. I suggest you open an enhancement ticket at http://trac.logtalk.org/ with your proposal.

In the current version of the Logtalk compiler, the order of the logtalk_load/1-2 calls and the order of the files in the calls is important to avoid spurious compiler warnings (e.g. references to unknown entities) and, most important, to allow static binding (at least when using library objects).

Happy logtalking!

Paulo
Paulo Moura
Logtalk developer

Parker
Posts: 33
Joined: Wed Feb 27, 2008 2:51 pm

Re: Automatically generate dependencies?

Post by Parker » Thu Oct 01, 2009 3:56 pm

New ticket on trac: http://trac.logtalk.org/ticket/35

Existing cross-referencers I have seen include a parser and a list of built-ins. But this is already implemented in the logtalk compiler, so would it be sensible to use that rather than start afresh?

Paulo Moura
Logtalk developer
Posts: 474
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Re: Automatically generate dependencies?

Post by Paulo Moura » Thu Oct 01, 2009 4:42 pm

Parker wrote: New ticket on trac: http://trac.logtalk.org/ticket/35
Thanks.
Parker wrote: Existing cross-referencers I have seen include a parser and a list of built-ins. But this is already implemented in the logtalk compiler, so would it be sensible to use that rather than start afresh?
Depends. If the cross-referencer is implemented as built-in tools (as the current debugger), then it would make sense to take advantage of the existing code in the Logtalk compiler/runtime. However, I'm not sure this will be the best implementation route. Logtalk reflection support should be enough to build a decent cross-referencer as an independent Logtalk application.
Paulo Moura
Logtalk developer

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest