File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949; Vars and initial stuff.
5050(define dbms "sqlite3")
5151(define kb1 "example1.db")
52- (define co "prg0_0 ")
52+ (define co "prg0.1 ")
5353(define st "enabled")
5454(define v 0.0)
5555(define p 1.0)
Original file line number Diff line number Diff line change 4848; Vars and initial stuff.
4949(define dbms "sqlite3")
5050(define kb1 "example2.db")
51- (define co "prg0_0 ")
51+ (define co "prg0.1 ")
5252(define st "enabled")
5353(define v 0.0)
5454(define p 1.0)
9797; Insertion of rules.
9898(define tb3 "sde_rules")
9999; (define tb2 "sde_mem_rules") ; We would need this only if rules are stored as programs.
100- (define co "prg0_0 ") ; Standard context value to indicate that a rule always resides on sde_rules and not sde_meme_rules.
100+ (define co "prg0.1 ") ; Standard context value to indicate that a rule always resides on sde_rules and not sde_meme_rules.
101101
102102
103103; Insert rule.
179179; get confusing if the Scheme variables are named otherwise.
180180;
181181(define mode-run 1)
182-
183-
184182(kb-setup-session dbms kb1 f3)
185183(while (= mode-run 1 )
186184
206204
207205 ; And finally we get the value of item mode-run and pass it to a
208206 ; of the same name.
209- (set! mode-run (kb-get-value-from-item dbms kb1 " sde_facts" " mode-run" ))
210- )
207+ (set! mode-run (kb-get-value-from-item dbms kb1 " sde_facts" " mode-run" )))
211208
212209
213210; And then show all the facts and their values at the end of the loop.
Original file line number Diff line number Diff line change 5151; Vars and initial stuff.
5252(define dbms "sqlite3")
5353(define kb1 "example3.db")
54- (define co "prg0_0 ")
54+ (define co "prg0.1 ")
5555(define st "enabled")
5656(define v 0.0)
5757(define p 1.0)
9595(kb-insert-facts dbms kb1 tb2 co st it v p f3)
9696
9797
98+
99+
100+
98101; Now we will inser some facts that will describe the following graph:
99102;
100103; a ---- b ---- c
159162
160163; Standard context value to indicate that a rule always resides on sde_rules
161164; and not sde_meme_rules.
162- (define co "prg0_0 ")
165+ (define co "prg0.1 ")
163166
164167
165168; Insert rule.
You can’t perform that action at this time.
0 commit comments