Is your enterprise capitalizing on this year’s biggest trends? Evaluate your competitive edge with the 2022 Virtusa Trend Almanac. View report
Logic programming is a programming paradigm that is based on logic. This means that a logic programming language has sentences that follow logic, so that they express facts and rules. Computation using logic programming is done by making logical inferences based on all available data. In order for computer programs to make use of logic programming, there must be a base of existing logic, called predicates. Predicates are used to build atomic formulas or atoms, which state true facts. Predicates and atoms are used to create formulas and perform queries. Logic languages most often rely on queries in order to display relevant data. These queries can exist as part of machine learning, which can be run without the need for manual intervention.
There are multiple different logic programming languages. The most common language, Prolog (from the French programmation en logique, or programming in logic), can also interface with other programming languages such as Java and C. On top of being the most popular logic programming language, Prolog was also one of the first such languages, with the first prolog program created in the 1970s for use with interpretations. Prolog was developed using first-order logic, also called predicate logic, which allows for the use of variables rather than propositions. Prolog utilizes artificial intelligence (AI) to help form its conclusions and can quickly process large amounts of data. Prolog can be run with or without manual inputs, meaning in it can be programmed to run automatically as part of data processing.
Logic programming, and especially Prolog, can help businesses and organizations through: