~ubuntu-branches/ubuntu/wily/acl2/wily

« back to all changes in this revision

Viewing changes to books/projects/taspi/database/db.lisp

  • Committer: Package Import Robot
  • Author(s): Camm Maguire
  • Date: 2015-01-16 10:35:45 UTC
  • mfrom: (3.3.26 sid)
  • Revision ID: package-import@ubuntu.com-20150116103545-prehe9thgo79o8w8
Tags: 7.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    nil))
40
40
 
41
41
(defun good-study-table (tbl)
42
 
  ":Doc-Section TASPI
43
 
   Recognizes a well-formed study table.~/
44
 
   ~/
45
 
   "
 
42
 
 
43
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
44
;;; see projects/taspi/taspi-xdoc.lisp.
 
45
 
 
46
; ":Doc-Section TASPI
 
47
;  Recognizes a well-formed study table.~/
 
48
;  ~/
 
49
;  "
46
50
  (declare (xargs :guard t))
47
51
  (and (good-study-table-struct tbl)
48
52
       (no-dups-gen (get-ids tbl))))
49
53
 
50
54
(defun good-analysis-table (tbl)
51
 
  ":Doc-Section TASPI
52
 
   Recognizes a well-formed analysis table.~/
53
 
   ~/
54
 
   "
 
55
 
 
56
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
57
;;; see projects/taspi/taspi-xdoc.lisp.
 
58
 
 
59
; ":Doc-Section TASPI
 
60
;  Recognizes a well-formed analysis table.~/
 
61
;  ~/
 
62
;  "
55
63
  (declare (xargs :guard t))
56
64
  (and (good-analysis-table-struct tbl)
57
65
       (no-dups-gen (get-ids tbl))))
58
66
 
59
67
(defun good-tree-table (tbl)
60
 
  ":Doc-Section TASPI
61
 
   Recognizes a well-formed tree table.~/
62
 
   ~/
63
 
   "
 
68
 
 
69
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
70
;;; see projects/taspi/taspi-xdoc.lisp.
 
71
 
 
72
; ":Doc-Section TASPI
 
73
;  Recognizes a well-formed tree table.~/
 
74
;  ~/
 
75
;  "
64
76
  (declare (xargs :guard t))
65
77
  (and (good-tree-table-struct tbl)
66
78
       (no-dups-gen (get-ids tbl))))
67
79
 
68
80
(defun get-study-ids (tbl)
69
 
  ":Doc-Section TASPI
70
 
   Returns study ids present in an analysis table.~/
71
 
   ~/
72
 
   "
 
81
 
 
82
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
83
;;; see projects/taspi/taspi-xdoc.lisp.
 
84
 
 
85
; ":Doc-Section TASPI
 
86
;  Returns study ids present in an analysis table.~/
 
87
;  ~/
 
88
;  "
73
89
  (declare (xargs :guard (good-analysis-table-struct tbl)))
74
90
  (if (consp tbl)
75
91
      (cons (get-study-id (car tbl))
77
93
    nil))
78
94
 
79
95
(defun get-analysis-ids (tbl)
80
 
  ":Doc-Section TASPI
81
 
   Returns analysis ids present in a tree table.~/
82
 
   ~/
83
 
   "
 
96
 
 
97
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
98
;;; see projects/taspi/taspi-xdoc.lisp.
 
99
 
 
100
; ":Doc-Section TASPI
 
101
;  Returns analysis ids present in a tree table.~/
 
102
;  ~/
 
103
;  "
84
104
  (declare (xargs :guard (good-tree-table-struct tbl)))
85
105
  (if (consp tbl)
86
106
      (cons (get-analysis-id (car tbl))
115
135
 
116
136
;; get an entry matching primary key
117
137
(defun get-entry-by-id (id tbl)
118
 
  ":Doc-Section TASPI
119
 
   Returns entry in table indicated by given id.~/
120
 
   ~/
121
 
   Arguments:
122
 
     (1) id - a primary id
123
 
     (2) tbl - a good study, analysis or tree table
124
 
 
125
 
  "
 
138
 
 
139
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
140
;;; see projects/taspi/taspi-xdoc.lisp.
 
141
 
 
142
; ":Doc-Section TASPI
 
143
;  Returns entry in table indicated by given id.~/
 
144
;  ~/
 
145
;  Arguments:
 
146
;    (1) id - a primary id
 
147
;    (2) tbl - a good study, analysis or tree table
 
148
;
 
149
; "
126
150
  (declare (xargs :guard (or (good-study-table-struct tbl)
127
151
                             (good-analysis-table-struct tbl)
128
152
                             (good-tree-table-struct tbl))))
199
223
       (check-for-good-tree-tl analysis-tbl tree-tbl)))
200
224
 
201
225
(defun good-tree-db (study-tbl analysis-tbl tree-tbl)
202
 
  ":Doc-Section TASPI
203
 
   Recognizes a well formed and consistent set of tables.~/
204
 
   ~/
205
 
   Arguments:
206
 
     (1) study-tbl - a potential study table
207
 
     (2) analysis-tbl - a potential analysis table
208
 
     (3) tree-tbl - a potential tree table
209
 
 
210
 
   Details: Checks that primary ids are unique, ids indexing into other tables
211
 
            reference existing entries, maximum likelihood scores have an
212
 
            associated model, and that any tree in the tree table has taxa
213
 
            names present in the taxa list in the associated analysis table. " 
 
226
 
 
227
;;; Legacy doc string replaced Nov. 2014 by auto-generated defxdoc form;
 
228
;;; see projects/taspi/taspi-xdoc.lisp.
 
229
 
 
230
; ":Doc-Section TASPI
 
231
;  Recognizes a well formed and consistent set of tables.~/
 
232
;  ~/
 
233
;  Arguments:
 
234
;    (1) study-tbl - a potential study table
 
235
;    (2) analysis-tbl - a potential analysis table
 
236
;    (3) tree-tbl - a potential tree table
 
237
 
 
238
;  Details: Checks that primary ids are unique, ids indexing into other tables
 
239
;           reference existing entries, maximum likelihood scores have an
 
240
;           associated model, and that any tree in the tree table has taxa
 
241
;           names present in the taxa list in the associated analysis table. " 
214
242
  (declare (xargs :guard t))
215
243
  (and (good-study-table study-tbl)
216
244
       (good-analysis-table analysis-tbl)
871
899
            model))
872
900
  :hints (("Goal" :induct (len db))))
873
901
 
874
 
||#
 
 
b'\\ No newline at end of file'
 
902
||#