Homepage – Updated 10-24 › Forums › Cause Effect Modeling (CEM) with IQM Modeling › Simplifying the Logic in a Cause Effect Model
Tagged: Boolean Algebra, Cause Effect Modeling, CEM, Logic, MBT, Model Based Testing, Refactoring, Software Quality Assurance
- This topic has 0 replies, 1 voice, and was last updated 3 years, 11 months ago by Matt Dahl.
- AuthorPosts
- December 9, 2020 at 11:38 am #4473Matt DahlKeymaster
There is an opportunity for simplification of the logic within Cause Effect models. Below we will review one of the most common situations in which logic simplification can be utilized in Cause Effect modeling.
Given the following example Requirements.
-
REQ1 – From the Home Page if the User Selects the “Next” button then display “Page 2”.
REQ2 – From the Home Page if the User Selects the “Page 2” hyperlink then display “Page 2”.We begin by taking REQ1 one step at a time which is represented in the Cause Effect Model as follows.
1) From the Home Page (A) if the User Selects the “Next” button then display “Page 2”.
2) From the Home Page if the User Selects the “Next” button (B) then display “Page 2”.
3) From the Home Page if the User Selects the “Next” button then display “Page 2” (X).
After incorporating REQ2 one step at a time into the Cause Effect model with REQ1 the model is as follows.
Note: “…the User Selects the “Page 2” hyperlink…” is represented as C.We can represent this model in Boolean form as follows.
(A and B) or (A and C) = X
Based on the rules for Boolean algebra simplification we can then refactor this formula into the following.
A and (B or C) = X
This new refactored simplified formula is represented in the Cause Effect model as follows.After refactoring.
Before refactoring.
Overall, this simplification of the logic will not be noticeable in as simple of a model as the example we created. However, in more complex models when this simplification applies there will be a noticeable improvement in generation time. In general, one way to remember this approach is to remember the statement “OR’s before AND’s”.
- AuthorPosts
- You must be logged in to reply to this topic.