# Fundamental Research on Detecting Contradictions in Requirements: Taxonomy and Semi-Automated Approach

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

#### 1.1. Problem

#### 1.2. Contribution

## 2. Fundamentals

#### 2.1. Formulation and Building Blocks

#### 2.2. Contradictions

- “Every S is P” and “Some S is not P” are contradictories.
- “No S is P” and “Some S is P” are contradictories.
- “Every S is P” and “No S is P” are contraries.
- “Some S is P” and “Some S is not P” are subcontraries.
- “Some S is P” is a subaltern of “Every S is P”.
- “Some S is not P” is a subaltern of “No S is P”.

- Contradictory opposites, e.g., “he is sick”/“he is not sick”, are mutually exhaustive and mutually inconsistent. This means, that one statement must be true and the other false or vice versa. They cannot both be true or false at the same time.
- Contrary opposites, e.g., “it is black”/“it is white”, are also mutually inconsistent, but not exhaustive. While they cannot both be true, they can both be false.
- Subcontraries, e.g., “you can—If you want to—call in sick”/you can—If you want to—not call in sick” are mutually consistent. While they can simultaneously be true at the same time, they cannot simultaneously be false at the same time.
- The statement “some people are sick” is the subaltern of “everybody is sick”, while the latter is the superaltern of the former. If the superaltern is true, the subaltern must also be true and if the subaltern is false, the superaltern must also be false.

- The vehicle must have high performance
- The vehicle must have low consumption

## 3. Related Work

#### 3.1. Classification of Conflicts

- Process-Level Deviation: Conflict between a process-level rule and a specific process state.
- Instance-Level Deviation: Inconsistency between a product-level requirement and a specific state of the running system.
- Terminology Clash: Usage of different terms for the same event
- Designation Clash: Usage of the same term for different events
- Structure Clash: Different explanations for a single real-world concept
- Conflict: Two assertations are directly logically inconsistent
- Divergence: Two assertations are indirectly (through a boundary condition) logically inconsistent
- Competition: Particular case of the divergence
- Obstruction: Another particular case of the divergence

#### 3.2. Natural Language Processing for Detecting Conflicts

#### 3.3. Ontologies for Detecting Conflicts

## 4. Method for Detecting Contradictions

#### 4.1. Nomenclature

- Are events that represent, for example, conditions
- Are always unequal
- Can occur simultaneously
- Do not depend on each other

- Are variables

- Are parameters
- Are unequal to each other
- Can occur in parallel: $c$ can be equal to $1$ and at the same time $k$ equal to $2$.

- $\stackrel{!}{=}$; $\stackrel{!}{<}$; $\stackrel{!}{>}$: must be equal, must be smaller, must be bigger
- $\Rightarrow $: implies; if... then. e.g., $A\Rightarrow x\stackrel{!}{=}1$ translates to “If $A$ is true, then $x$ must be $1$”.
- $\neg $: not. e.g., The statement $\neg A$ is true if and only if $A$ is false.
- $\wedge $; $\vee $: and; or. e.g., The statement $A\wedge B$ is true if $A$ and $B$ are both true; otherwise, it is false. Another example is: The statement $A\vee B$ is true if $A$ or $B$ (or both) are true; if both are false, the statement is false.

#### 4.2. Contradictions—Subcategories

- The car must be red: $x\stackrel{!}{=}k$.
- The car must be blue: $x\stackrel{!}{=}c$.

- If the customer wishes, the car must be red: $A\Rightarrow x\stackrel{!}{=}k$.
- If the customer wishes, the car must be blue: $A\Rightarrow x\stackrel{!}{=}c$.

- The car must be red if the customer wishes it to be: $A\Rightarrow x\stackrel{!}{=}k$.
- The car must be blue if the car has four doors: $B\Rightarrow x\stackrel{!}{=}c$.

#### 4.3. Process

- 1.
- Are the variables from condition 1 and condition 2 the same or a subset of each other?

- 2.
- Does one condition include the other one?

- 3.
- Are condition 1 and condition 2 mutually exhaustive and mutually inconsistent?

- 4.
- Is there a condition?

- 5.
- Can cause 1 occur at the same time as cause 2?

- 6.
- Are cause 1 and cause 2 the same?

## 5. Materials and Results

#### 5.1. Materials

#### 5.2. Results

#### 5.2.1. Simplex Subaltern

- The safe state must be reached within 1000 ms.
- The safe state must be reached within 800 ms.

`“`safe state” is $x$, “1000 ms” is k and “800 ms” is $c$.

#### 5.2.2. Alius Subaltern

- If the actual heater stage CbnHeatg_[…] > 0, the requested pump power CbnHeatg_SpOfCooltPmp must be limited by the parameter CbnHeatg_TrigForDutyCycOf[…].
- If BattChrgnMngt_MsgVld[…] = false, the requested pump power CbnHeatg_SpOfCooltPmp must be limited to 20%.

