~ubuntu-branches/ubuntu/hardy/texmacs/hardy

« back to all changes in this revision

Viewing changes to TeXmacs/progs/kernel/drd/drd-test.scm

  • Committer: Bazaar Package Importer
  • Author(s): Ralf Treinen
  • Date: 2004-04-19 20:34:00 UTC
  • Revision ID: james.westby@ubuntu.com-20040419203400-g4e34ih0315wcn8v
Tags: upstream-1.0.3-R2
ImportĀ upstreamĀ versionĀ 1.0.3-R2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
3
;;
 
4
;; MODULE      : drd-test.scm
 
5
;; DESCRIPTION : examples of logical programs
 
6
;; COPYRIGHT   : (C) 2003  Joris van der Hoeven
 
7
;;
 
8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
9
;;
 
10
;; This software falls under the GNU general public license and comes WITHOUT
 
11
;; ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for details.
 
12
;; If you don't have this file, write to the Free Software Foundation, Inc.,
 
13
;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
14
;;
 
15
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
16
 
 
17
(texmacs-module (kernel drd drd-test)
 
18
  (:use (kernel drd drd-rules) (kernel drd drd-query)))
 
19
 
 
20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
21
;; Examples of rules
 
22
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
23
 
 
24
(drd-rules
 
25
  ((sun% Joris Piet))
 
26
  ((sun% Piet Opa))
 
27
  ((daughter% Geeske Opa))
 
28
  ((daughter% Jekke Opa))
 
29
  ((child% 'x 'y) (sun% 'x 'y))
 
30
  ((child% 'x 'y) (daughter% 'x 'y))
 
31
  ((descends% 'x 'y) (child% 'x 'y))
 
32
  ((descends% 'x 'z) (child% 'x 'y) (descends% 'y 'z)))
 
33
 
 
34
;; (??? (child% 'x Opa))
 
35
;; (??? (descends% 'x 'y))
 
36
;; (??? (descends% 'x 'y) (daughter% Joleen Opa))
 
37
 
 
38
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
39
;; Addional assumptions <-> creating modules
 
40
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
41
 
 
42
(drd-rules
 
43
  (assume family%) ; added to constraints for all rules below
 
44
  ((sun% Joris Piet))
 
45
  ((sun% Piet Opa))
 
46
  ((daughter% Geeske Opa))
 
47
  ((daughter% Jekke Opa))
 
48
  ((child% 'x 'y) (sun% 'x 'y))
 
49
  ((child% 'x 'y) (daughter% 'x 'y))
 
50
  ((descends% 'x 'y) (child% 'x 'y))
 
51
  ((descends% 'x 'z) (child% 'x 'y) (descends% 'y 'z)))
 
52
 
 
53
;; (??? (child% 'x Opa))
 
54
;; (??? (child% 'x Opa) family%)