Abstract
This chapter presents a brief introduction to logic programming and its application to knowledge representation for electronic circuits. We first show how circuits can be represented in terms of predicate logic. Basic concepts in logic programming such as facts, rules, and goals are introduced with circuits as examples. Next, we develop a grammatical method for circuit representation. Circuits are viewed as sentences, and their elements as words. Circuit structures are defined by a logic grammar called DCSG for word-order free languages. A set of grammar rules, when converted into Prolog clauses, forms a logic program which performs top-down parsing. Furthermore, we extend DCSG by introducing semantic terms into the grammar rules. These semantic terms define relationships between syntactic structures and their meanings. By assuming circuit functions to be the meanings of the circuit structures, knowledge of circuit structures and functions is coded into grammar rules. When a given circuit is parsed, not only its syntactic structure is determined, but also its functions are derived as meanings of the sentence. 18.1. Introduction Prolog is a programming language based on predicate logic. It is well suited for symbolic computations that handle problems between objects and their relations. Programs written in ordinary programming language define procedures to solve problems, while Prolog programs define problems themselves and relationships between objects. Prolog programs are executed by a mechanism of theorem proving. Instead of defining the procedure explicitly, solving problems with the mechanism of theorem proving is called logic programming. Using electronic circuits as examples, we introduce the basic concepts of logic programming. We first show how circuits are represented in terms of predicate logic. A given circuit is defined by a set of Prolog facts. Circuit structures are defined by Prolog rules. Finding structures in the given circuit is realized by Prolog goals. The examples presented here also show the problems and limitations of this method.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.