Logic-based Programming Language: Difference between revisions

From GM-RKB
Jump to navigation Jump to search
m (Text replacement - ". ----" to ". ----")
m (Text replacement - "<P> " to "<P> ")
 
Line 20: Line 20:
=== 2013 ===
=== 2013 ===
* http://en.wikipedia.org/wiki/Logic_programming
* http://en.wikipedia.org/wiki/Logic_programming
** '''Logic programming</B> is one of the 4 main [[programming paradigm]]s.  Its [[theory of computation]] is based on [[first order logic]]. [[Programming language]]s such as [[Prolog]] and [[Datalog]] implement [[it]].        <P>               A form of logical sentences commonly found in logic programming, but not exclusively, is the [[Horn clause]]. An example is:        <P>        ::<tt>p(X, Y)</tt> if <tt>q(X) and r(Y)</tt>        <P>        Some logic programming languages accept other logical sentences, such as the "choice" sentence in [[answer set programming]].        <P>             Logical sentences can be understood purely [[Declarative programming|declaratively]]. They can also be understood [[Procedural programming|procedurally]] as goal-reduction procedures : to solve <tt>p(X, Y)</tt>, first solve <tt>q(X)</tt>, then solve <tt>r(Y)</tt>.        <P>             The programmer can use the declarative reading of logic programs to verify their correctness. In addition, the programmer can use the known behaviour of the program executor to develop a procedural understanding of his program. This may be helpful when seeking better execution speed. However, many logically-based [[program transformation technique]]s have been developed to transform logic programs automatically and make them efficient.
** '''Logic programming</B> is one of the 4 main [[programming paradigm]]s.  Its [[theory of computation]] is based on [[first order logic]]. [[Programming language]]s such as [[Prolog]] and [[Datalog]] implement [[it]].        <P> A form of logical sentences commonly found in logic programming, but not exclusively, is the [[Horn clause]]. An example is:        <P>        ::<tt>p(X, Y)</tt> if <tt>q(X) and r(Y)</tt>        <P>        Some logic programming languages accept other logical sentences, such as the "choice" sentence in [[answer set programming]].        <P> Logical sentences can be understood purely [[Declarative programming|declaratively]]. They can also be understood [[Procedural programming|procedurally]] as goal-reduction procedures : to solve <tt>p(X, Y)</tt>, first solve <tt>q(X)</tt>, then solve <tt>r(Y)</tt>.        <P> The programmer can use the declarative reading of logic programs to verify their correctness. In addition, the programmer can use the known behaviour of the program executor to develop a procedural understanding of his program. This may be helpful when seeking better execution speed. However, many logically-based [[program transformation technique]]s have been developed to transform logic programs automatically and make them efficient.


----
----

Latest revision as of 18:19, 2 June 2024

A Logic-based Programming Language is a declarative programming language that is based on restricted forms of logic statements (e.g. horn clauses).



References

2013