interest in Static Analysis for D ?

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 15 06:57:51 PST 2016


On Tuesday, 15 November 2016 at 14:45:29 UTC, Stefan Koch wrote:
> Hi Guys,
>
> I was wondering how much interest in static analysis exists in 
> this community .
> DMD already has rudimentary support for these kinds of things.

Whoops I accidentally pressed enter too soon.

I am currently working on extending the existing support a little 
because the new CTFE engine really profits form having more 
information up-front.

At the moment it is rather cumbersome to write analysis passes.
And passing information from pass to pass is not exactly trivial 
either.

Therefore I am planning to spent some time next year to implement 
and polish a facility that allows matching patterns on dmd's AST 
in an event driven style.

However this will only bear fruit if there is actual interest in 
static analysis for D.

One possible application would be to automatically produce a 
precise complexity analysis for algorithms based on the compilers 
knowledge of the range interface.

Another one is to automatically reduce template-bloat and other 
duplicated code-blocks early on. (This one is my intended target.)

Cheers,
Stefan


More information about the Digitalmars-d mailing list