Department of Computing Faculty of Engineering, Science and Technology (FEST) Indus University, Karachi ASSIGNMENT NO: 4 Formal Method Name: Muhammad Fahad Students I.D: 425-2019 Subject: Formal Method Date of submission: ____________ Submitted to: Sir Ramzan Teachers Sig:____________ Q 1. Rule-based systems (RBS) RULE-BASED SYSTEM The term "rule-based system" refers to systems that have rule sets that have been handcrafted or curated by humans. This system type usually excludes rule-based systems that use automatic rule inference, such as rule-based machine learning. A rule-based system is used in computer science to store and manipulate knowledge in order to understand data in un usable way. It's frequently utilized in artificial intelligence research and applications. Q 2. Components of Rule-based systems COMPONENTS A typical rule-based system has four basic components:[3] 1. A list of rules or rule base, which is a specific type of knowledge base. 2. Based on the interplay of input and the rule base, an inference engine or semantic reasoner infers knowledge or takes action. The following match-resolve-act cycle is used by the interpreter to run a production system program. Match: In this first phase, the left-hand sides of all productions are matched against the contents of working memory. As a result a conflict set is obtained, which consists of instantiations of all satisfied productions. An instantiation of a production is an ordered list of working memory elements that satisfies the left-hand side of the production. Conflict-Resolution: In this second phase, one of the production instantiations in the conflict set is chosen for execution. If no productions are satisfied, the interpreter halts. Act: In this third phase, the actions of the production selected in the conflict-resolution phase are executed. These actions may change the contents of working memory. At the end of this phase, execution returns to the first phase. 3. Temporary working memory. 4. A user interface or other connection to the outside world through which input and output signals are received and sent.