DA8. Applications of Logic Programming¶
Statement¶
- Conduct research using the internet and the University of the People library to determine what types of computing problems are solved most efficiently using a Logic programming language such as Prolog.
- As part of your response discuss a specific application and indicate what features within Prolog (or logic programming in general) make it ideally suited as a solution for your selected computing problem.
- For example: Prolog is ideally suited as a programming language for the artificial intelligence routines within an industrial robot because of x.
Solution¶
-
Here is a list of some of the use cases of logic programming according to (Novotny, 2023):
- Artificial Intelligence and Machine Learning: training models requires liking facts and rules together, to build useful models, then query theses models to make predictions.
- Natural Language Processing: understanding how words relate to each other requires building a knowledge base of facts and rules.
- Database Management (Non-Relational): to determine the best place to store a record according to a set of rules that govern the database and relationships between records.
- Predictive Analysis: querying a knowledge base of facts and rules to make predictions.
- Fault diagnosis: querying an object against the healthy set of other objects to determine if it is faulty.
- Pattern Matching.
- Mathematical Proofs.
-
The example that I’m discussing is a Supply Chain Optimization System, for an online retailer that wants to optimize their processes and delivery time/user satisfaction by optimizing their supply chain.
- Optimizing supply chain requires processing lots of historical data, and making predictions based on that data.
- Sometimes, making a small change in the process can have a huge impact on the overall performance of the supply chain, but to locate this small change, the logic programming paradigm is very useful.
- The facts about historical data is entered into the knowledge base, and the constraints on the process are entered as rules and relations.
- Queries can be made to the knowledge base to examine the data and make predictions about the future.
- suggested changes can be made to the process, and the knowledge base can be queried again to see if the changes have a positive impact on the performance of the supply chain.
- Features like backtracking, searching, and unification are used within the query process to make predictions and suggestions, and then examine the results of the suggestions (Jones, 1996).
- The two previous paragraphs emphasize the importance of logic programming in real world applications, and Prolog is no difference in this regard; and all the features of logic programming are available in Prolog.
References¶
- Novotny J. (2023). A Guide to Understanding Logic Programming. LiNode. https://www.linode.com/docs/guides/logic-programming-languages/
- Jones T. T. (1996). Prolog Tutorial. http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpages/index.html#menu