# A Comprehensive Survey on Knowledge-Defined Networking
## 3 Knowledge Plane
### Knowledge Composition Plane
#### 3.4.2 Rule Generation  
Note that, as evident from Figure 3, the knowledge composition plane responds to users'/ applications' demands by comparing users'/applications' demands with the composed knowledge to produce new rules to be used by other planes (application, control, and management). The user's intent can appear as the user's objective and operation, which can be expressed using a high-level declarative language such as Structured Query Language (SQL) and conveyed to the knowledge plane using an API [25]. For example, if the composed knowledge appears as the network congestion values of links in the network, the network administrator may set a network congestion threshold value to be compared with the composed knowledge in the form of a network congestion value in order to produce a rule that instructs nodes to increase their energy utilization if the network congestion is greater than the threshold. In this example, note that the users' objective is to control network congestion, while the users' operation is to control energy utilization. The operation will be triggered in order to achieve the desired objective. However, applications'/users' objectives and operations could be high-level and complicated, unlike in the specified example given above. Therefore, these need to be parsed and converted to multiple decomposed elements to be processed by the rule generator, as shown in Figure 3. Then, composed knowledge and the users' intent will be orchestrated to produce rules by the rule generator. Note that the outputs of the knowledge composition plane are rules that can be directly used by other planes without further processing and composed knowledge that can be stored in the knowledge distribution plane and provided to application, management, and control planes as required.  
Typically, a rule generator can be implemented as a heuristic model with the aid of a programming language such as Java, Python, Lisp, Prolog, etc. However, a machine learning model can also serve the purpose of a rule generator by being appropriately trained to generate rules. However, the rules generated by a ML model are required to be translated into a rule language using natural language processing [208].  
There should be a language for the rules generated by the rule generator in order for the rules to be understandable by other planes, such as the control plane. The generated rules can be represented in a dedicated rule language such as Rule Markup Language (RuleML) or Semantic Web Rule Language (SWRL). RuleML is a markup language used for representing rules in a machine-readable format. It allows users to express rules in a standardized way, making it easier to exchange rules between different rule engines and systems. RuleML also provides a set of tools and APIs for working with rule-based systems [209]. Semantic Web Rule Language (SWRL) is a rule language that is used to express rules and constraints and is based on a combination of OWL and RuleML. SWRL allows for the creation of rules that can be expressed in a natural language-like syntax and can be used to represent complex logical relationships between entities. One advantage of SWRL over other rule languages is that it has been designed to be compatible with RDF and OWL, so that generated rules can be utilized in combination with knowledge represented in those formats [210]. Another promising candidate for representing rules is the Rule Interchange Format (RIF). RIF is a language that was developed by the World Wide Web Consortium (W3C) to create a common rule language that can be used by different rule systems to exchange rules. RIF can be used to exchange rules between the control, application, and management planes and the knowledge plane in a knowledge-defined network [211].