Hello, in this article we’re gonna discuss the 3 principal parts of the expert system we’re gonna develop, the concept of propositional logic, and its operations.

# The three principal parts of the project.

The 3 principal parts of the project are:

1. The PROPCompiler, determines the structure, lexical and syntax validation of the rules from the knowledge base. The classes we’re gonna use in the PROPCompiler are: PROPNode,PROTreeBuilder, SyntaxAnalyzer, Lexical Analyzer and Translators.
2. The InferenceKernel, gives meaning to the rules by evaluating them and following paths to conclude to a set of rules, it’s composed by a workspace and an inference kernel. The workspace is primarily a set of containers used by the inference kernel , and the Inference Kernel do all the calculus to reach conclusions using sets of rules.
3. The User Interface, interacts with the user to present expert system’s processes, it’s implemented with Qt where  we define different widgets to properly show the menu, questions and list of conclusions to the user.

In the next figure, we’re illustrating the parts of our expert system:

# Propositional Logic

According to Wikipedia, propositional logic is the branch of logic concerned with the study of propositions that are formed by other propositions with the use of logical connectives, and how their value depends on the truth value of their components.

## Propositional Logic Operations

In the propositional logic, we’re gonna use a set of operations, the conjunction, disjunction, implication, bi-implication, and the negation. The next tables illustrate the truth tables.

Conjunction (&)

A B Output
0 0 0
0 1 0
1 0 0
1 1 1

Disjunction ( | )

A B Output
0 0 0
0 1 1
1 0 1
1 1 1

Implication ( -> )

A B Output
0 0 1
0 1 1
1 0 0
1 1 1

Bi-Implication ( <-> )

A B Output
0 0 1
0 1 0
1 0 0
1 1 1

So that’s it for this video, I hope you enjoy and leave a comment if you have any question.