`“`If the actual heater stage CbnHeatg_[…] > 0” is A, “If BattChrgnMngt_MsgVld[…] = false” is B, “CbnHeatg_SpOfCooltPmp” is x, “Cbn-Heatg_TrigForDutyCycOf[…]” is k and “20%” is c.

#### 5.2.3. Alius Contradictory

- Suitable potential equalization is required for all conductive covers or housings of all HV components.
- If additional external conductive sheaths or covers are fitted over covers or enclosures consisting of solid insulating materials, equipotential bonding is not required for these.

#### 5.2.4. Alius Contrary

- If the value of the signal ComVehFrnt_ChrgnCur[…] exceeds the value of 0 (A), the signal Chrgn[…] must be set to TRUE.
- If the parameter ChrgnCurChk_SubVal[…] is set to TRUE, the signal Chrgn[…] corresponds to the parameterizable value ChrgnCurChk_SubValChrgn[…], otherwise, the signal is forwarded unchanged.

- 2.1
- If the parameter ChrgnCurChk_SubVal[…] is set to TRUE, the signal Chrgn[…] corresponds to the parameterizable value ChrgnCurChk_SubValChrgn[…].
- 2.2
- If the parameter ChrgnCurChk_SubVal[…] is not set to TRUE, the signal Chrgn[…] is forwarded unchanged.

## 6. Discussion

## 7. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Dick, J. Requirements Engineering, 4th ed.; Springer eBook Collection Computer Science; Springer: Cham, Switzerland, 2017. [Google Scholar]
- Bender, B.; Gericke, K. (Eds.) Entwickeln der Anforderungsbasis: Requirements Engineering. In Pahl/Beitz Konstruktionslehre: Methoden und Anwendung Erfolgreicher Produktentwicklung; 9. Auflage; Springer: Berlin/Heidelberg, Germany, 2021; Volume 50, pp. 169–209. [Google Scholar]
- Montgomery, L.; Fucci, D.; Bouraffa, A.; Scholz, L.; Maalej, W. Empirical research on requirements quality: A systematic mapping study. Requir. Eng.
**2022**, 29, 183–209. [Google Scholar] [CrossRef] - Luisa, M.; Mariangela, F.; Pierluigi, N.I. Market research for requirements analysis using linguistic tools. Requir. Eng.
**2004**, 9, 40–56. [Google Scholar] [CrossRef] - Babcock, J. Good Requirements Are More than Just Accurate. Available online: https://practicalanalyst.com/good-requirements-are-more-than-just-accurate/ (accessed on 20 May 2022).
- Horn, L.R. Contradiction; Stanford Encyclopedia of Philosophy: Stanford, CA, USA, 2018. [Google Scholar]
- Aristoteles. Metaphysik: Schriften zur Ersten Philosophie; Schwarz, F.F., Ed.; Reclams Universal-Bibliothek: Ditzingen, Germany, 1986; Volume 7913. [Google Scholar]
- Parsons, T. The Traditional Square of Opposition; Stanford Encyclopedia of Philosophy: Stanford, CA, USA, 2021. [Google Scholar]
- Kesselring, T. Formal Logischer Widerspruch, Dialektischer Widerspruch, Antinomie. Reflexionen über den Widerspruch. In Jenseits der Dichotomie; Müller, S., Ed.; Springer Fachmedien Wiesbaden: Wiesbaden, Germany, 2013; pp. 15–38. [Google Scholar]
- Landhäußer, M.; Körner, S.J. Artificial Intelligence in Requirements Engineering. In Proceedings of the REConf, München, Germany, 27–29 March 2017. [Google Scholar]
- Marneffe, M.C.; Rafferty, A.N.; Manning, C.D. Finding Contradictions in Text; Association for Computational Linguistics: Stroudsburg, PA, USA, 2008. [Google Scholar]
- Van Lamsweerde, A.; Darimont, R.; Letier, E. Managing conflicts in goal-driven requirements engineering. IEEE Trans. Softw. Eng.
**1998**, 24, 908–926. [Google Scholar] [CrossRef] [Green Version] - Guo, W.; Zhang, L.; Lian, X. Automatically detecting the conflicts between software requirements based on finer semantic analysis. arXiv
**2021**. [Google Scholar] [CrossRef] - Zhao, L.; Alhoshan, W.; Ferrari, A.; Letsholo, K.J.; Ajagbe, M.A.; Chioasca, E.V.; Batista-Navarro, R.T. Natural Language Processing for Requirements Engineering. ACM Comput. Surv.
**2021**, 54, 1–14. [Google Scholar] [CrossRef] - Kurtanovic, Z.; Maalej, W. Automatically Classifying Functional and Non-functional Requirements Using Supervised Machine Learning. In Proceedings of the 2017 IEEE 25th International Requirements Engineering Conference (RE), Lisbon, Portugal, 4–8 September 2017; pp. 490–495. [Google Scholar]
- Jindal, R.; Malhotra, R.; Jain, A. Automated classification of security requirements. In Proceedings of the 2016 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Jaipur, India, 21–24 September 2016; pp. 2027–2033. [Google Scholar]
- Guarino, N.; Oberle, D.; Staab, S. What Is an Ontology? In Handbook on Ontologies; Staab, S., Studer, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5, pp. 1–17. [Google Scholar]
- Sandhu, G.; Sikka, S. State-of-art practices to detect inconsistencies and ambiguities from software requirements. In Proceedings of the International Conference on Computing, Communication & Automation, Greater Noida, India, 15–16 May 2015; pp. 812–817. [Google Scholar]
- Fischbach, J.; Frattini, J.; Vogelsang, A.; Mendez, D.; Unterkalmsteiner, M.; Wehrle, A.; Henao, P.R.; Yousefi, P.; Juricic, T.; Radduenz, J.; et al. Automatic Creation of Acceptance Tests by Extracting Conditionals from Requirements: NLP Approach and Case Study. arXiv
**2022**, arXiv:2202.00932. [Google Scholar] - Göhlich, D.; Fay, T.A. Arbeiten mit Anforderungen: Requirements Management. In Pahl/Beitz Konstruktionslehre: Methoden und Anwendung Erfolgreicher Produktentwicklung, 9th ed.; Bender, B., Gericke, K., Eds.; Springer: Berlin/Heidelberg, Germay, 2021; Volume 25, pp. 211–229. [Google Scholar]

