8. BoolPy: Using Python for Symbolic Boolean Algebra Simplification

Audience level:
March 11th 8:35 a.m. – 8:40 a.m.


BoolPy is a Python module that iteratively simplifies Boolean Algebra expressions according to the Boolean Theorems. The purpose of this talk is twofold: (1) To present the details of an Object-Oriented solution to the symbolic computing problem and (2) to present the BoolPy module as a useful classroom tool for teaching Boolean Algebra in college-level mathematics and computer science courses.


Full Abstract

Computer Science (CS) students normally take a course in Digital Logic during the second year of the CS education. The study of Boolean Algebra and its relationship to combinational logic circuit description is a major part of that course. A study of the "Boolean Theorems," which are rules that define the behavior of Boolean algebra operators, is part of the coursework. These rules can be used to algebraically simplify the equation of a circuit. A solid understanding of Boolean Algebra concepts is likewise needed to understand the more complicated aspects of combinational logic circuits. Additionally, students taking college-level mathematics and philosophy courses typically study Boolean Algebra.

An interactive program that displays the steps in the simplification of Boolean Algebra expressions would aid in the students' understanding. The Object-Oriented-Design (OOD) paradigm will be used to implement such a program. A well-designed class hierarchy can represent the parts of a Boolean Algebra expression. These include Symbols, AND expressions, and OR expressions. Classes representing these parts are organized in a sub-class hierarchy.

A properly organized hierarchy would allow for the Boolean Theorems to be expressed using the principles of inheritance and operator overloading. A common convention in Boolean Algebra is using the '+' and '*' signs to represent OR and AND, respectively. The interactions between Boolean objects are specified by how each object should behave as an operand of these operators.