Skip to content

Commit dd6160d

Browse files
authored
Merge pull request #9 from PESchoenberg/develop
Modified comments.
2 parents de6339a + 9f3fa8f commit dd6160d

2 files changed

Lines changed: 14 additions & 28 deletions

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ you would issue:
3333

3434
sudo mkdir /usr/share/guile/site/2.0/gexsys
3535

36-
****sudo cp *.scm -rv /usr/share/guile/site/2.0/gexsys
36+
sudo cp *.scm -rv /usr/share/guile/site/2.0/gexsys
37+
38+
or
3739

3840
sudo cp *.scm -rv /usr/local/share/guile/site/2.2/gexsys
3941

@@ -66,6 +68,8 @@ and filled with comments.
6668

6769
* URL of this project - https://github.com/PESchoenberg/gexsys.git
6870

71+
Please let me know if I forgot to add any credits or sources.
72+
6973

7074
## License:
7175

gexsys0.scm

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
; kb-df2db.
6666
; - Creating tables using "CREATE TABLE..." SQL statements and later import
6767
; your data.
68-
; - In some cases in which you will buld a system that does not use data sets
68+
; - In some cases in which you will build a system that does not use data sets
6969
; to be processed in batch, you may use just the provided data tables.
7070
;
7171
; or both after using rkbCreate(...). The knowledge base will be created on
@@ -95,23 +95,17 @@
9595
(a " ")
9696
(c " ")
9797
(d " "))
98-
9998
(if (> p_f3 0)(ptit " " 1 1 "Creating tables..."))
10099
(kb-create-sde-facts p_dbms p_kb1)
101100
(kb-create-sde-mem-facts p_dbms p_kb1)
102101
(kb-create-sde-prg-rules p_dbms p_kb1)
103102
(kb-create-sde-rules p_dbms p_kb1)
104-
105103
(if (> p_f3 0)(ptit " " 1 1 "Inserting default facts..."))
106104
(kb-insert-default-facts p_dbms p_kb1 tb1 tb2 co st p_f3)
107-
108105
(if (> p_f3 0)(ptit " " 1 1 "Inserting primary rules..."))
109106
(kb-insert-sde-rules p_dbms p_kb1 p_f3)
110-
111107
(if (> p_f3 0)(ptit " " 1 1 "Inserting secondary rules..."))
112-
(kb-insert-sde-prg-rules p_dbms p_kb1 p_f3)
113-
114-
))
108+
(kb-insert-sde-prg-rules p_dbms p_kb1 p_f3)))
115109

116110

117111
; kb-insert-sde-rules - Inserts a batch of rules into sde_rules; in order
@@ -173,9 +167,7 @@
173167
(set! c "SELECT Value FROM sde_facts WHERE Item = `counter1` AND Value = ( SELECT Value FROM sde_facts WHERE Item = `load-order-prg24` );")
174168
(set! a "UPDATE sde_facts SET Value = ( SELECT Value FROM sde_facts WHERE Item = `cur-ver-prg24` ) WHERE Item = `mode-prg-load`;")
175169
(set! d "6- Load the current version of prg24 - batch program loader.")
176-
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)
177-
178-
))
170+
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)))
179171

180172

181173
; kb-insert-sde-prg-rules - Inserts secondary rules into sde_prg_rules; in order
@@ -231,8 +223,7 @@
231223
(set! a "DELETE FROM sde_rules WHERE Context LIKE `prg24.%`;")
232224
(set! d "4- Delete prg24 once init-ok >= 2.")
233225
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)
234-
235-
226+
236227
; prg1.0 performs several init chores.
237228
(set! co "prg1.0")
238229

@@ -278,15 +269,14 @@
278269
(set! a "DELETE FROM sde_rules WHERE Context LIKE `prg1.%`;")
279270
(set! d "6- Delete prg1.")
280271
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)
281-
282272

283273
; prg2.0 is the batch purge program. It deletes from sde_rules annything
284274
; that doesn't belong to context prg0.% or itself, and after performing
285275
; those deletions, it deletes itself. This is required so that the
286276
; after deleting everything else can update the mode-prg-purge item.
287277
(set! co "prg2.0")
288278

289-
;Delete all programs that are not co if mode purge is on. **********************************************
279+
;Delete all programs that are not co if mode purge is on. **
290280
(set! c "SELECT Value FROM sde_facts WHERE Item = `mode-prg-purge` AND Value = 1;")
291281
;(set! a (strings-append (list "DELETE FROM sde_rules WHERE ( Context NOT LIKE `prg0.%` AND Context NOT LIKE `prg3.%` );") 0))
292282
(set! a "DELETE FROM sde_rules WHERE ( Context NOT LIKE `prg0.%` AND Context NOT LIKE `prg2.%` );")
@@ -316,9 +306,7 @@
316306
(set! c "SELECT Value FROM sde_facts WHERE Item = `mode-prg-purge` AND Value >= 0;")
317307
(set! a "DELETE FROM sde_rules WHERE Context LIKE `prg2.%`;")
318308
(set! d "5- Delete prg2.")
319-
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)
320-
321-
))
309+
(kb-insert-rules p_dbms p_kb1 tb co st c a d 1.0 p_f3)))
322310

323311

324312
; kb-create-sde-facts - creates table sde_facts.
@@ -448,7 +436,7 @@
448436

449437
; kb-create-sde-experiments - creates a table to hold experimental data as
450438
; a string that might later be passed to tables of the kb such as sde_facts.
451-
; ;
439+
;
452440
; Arguments:
453441
; - p_dbms: database management system to be used.
454442
; - p_kb1: knowledge base name.
@@ -599,9 +587,7 @@
599587
(kb-insert-facts p_dbms p_kb1 p_tb1 p_co p_st "load-order-prg24" 0.0 1.0 p_f3)
600588
(kb-insert-facts p_dbms p_kb1 p_tb2 p_co p_st "load-order-prg24" 2.0 1.0 p_f3)
601589
(kb-insert-facts p_dbms p_kb1 p_tb1 p_co p_st "last-exec-prg24" 0.0 1.0 p_f3)
602-
(kb-insert-facts p_dbms p_kb1 p_tb2 p_co p_st "last-exec-prg24" 0.0 1.0 p_f3)
603-
604-
)
590+
(kb-insert-facts p_dbms p_kb1 p_tb2 p_co p_st "last-exec-prg24" 0.0 1.0 p_f3))
605591

606592

607593

@@ -696,7 +682,7 @@
696682
; 'getfromnetwork'. Interaction with the database should be direct from the
697683
; external module to the kb setting status to 'getfromnetwork'. On each
698684
; iteration, data passed to the kb using this status will be 'aligned' with the
699-
; rest of the data by applying stauts 'applykbrules' to it.
685+
; rest of the data by applying status 'applykbrules' to it.
700686
;
701687
; Arguments:
702688
; - p_dbms: database management system to be used.
@@ -831,9 +817,5 @@
831817
(dbi-close db-obj)
832818
(write (dbi-get_row db-obj))
833819
(newline))))
834-
835-
836-
837-
838820

839821

0 commit comments

Comments
 (0)