|Call Chain Completion - Limiting Search Space [message #761927]
||Wed, 07 December 2011 09:50
| Marcel Bruch
Registered: July 2009
this is the beginning of a series of questions/design decisions regarding a call chain completion engine for/based-on JDT (see http://code-recommenders.blogspot.com/2010/12/how-do-i-get-instance-of.html if you need more information on call chain completion). The intent of these questions is to discuss implementation decisions before the code gets written and to learn what people appreciate most. Thus, your feedback (as Eclipse User) is very appreciated.
This post is about limiting the search space as soon as a known type has been observed. See the example below:
When triggering code completion on "PlatformUI.<^Space>", we get 7 proposals with a length up to 5 (search has been limited to maxlength=5)). As you can see, there is a circle in the call-graph for IWorkbench:
getWorkbench() -> getActiveWorkbenchWindow() -> getWorkbench()
getWorkbench() -> getWorkbenchWindows()[index] -> getWorkbench()
getWorkbench() -> showPerspective() -> getActiveWorkbenchWindow() -> getWorkbench()
and so on. There are other examples with an even worse dependency graphs.
Question: How should the engine deal with these kinds of circles?
Option 1: Stop as soon as the same type has been part of the chain?
This would cut off many paths, potentially also interesting ones. (Need an example?)
Option 2: Put in as many paths as possible to find until completion timeout occurs.
This is not perfectly heuristic and leads to many results. People might get flooded with proposals. In this case, call-chain completion should work as a quick fix rather than a code completion (maybe it should do so in general).
Option 3: Limit the number of proposal to the, say, 7 shortest proposals.
People don't get flooded but probably don't get the proposals they want.
As a side-note: We have in mind an approach that collects the information which proposals have been used actually used in similar situations. Given this info, we can cut down the number of proposals furthermore.
Deepak (and anyone else interested in this), whats your opinion on that? Option 1, 2, or 3? Or something different?
[Updated on: Wed, 07 December 2011 09:56]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.12697 seconds