**Figure 10.**Building blocks for an Alius Contradictory contradiction, consisting of two requirements.

Contradictions | Simple | Examples for Multiple Conditions | |
---|---|---|---|

Contradictory | Simplex | $x\stackrel{!}{=}k$ $x\stackrel{!}{=}\neg k$ | - |

Idem | $A\Rightarrow x\stackrel{!}{=}k$ $A\Rightarrow x\stackrel{!}{=}\neg k$ | $A\wedge B\Rightarrow x\stackrel{!}{=}k$ $A\wedge B\Rightarrow x\stackrel{!}{=}\neg k$ | |

Alius | $A\Rightarrow x\stackrel{!}{=}k$ $B\Rightarrow x\stackrel{!}{=}\neg k$ | $A\wedge B\Rightarrow x\stackrel{!}{=}k$ $A\wedge C\Rightarrow x\stackrel{!}{=}\neg k$ | |

Contrary | Simplex | $x\stackrel{!}{=}c$ $x\stackrel{!}{=}k$ | - |

Idem | $A\Rightarrow x\stackrel{!}{=}c$ $A\Rightarrow x\stackrel{!}{=}k$ | $A\wedge B\Rightarrow x\stackrel{!}{=}c$ $A\vee B\Rightarrow x\stackrel{!}{=}k$ | |

Alius | $A\Rightarrow x\stackrel{!}{=}c$ $B\Rightarrow x\stackrel{!}{=}k$ | $A\wedge B\Rightarrow x\stackrel{!}{=}c$ $C\wedge D\Rightarrow x\stackrel{!}{=}k$ | |

Subaltern | Simplex | $x\stackrel{!}{<}c+k$ $x\stackrel{!}{<}c$ | - |

Idem | $A\Rightarrow x\stackrel{!}{<}c+k$ $A\Rightarrow x\stackrel{!}{<}c$ | $A\wedge B\Rightarrow x\stackrel{!}{<}c+k$ $A\wedge B\Rightarrow x\stackrel{!}{<}c$ | |

Alius | $A\Rightarrow x\stackrel{!}{<}c+k$ $B\Rightarrow x\stackrel{!}{<}c$ | $A\wedge B\Rightarrow x\stackrel{!}{<}c+k$ $C\wedge D\Rightarrow x\stackrel{!}{<}c$ |

Simplex Subaltern | Alius Subaltern | Alius Contradictory | Alius Contrary |
---|---|---|---|

4 | 3 | 2 | 40 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Gärtner, A.E.; Fay, T.-A.; Göhlich, D.
Fundamental Research on Detecting Contradictions in Requirements: Taxonomy and Semi-Automated Approach. *Appl. Sci.* **2022**, *12*, 7628.
https://doi.org/10.3390/app12157628

**AMA Style**

Gärtner AE, Fay T-A, Göhlich D.
Fundamental Research on Detecting Contradictions in Requirements: Taxonomy and Semi-Automated Approach. *Applied Sciences*. 2022; 12(15):7628.
https://doi.org/10.3390/app12157628

**Chicago/Turabian Style**

Gärtner, Alexander Elenga, Tu-Anh Fay, and Dietmar Göhlich.
2022. "Fundamental Research on Detecting Contradictions in Requirements: Taxonomy and Semi-Automated Approach" *Applied Sciences* 12, no. 15: 7628.
https://doi.org/10.3390/app12157628