Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Procedural programming
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Logic programming === In [[logic programming]], a program is a set of premises, and computation is performed by attempting to prove candidate theorems. From this point of view, logic programs are [[Declarative programming|declarative]], focusing on what the problem is, rather than on how to solve it. However, the [[backward reasoning]] technique, implemented by [[SLD resolution]], used to solve problems in logic programming languages such as [[Prolog]], treats programs as goal-reduction procedures. Thus clauses of the form: :{{mono|1=H :- B<sub>1</sub>, β¦, B<sub>n</sub>.}} have a dual interpretation, both as procedures :to show/solve {{mono|1=H}}, show/solve {{mono|1=B<sub>1</sub>}} and β¦ and {{mono|1=B<sub>n</sub>}} and as logical implications: :{{mono|1=B<sub>1</sub> and β¦ and B<sub>n</sub> implies H}}. A skilled logic programmer uses the procedural interpretation to write programs that are effective and efficient, and uses the declarative interpretation to help ensure that programs are correct.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)