Re: I released the refactoring tool

Tu Do <[email protected]> Fri, 13 Feb 2015 11:30:40 +0700
Newsgroups gmane.emacs.cedet
Message-ID <CAOEd9jm+SveP3TVi-Dk7-Ep4kcqZDqof6iyyx05m9sCUHqs=1A@mail.gmail.com>
Hi Eric,

Thanks for informing me about the function. I did not know about it.
However, after doing some tests, I found it not feasible to use for the
following reasons:

- Performance: Here is the benchmark result from elp-instrustment-function
after running tag generation using srecode-semantic-insert-tag:

srecode-semantic-insert-tag  40          101.46572211  2.5366430528
>

It took too long to run.

- Correctness: I tested it with the class ColoringSolver used in the demo
gifs. I store its Semantic tag in a variable than inserting the tag using
srecode-semantic-insert-tag in another buffer. The result is, the class is
generated twice, and one outside and one inside itself. The insert function
also does not handle template correctly. For example, it cannot insert the
template specifiers for this simple map:

std::map<int, int> color_statistics;

In the class, I have a more complicated variable:

std::set<std::set<std::map<int,int>>> *color_repo;

srecode-semantic-insert-tag can only retrieve the outter most container.

You can try with the class above: http://pastebin.com/niV0TcQt

Srecode, in general, is nice. Unfortunately, it's slow for large snippets.
We could improve usability significantly if we can improve performance.

In the tail of your demo you talk about mixing GNU Global and semantic.  If
> you enable GNU Global semantic database, the search results return special
> indirect tags which you can then ask Semantic to convert into regular
> semantic tags.   This two step process means you get GNU Global speed and
> slow but accurate parsing only where the matches are.
>

Great. Thanks for the info.

Tu.

On Fri, Feb 13, 2015 at 10:06 AM, Eric Ludlam <[email protected]> wrote:

> On 02/12/2015 04:51 PM, David Engster wrote:
>
>> Tu Do writes:
>>
>>> Here are the demos: https://github.com/tuhdo/
>>> semantic-refactor/blob/master/
>>> srefactor-demos/demos.md
>>>
>>
>> Very cool! Great job, this looks very useful, especially with
>> template-heavy code.
>>
>
> I agree, the demo gifs are very cool.  I like the placement UI for
> locating generated code somewhere in a buffer.  Very clever and speedy to
> use.
>
> I'd be interested in your thoughts for why your wrote your own functions
> for inserting a semantic tag as text vs trying to use srecode.  Is srecode
> missing features, such as template support, or is it just overly complex?
>
> For example, the body of srefactor--insert-function-implementation could
> be as simple as:
>
> (srecode-semantic-insert-tag func-tag)
>
> if srecode supported the features you need, and would work with other
> languages that have a template set.  If it is missing features, we should
> consider fixing that.
>
> There are several insert fcns that do not have srecode equivalents, but
> could be done with srecode application custom templates which would make it
> easy to port to new languages.
>
> In the tail of your demo you talk about mixing GNU Global and semantic.
> If you enable GNU Global semantic database, the search results return
> special indirect tags which you can then ask Semantic to convert into
> regular semantic tags.   This two step process means you get GNU Global
> speed and slow but accurate parsing only where the matches are.
>
> Thanks
> Eric
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Cedet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-devel