Siemens
Framework constraints are used to represent recommendations or restrictions on the use of the framework’s primitives in a way that is amenable to automatic checking. The goal is to support the framework’s users in making the best use of the framework while avoiding its pitfalls, without overwhelming the users with documentation. In the project discussed here, we show how we were able to realize this goal using a static analysis tool. We took a real-life complex framework and extracted from its support history a set of framework constraints that we refined into a set of coding guidelines. We then developed heuristics to enable the easy specification and the automatic checking of guidelines using a static analysis tool. The result is a system that allows one to define practical framework constraints and provides a mechanism to check them automatically in the user’s code.