# SENSE: A Flow-Down Semantics-Based Requirements Engineering Framework
## 3 SENSE Methodology
### Boilerplates and Recommendations  
Moving to the next step, SENSE proposes appropriate boilerplates depending on the type of requirement, the system and the framework in which it is included. In other words, the system provides non-binding recommendations, taking advantage of the information and relationships recorded in the ontology as well as those given by the user to the boilerplate. Hence, specialized recommendations are made. The approach combines two methods, namely controlled natural language (boilerplates) and phrasal semantic parsing (Apache Jena 22, ontology). Jena is an open-source Java framework for building Semantic Web applications. It provides an API and extensive Java libraries that support programmers in extracting data from and writing to RDF graphs. Jena provides support for RDF, RDFS, RDFFa, and OWL. Additionally, the extracted graphs that are represented as abstract models can be queried using SPARQL. Hence, Jena includes a rule-based inference engine to perform reasoning based on OWL and RDFS ontologies, and a variety of storage strategies to store RDF triples in memory or on disk. Of course, Jena is not a direct natural language processing (NLP) tool. This is because the notion of semantics of Semantic Web is not exactly the same as the notion of semantics used in natural-language processing. Yet, in this approach, Jena is used to develop a natural-language processor that emits data as RDF and then performs queries upon them. There are APIs and tools such as GATE 23 that are more oriented to NLP methodologies, and it is our intention to study them in the future, providing alternative functionality for the proposed framework. At the present version of the SENSE framework, when the user writes a boilerplate (requirement in natural language), the system performs partial semantic analysis using Jena upon the knowledge base (ontology), proposing the closest semantics. Recommendations refer either to similar terms (general recommendations), e.g., \"notebook\" of Shopy ontology is connected to \"laptop\" via symmetric object property (isSynonymOf) or to the requirement categorization (specialized recommendations). At run-time, via the Jena reasoning mechanism, the requirement that is entered is dynamically categorized. The aim is to support engineers when writing clauses and to improve the quality of the boilerplate by combining the categorization of the requirements with the rest of the information. For instance, the basic types of requirements are usually related to functional, performance, interface, design, and construction issues. Each of these categories has subcategories and clear specifications on how and what the requirements should be in the subsector. A \begin{table}
\begin{tabular}{l} \hline \(<\)subject\(>::=\) system-function \\ \(<\)entity\(>::=\)\(<\)simple entity\(>\)\(|\)\(<\)simple entity\(>\)\(<\)reposition\(>\)\(<\)entity\(>\) \\ \(<\)preposition\(>::=\) to \(|\) in \(|\) on \(|\) from \(|\) with \(|\) without \(|\) between \(|\) among \\ \(<\)action\(>::=\)\(<\)simple action\(>\)\(|\)\(<\)simple action\(>\)\(<\)preposition\(>\)\(<\)action\(>\) \\ \(<\)state\(>::=\)\(<\)entity\(>\) mode \\ \(<\)event\(>::=\)\(<\)entity\(>\)\(<\)action\(>\) \\ \hline \end{tabular}
\end{table} 
Table 6: Boilerplate Grammar Rules. typical example is the storage requirement, which is a basic requirement in the category of the functional requirements for the development of systems such as the ATM network. In this context, as soon as the user starts writing a functional clause, the framework extracts through reasoning the knowledge that storage space is required and informs the user (maintainer) about it with a message. The approach is based on the following common semantic distance metric [21] that assesses the similarity between a given pair of terms by calculating the (shortest) distance between the nodes corresponding to these terms in the ontology hierarchy.