Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is very hard to do this for C/C++, because C/C++ code is customized at compile time by the build environment and usually can't be parsed and analyzed without that customization.

The tools therefore need a fully working build environment, and the ability to temporarily override aspects of that build environment.




Dehydra and Treehydra are GCC extensions; they have to be integrated (painfully) into your build environment.

DXR is a source code search engine. It appears to be cscope with a database. That's not nothing, but it's not exactly taking us out of the opaque blobs of text and into semantics.


I agree that it is pain to integrate. Once integrated, however, these tools offer a start on the road towards semantics. Here is an overview of some of the techniques used in Treehydra: https://wiki.mozilla.org/Abstract_Interpretation

DXR is currently a pain to get up and running. There's been talk on the mailing list on streamlining the install process but it would still require a lot intervention depending the compilation process. https://groups.google.com/forum/#!topic/mozilla.dev.static-a...


Does DXR do anything particularly interesting, as far as source code search engines go?


Interesting! I've seen DXR before but it used to be pretty limited, no advanced queries, and the project seemed to be dead. Nice to see there is at least work in that direction. Large projects such as Mozilla could especially benefit from it.


It's a hard problem indeed. Hopefully that will motivate some people :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: