Hi Stefan, I had the same problem, I'll send you my solution this afternoon. I'll be away for a week after tonight though. I created a recursive algorithm, which would keep track of the depth of the tree. When the maximum depth was almost reached, I would limit the type of constructors it could choose to constructors with the least amount of arguments. I would rank constructors on their complexity. 0 for constructors without arguments, 1 for constructors with primitive (and String) arguments and 2 for constructors with complex arguments. When the maximum depth was reached, I would use a null node. Arjan On 23/06/06, Stefan Wappler <[log in to unmask]> wrote: > > > Dear Arjan, > > well, I'm also creating the function set and type set out of a couple of > Java classes in order to let ECJ generate feasible method call sequences. > The point is that not each Java class possesses a (parameter-less) default > constructor -- consequently, no terminal will exist in the terminal set for > thes classes. > > Would be nice to see a configuration or specialized tree building > algorithm for this issue. > > Stefan > > > > Mit freundlichen Grüßen / Kind regards > > Stefan Wappler > DaimlerChrysler Automotive IT Institute > Ernst-Reuter-Platz 7 > 10587 Berlin/Germany > > Phone +49 (0)30 39982 358 > Fax +49 (0)711 3052 160825 > mailto: [log in to unmask] > > > *[log in to unmask]* > Gesendet von: [log in to unmask] > > 23.06.2006 10:23 Bitte antworten an > [log in to unmask] > > An > [log in to unmask] Kopie > > Thema > Re: Tree building without terminals for all types > > > > > > > I have build a tree builder that builds tree from Java types. Java has a > terminal node for every node, but I still had to do some funcky stuff of > course. I know how to write your own, so if you need some tips for that I > can show my version. Otherwise someone else can help you. > > Arjan > > > On 23/06/06, *Stefan Wappler* <*[log in to unmask]*<[log in to unmask]>> > wrote: > > Is there a way to configure the tree builders provided by ECJ that they > work in the case that for some types of the type set no terminal exists (but > only non-terminals)? Or are there alternative tree builders known/available > that would do this job? > > (Of course, it is possible to build trees using the function set and type > set that doesn't contain terminals for all types. But actually, I'm not able > to get ECJ do this.) > > > > Mit freundlichen Grüßen / Kind regards > > Stefan Wappler > DaimlerChrysler Automotive IT Institute > Ernst-Reuter-Platz 7 > 10587 Berlin/Germany > > Phone +49 (0)30 39982 358 > Fax +49 (0)711 3052 160825 > mailto: *[log in to unmask]*<[log in to unmask]> > > > > -- > Arjan Seesing > +31 (0)6 38 513 658 > TUDelft > Software Engineering* > **[log in to unmask]* <[log in to unmask]> > -- Arjan Seesing +31 (0)6 38 513 658 TUDelft Software Engineering [log in to unmask]