[2bb500]: doc / source / logic_programming / index.txt Maximize Restore History

Download this file

index.txt    60 lines (51 with data), 2.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.. $Id$
..
.. Copyright Š 2007-2008 Bruce Frederiksen
..
.. Permission is hereby granted, free of charge, to any person obtaining a copy
.. of this software and associated documentation files (the "Software"), to deal
.. in the Software without restriction, including without limitation the rights
.. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
.. copies of the Software, and to permit persons to whom the Software is
.. furnished to do so, subject to the following conditions:
..
.. The above copyright notice and this permission notice shall be included in
.. all copies or substantial portions of the Software.
..
.. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
.. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
.. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
.. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
.. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
.. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
.. THE SOFTWARE.
restindex
crumb: Logic Programming
page-description:
An tutorial on logic programming in Pyke, including *statements*,
*pattern matching* and *rules*.
/description
section-pages: , statements, pattern_matching/index, rules/index, plans
format: rest
encoding: utf8
output-encoding: utf8
include: yes
initialheaderlevel: 2
/restindex
==========================
Logic Programming Tutorial
==========================
Pyke is an inference engine that applies rules_ to facts_ to establish
additional facts (through forward-chaining_ rules), and/or to prove *goals*
and optionally assemble Python functions
into customized call graphs, called plans_ (through backward-chaining_ rules).
Pyke may then be reset_, deleting the last set of facts, so that the cycle
may be repeated. For each cycle a different rule base may be activated_.
The plan_ capability allows the postponement of code execution until the
top-level goal has been completely proven. This shields the code from
blind alleys and the backtracking_ that occurs within the rules.
Once a plan_ has been created, it may be executed multiple times with different
arguments. It may also be pickled_, and later run again only requiring one
small Pyke module.
Pyke also provides an end user question_ capability, as well as the capability
to run commands_ on the local system to guide the inferencing.