Rule-based modeling and static analysis of self-adaptive systems by graph transformation