9 thoughts on “One from the road

  1. Can a static analysis program provide more static analysis than the built in static analysis in Visual Studio 2013? If you replicate the goto fail bug in C# in VS, you get a warning straight away without the need for any extra software.

    • Yes, absolutely. As I mentioned in the article, there are static analyzers that do a much deeper analysis, and do much more work to eliminate false positives. The “goto fail” bug is particularly embarrassing for Apple because it could have been caught using a very straightforward analysis, one that in fact the C# language *requires* be done.

  2. What would you think of the idea of using static analyzers to suggest places where programmers could add “assume” directives for the benefit of optimizers? By my understanding, hyper-modern C compiler philosophy suggests that an optimizer should attempt to use static analysis to identify states cannot occur and then avoid generating code to needlessly handle those states. While omitting code for states which genuinely cannot occur is a good thing, I would think that the job of identifying such states should be left to a separate tool:

    1. Requiring detailed static analysis during the compilation process would slowed it down more than would having the compiler process directives indicating what things it should assume.

    2. Subtle changes to a program may have significant changes to what a static analyzer would be able to infer about program state at various places in the code. Having such inferences change code generation without human intervention would mean that almost any code change, no matter how tiny, would have the potential to break other seemingly-unrelated parts of the code.

    3. It’s common for people to build programs which include not just their own code but also code which they don’t fully understand but receive from other people. Decisions about what assumptions a compiler should make when processing a piece of code, and what assumptions would cause or indicate problems, should generally be made by someone who is intimately familiar with the code. Moving such decisions outside of the build process would avoid the need to have them made by people who aren’t well-equipped to make them.

    Because C# has far fewer kinds of genuinely Undefined Behavior, there are many fewer possibilities for optimizations to go as far awry as they can for C. Still, what would you think of the idea that even when the purpose of static analysis is to give the compiler information useful for code generation, having directives that give “hints” to the compiler could allow it to have better information more quickly and easily than having every build perform static analysis?

  3. Another good thing about it is that it is very cheap.
    It will remain number 1 in sales for an extended time to return, because Sony did everything right while using PS2.
    Popular devices such as the ‘Game Genie’ and ‘Game Shark’ are also no longer relevant.

  4. consider it like as a 4-2-3-1 however you sacrifice the
    CAM for an additional ST. Sweden live stream and TV time for the women’s World Cup arrives Friday night, as
    the United States attempts to move to 2-0 in group play of the 2015 FIFA tournament.
    However, Netherlands also suffered a loss in their second game as China took them down 1-0.

Leave a Reply


WordPress.com Logo


Google photo


Twitter picture


Facebook photo


Connecting to %s