On Jun 3, 2014, at 8:07 , Daniel Fahlgren <[email protected]> wrote:
> Hi, > > On Mon, 2014-06-02 at 15:54 -0700, Jordan Rose wrote: >> Good idea! Rather than add another state, though, it might be better to >> use a custom tag for the initialization transition. That way we don't >> need to have "S->isInitialized() || S->isUnlocked()" anywhere. What do >> you think? > > Do you mean to add another variable that is true if the unlocked mutex > just been initialized? I tried that but that made the code look a bit > kludgy. The ugly part simply moved from one place to another. No, not another variable, another ProgramPointTag. By default, addTransition creates new ExplodedNodes using the checker itself as a tag, but you can declare other tags as well (see uses of SimpleProgramPointTag). If we declare a special tag for initialization, it will be just as easy to find with the BR visitor later, but doesn't actually require a separate kind in the ProgramState. (We could probably stand to use this trick elsewhere.) Besides that, the patch looks good. What do you think? Jordan _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
