Prolog is one of the most important candidates to build expert systems and AI-related programs and has potential applications in embedded systems. However, Prolog is not suitable to develop many kinds of components, s...Prolog is one of the most important candidates to build expert systems and AI-related programs and has potential applications in embedded systems. However, Prolog is not suitable to develop many kinds of components, such as data acquisition and task scheduling, which are also crucial. To make the best use of the advantages and bypass the disadvantages, it is attractive to integrate Prolog with programs developed by other languages. In this paper, an IPC-based method is used to integrate backward chaining inference implemented by Prolog into applications or embedded systems. A Prolog design pattern is derived from the method for reuse, whose principle and definition are provided in detail. Additionally, the design pattern is applied to a target system, which is free software, to verify its feasibility. The detailed implementation of the application is given to clarify the design pattern. The design pattern can be further applied to wide range applications and embedded systems and the method described in this paper can also be adopted for other logic programming languages.展开更多
基金supported by the National Natural Science Foundation of China (No.61304111)National Basic Research Program of China (No. 2014CB744904)Fundamental Research Funds for the Central Universities of China (Nos. YWF-14-KKX-001 and YWF-13-JQCJ)
文摘Prolog is one of the most important candidates to build expert systems and AI-related programs and has potential applications in embedded systems. However, Prolog is not suitable to develop many kinds of components, such as data acquisition and task scheduling, which are also crucial. To make the best use of the advantages and bypass the disadvantages, it is attractive to integrate Prolog with programs developed by other languages. In this paper, an IPC-based method is used to integrate backward chaining inference implemented by Prolog into applications or embedded systems. A Prolog design pattern is derived from the method for reuse, whose principle and definition are provided in detail. Additionally, the design pattern is applied to a target system, which is free software, to verify its feasibility. The detailed implementation of the application is given to clarify the design pattern. The design pattern can be further applied to wide range applications and embedded systems and the method described in this paper can also be adopted for other logic programming languages.