Segmentation fault executing clips test suite on Ubuntu Linux

250 views
Skip to first unread message

BenT

unread,
Dec 13, 2010, 2:48:20 PM12/13/10
to CLIPSESG
Hello,

I am getting a segmentation fault with clips running the following
test suite. I have attached the output and a copy of the strace
output.

Any assistance would be appreciated.

Ben

System:

btomasini@btomasini-desktop:~/svn.sf/clipsrules/test_suite$ uname -a
Linux btomasini-desktop 2.6.35-22-generic-pae #35-Ubuntu SMP Sat Oct
16 22:16:51 UTC 2010 i686 GNU/Linux

Program Output:

btomasini@btomasini-desktop:~/svn.sf/clipsrules/test_suite$ strace -o
strace.out clips
CLIPS (V6.24 06/15/06)
CLIPS> (batch "drtest07.bat")
TRUE
CLIPS> (clear) ; DR0602
CLIPS> (subset (mv-append bar) ; DR0602
(mv-append "bar")) ; DR0602 - FALSE
FALSE
CLIPS> (member fox (mv-append "fox")) ; DR0602 - FALSE
FALSE
CLIPS> (clear) ; DR0604
CLIPS> (defrule foo => (assert (x))) ; DR0604
CLIPS> (bsave "Temp//foo.bin") ; DR0604
TRUE
CLIPS> (clear) ; DR0604
CLIPS> (defrule bar => (assert (y))) ; DR0604
CLIPS> (bsave "Temp//bar.bin") ; DR0604
TRUE
CLIPS> (clear) ; DR0604
CLIPS> (bload "Temp//foo.bin") ; DR0604
TRUE
CLIPS> (reset) ; DR0604
CLIPS> (run) ; DR0604
CLIPS> (facts) ; DR0604
f-0 (initial-fact)
f-1 (x)
For a total of 2 facts.
CLIPS> (bload "Temp//bar.bin") ; DR0604
TRUE
CLIPS> (reset) ; DR0604
CLIPS> (run) ; DR0604
CLIPS> (facts) ; DR0604
f-0 (initial-fact)
f-1 (y)
For a total of 2 facts.
CLIPS> (clear) ; DR0606
CLIPS>
(defrule blah ; DR0606
=> ; DR0606
(bsave "Temp//me.bin") ; DR0606
(bload "Temp//me.bin")) ; DR0606
CLIPS> (reset) ; DR0606
CLIPS> (run) ; DR0606
The CLIPS environment could not be cleared.
Binary load cannot continue.
CLIPS> (tan (deg-rad 270)) ; DR0609 - Error
[EMATHFUN3] Singularity at asymptote in tan function.
0.0
CLIPS> (sec (deg-rad 270)) ; DR0609 - Error
[EMATHFUN3] Singularity at asymptote in sec function.
0.0
CLIPS> (clear) ; DR0610
CLIPS> (progn (release-mem) TRUE) ; DR0610
TRUE
CLIPS> (deffunction foo ($?x) ?x ?x FALSE)
CLIPS> (foo a b c d e) ; DR0610
FALSE
CLIPS> (clear) ; DR0610
CLIPS> (progn (release-mem) TRUE) ; DR0610 - Memory Loss
TRUE
CLIPS> (clear) ; DR0612
CLIPS> (release-mem) ; DR0612
1505
CLIPS> (defrule x (not (a)) =>) ; DR0612
CLIPS> (clear) ; DR0612
CLIPS> (progn (release-mem) TRUE) ; DR0612 - Memory Loss
TRUE
CLIPS> (clear) ; DR0613
CLIPS> (release-mem) ; DR0613
1505
CLIPS> (defrule x (not (a)) (not (b)) =>)
CLIPS> (clear) ; DR0613
CLIPS> (progn (release-mem) TRUE) ; DR0613 - Memory Loss
TRUE
CLIPS> (clear) ; DR0614
CLIPS> (release-mem) ; DR0614
1505
CLIPS> (defglobal ?*x* = 3) ; DR0614
CLIPS> (defglobal ?*x* = 4) ; DR0614
CLIPS> (clear) ; DR0614
CLIPS> (progn (release-mem) TRUE) ; DR0614 - Memory Loss
TRUE
CLIPS> (clear) ; DR0615
CLIPS> (release-mem) ; DR0615
1505
CLIPS> (deftemplate x (multifield y) (multifield y))

[PRNTUTIL5] The slot y has already been parsed.

ERROR:
(deftemplate MAIN::x
(multifield y)
(multifield y
CLIPS> (clear) ; DR0615
CLIPS> (progn (release-mem) TRUE) ; DR0615 - Memory Loss
TRUE
CLIPS> (clear) ; DR0616
CLIPS> (release-mem) ; DR0616
1505
CLIPS> (any-instancep ((?a OBJECT) (?a OBJECT)) TRUE)
[INSQYPSR1] Duplicate instance member variable name in function any-
instancep.
CLIPS> (clear) ; DR0616
CLIPS> (progn (release-mem) TRUE) ; DR0616 - Memory Loss
TRUE
CLIPS> (clear) ; DR0617
CLIPS> (release-mem) ; DR0617
1505
CLIPS> (bind ?a 3) ; DR0617
3
CLIPS> (clear) ; DR0617
CLIPS> (progn (release-mem) TRUE) ; DR0617 - Memory Loss
TRUE
CLIPS> (clear) ; DR0619
CLIPS> (str-explode "") ; DR0619
()
CLIPS> (deftemplate foo (field x) (field y))
CLIPS> (str-explode "foo") ; DR0619
(foo)
CLIPS> (format t "%s" ; DR0621
"The allowed-values attribute cannot be used in conjunction with
other value restriction attributes")
The allowed-values attribute cannot be used in conjunction with
other value restriction attributes"The allowed-
values attribute cannot be used in conjunction with
other value restriction attributes"
CLIPS> (clear) ; DR0623
CLIPS> (defclass A (is-a USER) (role abstract)
(multislot foo (create-accessor read-write)))
CLIPS> (defclass B (is-a A) ; DR0623
(slot foo (propagation no-inherit) (storage shared) (create-
accessor read-write)))
CLIPS> (defclass C (is-a B) ; DR0623
(slot foo (source composite) (access read-only) (create-accessor
read)))
CLIPS> (describe-class C) ; DR0623
================================================================================
********************************************************************************
Abstract: direct instances of this class cannot be created.

Direct Superclasses: B
Inheritance Precedence: C B A USER OBJECT
Direct Subclasses:
--------------------------------------------------------------------------------
SLOTS : FLD DEF PRP ACC STO MCH SRC VIS CRT OVRD-MSG SOURCE(S)
foo : MLT STC INH R SHR RCT CMP PRV R NIL A C

Constraint information for slots:

SLOTS : SYM STR INN INA EXA FTA INT FLT
foo : + + + + + + + + RNG:[-oo..+oo] CRD:[0..+oo]
--------------------------------------------------------------------------------
Recognized message-handlers:
init primary in class USER
delete primary in class USER
create primary in class USER
print primary in class USER
direct-modify primary in class USER
message-modify primary in class USER
direct-duplicate primary in class USER
message-duplicate primary in class USER
get-foo primary in class A
put-foo primary in class A
get-foo primary in class B
put-foo primary in class B
get-foo primary in class C
********************************************************************************
================================================================================
CLIPS> (clear) ; DR0625
CLIPS> (progn (release-mem) TRUE) ; DR0625
TRUE
CLIPS> (deftemplate a (field one)) ; DR0625
CLIPS> (defrule a ; DR0625
?f1 <- (a (one two three))
=>)

[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate
patterns.

ERROR:
(defrule MAIN::a
?f1 <- (a (one two three
CLIPS> (clear) ; DR0625
CLIPS> (progn (release-mem) TRUE) ; DR0625 - Memory Loss
TRUE
CLIPS> (clear) ; DR0626
CLIPS> (deffacts one ; DR0626
(first =(assert let's see))) ; DR0626 - Bad PPForm

[PRNTUTIL2] Syntax Error: Check appropriate syntax for RHS patterns.

ERROR:
(deffacts MAIN::one
(first =(assert let's
CLIPS> (clear) ; DR0627
CLIPS> (deftemplate a (field one)) ; DR0627
CLIPS> (defrule a ; DR0627
?f1 <- (a (one two three)) ; DR0627
=> ; DR0627
(assert (not good))) ; DR0627

[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate
patterns.

ERROR:
(defrule MAIN::a
?f1 <- (a (one two three
CLIPS> (clear) ; DR0628
CLIPS> (defmethod foo (?a)) ; DR0628
CLIPS> (defmethod foo ((?a NUMBER))) ; DR0628
CLIPS> (defmethod foo ((?a INTEGER FLOAT)))
CLIPS> (list-defmethods) ; DR0628 - Check Precedence
foo #3 (INTEGER FLOAT)
foo #2 (NUMBER)
foo #1 ()
For a total of 3 methods.
CLIPS> (clear) ; DR0629
CLIPS> (defclass A (is-a USER) ; DR0629
(role concrete)
(multislot foo (default a) (create-accessor read-write)))
CLIPS> (deffunction foo (?ins) ; DR0629
(bind ?a (send ?ins get-foo))
(printout t ?a " ")
(printout t (send ?ins get-foo) " ")
(mv-slot-replace ?ins foo 1 1 1)
(printout t ?a " ")
(printout t (send ?ins get-foo) crlf))
CLIPS> (make-instance a of A) ; DR0629
[a]
CLIPS> (foo [a]) ; DR0629 - (a) (a) (a) (1)
(a) (a) (a) (1)
CLIPS> (clear) ; DR0630
CLIPS> (defrule blah ; DR0630
?f <- (i-f)
(test (progn (retract ?f) TRUE))
=>)
CLIPS> (assert (i-f)) ; DR0630

[FACTMNGR1] Facts may not be retracted during pattern-matching
<Fact-0>
CLIPS> (facts) ; DR0630
f-0 (i-f)
For a total of 1 fact.
CLIPS> (agenda) ; DR0630
0 blah: f-0
For a total of 1 activation.
CLIPS> (clear) ; DR0630
CLIPS> (assert (i-f)) ; DR0630
<Fact-0>
CLIPS> (defrule blah ; DR0630
?f <- (i-f)
(test (progn (retract ?f) TRUE))
=>)
CLIPS> (facts) ; DR0630
CLIPS> (agenda) ; DR0630
0 blah: Segmentation fault

Strace output:

execve("/usr/bin/clips", ["clips"], [/* 39 vars */]) = 0
brk(0) = 0x8d36000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78af000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=59128, ...}) = 0
mmap2(NULL, 59128, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb78a0000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2604\0\0004\0\0\0"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0644, st_size=149392, ...}) = 0
mmap2(NULL, 151680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb787a000
mmap2(0xb789e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x23) = 0xb789e000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libncurses.so.5", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220\224\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=227864, ...}) = 0
mmap2(NULL, 231632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7841000
mmap2(0xb7877000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x35) = 0xb7877000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\30\0\0004\0\0\0"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30684, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7840000
mmap2(NULL, 33364, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7837000
mmap2(0xb783e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x6) = 0xb783e000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/usr/lib/libclips.so.6", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\311\1\0004\0\0\0"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=845040, ...}) = 0
mmap2(NULL, 843856, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7768000
mmap2(0xb7834000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0xcc) = 0xb7834000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@n
\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1421892, ...}) = 0
mmap2(NULL, 1431976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb760a000
mprotect(0xb7761000, 4096, PROT_NONE) = 0
mmap2(0xb7762000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x157) = 0xb7762000
mmap2(0xb7765000, 10664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0xb7765000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\n
\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9736, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7606000
mmap2(0xb7608000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x1) = 0xb7608000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360L
\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=121578, ...}) = 0
mmap2(NULL, 102920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb75ec000
mprotect(0xb7601000, 4096, PROT_NONE) = 0
mmap2(0xb7602000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x15) = 0xb7602000
mmap2(0xb7604000, 4616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0xb7604000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb75eb000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb75ea000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb75ea6c0, limit:
1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
mprotect(0xb7602000, 4096, PROT_READ) = 0
mprotect(0xb7608000, 4096, PROT_READ) = 0
mprotect(0xb7762000, 8192, PROT_READ) = 0
mprotect(0xb783e000, 4096, PROT_READ) = 0
mprotect(0xb7877000, 8192, PROT_READ) = 0
mprotect(0xb789e000, 4096, PROT_READ) = 0
mprotect(0xb78ce000, 4096, PROT_READ) = 0
munmap(0xb78a0000, 59128) = 0
set_tid_address(0xb75ea728) = 3526
set_robust_list(0xb75ea730, 0xc) = 0
futex(0xbff31310, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbff31310, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
NULL, bff31320) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb75f06e0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb75f0bc0, [], SA_RESTART|SA_SIGINFO}, NULL,
8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY})
= 0
uname({sys="Linux", node="btomasini-desktop", ...}) = 0
brk(0) = 0x8d36000
brk(0x8d57000) = 0x8d57000
mmap2(NULL, 258048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0xb75ab000
brk(0x8d78000) = 0x8d78000
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ae000
write(1, " CLIPS (V6.24 06/15/06)\n", 32) = 32
write(1, "CLIPS> ", 7) = 7
fstat64(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ad000
read(0, "(batch \"drtest07.bat\")\n", 1024) = 23
open("drtest07.bat", O_RDONLY) = 3
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
fstat64(3, {st_mode=S_IFREG|0644, st_size=16333, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ac000
read(3, "(clear) "..., 4096) = 4096
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(subset (mv-append bar) "..., 44) = 44
write(1, " (mv-append \"bar\")) "..., 52) = 52
write(1, "FALSE", 5) = 5
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(member fox (mv-append \"fox\")) "..., 52) = 52
write(1, "FALSE", 5) = 5
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule foo => (assert (x))) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(bsave \"Temp//foo.bin\") "..., 44) = 44
open("Temp//foo.bin", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
write(4, "\1\2\3\4CLIPS\0V6.20\0\v\0\0\0\233\0\0\0(message"..., 3767)
= 3767
close(4) = 0
munmap(0xb78ab000, 4096) = 0
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule bar => (assert (y))) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(bsave \"Temp//bar.bin\") "..., 44) = 44
open("Temp//bar.bin", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
write(4, "\1\2\3\4CLIPS\0V6.20\0\v\0\0\0\233\0\0\0(message"..., 3767)
= 3767
close(4) = 0
munmap(0xb78ab000, 4096) = 0
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(bload \"Temp//foo.bin\") "..., 44) = 44
open("Temp//foo.bin", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=3767, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
read(4, "\1\2\3\4CLIPS\0V6.20\0\v\0\0\0\233\0\0\0(message"..., 4096) =
3767
close(4) = 0
munmap(0xb78ab000, 4096) = 0
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(reset) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(run) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(facts) "..., 44) = 44
write(1, "f-0 ", 8) = 8
write(1, "(", 1) = 1
write(1, "initial-fact", 12) = 12
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "f-1 ", 8) = 8
write(1, "(", 1) = 1
write(1, "x", 1) = 1
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "For a total of ", 15) = 15
write(1, "2", 1) = 1
write(1, " ", 1) = 1
write(1, "facts", 5) = 5
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(bload \"Temp//bar.bin\") "..., 44) = 44
open("Temp//bar.bin", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=3767, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
read(4, "\1\2\3\4CLIPS\0V6.20\0\v\0\0\0\233\0\0\0(message"..., 4096) =
3767
close(4) = 0
munmap(0xb78ab000, 4096) = 0
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(reset) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(run) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(facts) "..., 44) = 44
write(1, "f-0 ", 8) = 8
write(1, "(", 1) = 1
write(1, "initial-fact", 12) = 12
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "f-1 ", 8) = 8
write(1, "(", 1) = 1
write(1, "y", 1) = 1
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "For a total of ", 15) = 15
write(1, "2", 1) = 1
write(1, " ", 1) = 1
write(1, "facts", 5) = 5
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "\n", 1) = 1
write(1, "(defrule blah "..., 51) = 51
write(1, " => "..., 51) = 51
write(1, " (bsave \"Temp//me.bin\") "..., 51) = 51
write(1, " (bload \"Temp//me.bin\")) "..., 51) = 51
write(1, "CLIPS> ", 7) = 7
write(1, "(reset) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(run) "..., 44) = 44
open("Temp//me.bin", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
write(4, "\1\2\3\4CLIPS\0V6.20\0\r\0\0\0\247\0\0\0(message"..., 3781)
= 3781
close(4) = 0
munmap(0xb78ab000, 4096) = 0
open("Temp//me.bin", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=3781, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb78ab000
read(4, "\1\2\3\4CLIPS\0V6.20\0\r\0\0\0\247\0\0\0(message"..., 4096) =
3781
close(4) = 0
munmap(0xb78ab000, 4096) = 0
write(1, "The ", 4) = 4
write(1, "CLIPS", 5) = 5
write(1, " environment could not be cleare"..., 35) = 35
write(1, "Binary load cannot continue.\n", 29) = 29
write(1, "CLIPS> ", 7) = 7
write(1, "(tan (deg-rad 270)) "..., 52) = 52
write(1, "[", 1) = 1
write(1, "EMATHFUN", 8) = 8
write(1, "3", 1) = 1
write(1, "] ", 2) = 2
write(1, "Singularity at asymptote in ", 28) = 28
write(1, "tan", 3) = 3
write(1, " function.\n", 11) = 11
write(1, "0.0", 3) = 3
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(sec (deg-rad 270)) "..., 52) = 52
write(1, "[", 1) = 1
write(1, "EMATHFUN", 8) = 8
write(1, "3", 1) = 1
write(1, "] ", 2) = 2
write(1, "Singularity at asymptote in ", 28) = 28
write(1, "sec", 3) = 3
write(1, " function.\n", 11) = 11
write(1, "0.0", 3) = 3
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 44) = 44
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(deffunction foo ($?x) ?x ?x FAL"..., 36) = 36
write(1, "CLIPS> ", 7) = 7
write(1, "(foo a b c d e) "..., 44) = 44
write(1, "FALSE", 5) = 5
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule x (not (a)) =>) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule x (not (a)) (not (b)) "..., 37) = 37
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(defglobal ?*x* = 3) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defglobal ?*x* = 4) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(deftemplate x (multifield y) (m"..., 46) = 46
write(1, "\n", 1) = 1
write(1, "[", 1) = 1
write(1, "PRNTUTIL", 8) = 8
write(1, "5", 1) = 1
write(1, "] ", 2) = 2
write(1, "The ", 4) = 4
write(1, "slot ", 5) = 5
write(1, "y", 1) = 1
write(1, " has already been parsed.\n", 26) = 26
write(1, "\nERROR:\n", 8) = 8
write(1, "(deftemplate MAIN::x\n (multifi"..., 39) = 39
write(1, " (multifield y", 16) = 16
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(any-instancep ((?a OBJECT) (?a "..., 47) = 47
write(1, "[", 1) = 1
write(1, "INSQYPSR", 8) = 8
write(1, "1", 1) = 1
write(1, "] ", 2) = 2
write(1, "Duplicate instance member variab"..., 52) = 52
write(1, "any-instancep", 13) = 13
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(release-mem) "..., 44) = 44
write(1, "1505", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(bind ?a 3) "..., 44) = 44
write(1, "3", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(str-explode \"\") "..., 44) = 44
write(1, "(", 1) = 1
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(deftemplate foo (field x) (fiel"..., 38) = 38
write(1, "CLIPS> ", 7) = 7
write(1, "(str-explode \"foo\") "..., 44) = 44
write(1, "(", 1) = 1
write(1, "foo", 3) = 3
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(format t \"%s\" "..., 44) = 44
write(1, " \"The allowed-values attribute"..., 68) = 68
write(1, " other valu"..., 59) = 59
write(1, "The allowed-values attribute can"..., 64) = 64
write(1, " other valu"..., 56) = 56
write(1, "\"", 1) = 1
write(1, "The allowed-values attribute can"..., 64) = 64
write(1, " other valu"..., 56) = 56
write(1, "\"", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defclass A (is-a USER) (role ab"..., 40) = 40
write(1, " (multislot foo (create-access"..., 49) = 49
write(1, "CLIPS> ", 7) = 7
write(1, "(defclass B (is-a A) "..., 44) = 44
write(1, " (slot foo (propagation no-inh"..., 86) = 86
write(1, "CLIPS> ", 7) = 7
write(1, "(defclass C (is-a B) "..., 44) = 44
write(1, " (slot foo (source composite) "..., 76) = 76
write(1, "CLIPS> ", 7) = 7
write(1, "(describe-class C) "..., 44) = 44
write(1, "================================"..., 81) = 81
write(1, "********************************"..., 81) = 81
write(1, "Abstract: direct instances of th"..., 61) = 61
write(1, "Direct Superclasses:", 20) = 20
write(1, " ", 1) = 1
write(1, "B", 1) = 1
write(1, "\n", 1) = 1
write(1, "Inheritance Precedence:", 23) = 23
write(1, " ", 1) = 1
write(1, "C", 1) = 1
write(1, " ", 1) = 1
write(1, "B", 1) = 1
write(1, " ", 1) = 1
write(1, "A", 1) = 1
write(1, " ", 1) = 1
write(1, "USER", 4) = 4
write(1, " ", 1) = 1
write(1, "OBJECT", 6) = 6
write(1, "\n", 1) = 1
write(1, "Direct Subclasses:", 18) = 18
write(1, "\n", 1) = 1
write(1, "--------------------------------"..., 81) = 81
write(1, "SLOTS : FLD DEF PRP ACC STO MCH "..., 44) = 44
write(1, "OVRD-MSG ", 9) = 9
write(1, "SOURCE(S)\n", 10) = 10
write(1, "foo : MLT STC INH R SHR RCT "..., 44) = 44
write(1, "NIL ", 9) = 9
write(1, "A", 1) = 1
write(1, " ", 1) = 1
write(1, "C", 1) = 1
write(1, "\n", 1) = 1
write(1, "\nConstraint information for slot"..., 36) = 36
write(1, "SLOTS : SYM STR INN INA EXA FTA "..., 40) = 40
write(1, "foo : + + + + + + "..., 68) = 68
write(1, "--------------------------------"..., 81) = 81
write(1, "Recognized message-handlers:\n", 29) = 29
write(1, "init", 4) = 4
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "delete", 6) = 6
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "create", 6) = 6
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "print", 5) = 5
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "direct-modify", 13) = 13
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "message-modify", 14) = 14
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "direct-duplicate", 16) = 16
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "message-duplicate", 17) = 17
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "USER", 4) = 4
write(1, "\n", 1) = 1
write(1, "get-foo", 7) = 7
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "A", 1) = 1
write(1, "\n", 1) = 1
write(1, "put-foo", 7) = 7
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "A", 1) = 1
write(1, "\n", 1) = 1
write(1, "get-foo", 7) = 7
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "B", 1) = 1
write(1, "\n", 1) = 1
write(1, "put-foo", 7) = 7
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "B", 1) = 1
write(1, "\n", 1) = 1
write(1, "get-foo", 7) = 7
write(1, " ", 1) = 1
write(1, "primary", 7) = 7
write(1, " in class ", 10) = 10
write(1, "C", 1) = 1
write(1, "\n", 1) = 1
write(1, "********************************"..., 81) = 81
write(1, "================================"..., 81) = 81
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 44) = 44
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(deftemplate a (field one)) "..., 45) = 45
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule a "..., 44) = 44
write(1, " ?f1 <- (a (one two three))\n", 30) = 30
write(1, " =>)\n", 7) = 7
write(1, "\n", 1) = 1
write(1, "[", 1) = 1
write(1, "PRNTUTIL", 8) = 8
write(1, "2", 1) = 1
write(1, "] ", 2) = 2
write(1, "Syntax Error", 12) = 12
write(1, ": Check appropriate syntax for ", 32) = 32
write(1, "deftemplate patterns", 20) = 20
write(1, ".\n", 2) = 2
write(1, "\nERROR:\n", 8) = 8
write(1, "(defrule MAIN::a\n", 17) = 17
write(1, " ?f1 <- (a (one two three", 27) = 27
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(progn (release-mem) TRUE) "..., 58) = 58
write(1, "TRUE", 4) = 4
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
read(3, "ear) "..., 4096) = 4096
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(deffacts one "..., 44) = 44
write(1, " (first =(assert let's see))) "..., 57) = 57
write(1, "\n", 1) = 1
write(1, "[", 1) = 1
write(1, "PRNTUTIL", 8) = 8
write(1, "2", 1) = 1
write(1, "] ", 2) = 2
write(1, "Syntax Error", 12) = 12
write(1, ": Check appropriate syntax for ", 32) = 32
write(1, "RHS patterns", 12) = 12
write(1, ".\n", 2) = 2
write(1, "\nERROR:\n", 8) = 8
write(1, "(deffacts MAIN::one\n", 20) = 20
write(1, " (first =(assert let's", 24) = 24
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(deftemplate a (field one)) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule a "..., 44) = 44
write(1, " ?f1 <- (a (one two three)) "..., 44) = 44
write(1, " => "..., 44) = 44
write(1, " (assert (not good))) "..., 44) = 44
write(1, "\n", 1) = 1
write(1, "[", 1) = 1
write(1, "PRNTUTIL", 8) = 8
write(1, "2", 1) = 1
write(1, "] ", 2) = 2
write(1, "Syntax Error", 12) = 12
write(1, ": Check appropriate syntax for ", 32) = 32
write(1, "deftemplate patterns", 20) = 20
write(1, ".\n", 2) = 2
write(1, "\nERROR:\n", 8) = 8
write(1, "(defrule MAIN::a\n", 17) = 17
write(1, " ?f1 <- (a (one two three", 27) = 27
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defmethod foo (?a)) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defmethod foo ((?a NUMBER))) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defmethod foo ((?a INTEGER FLOA"..., 38) = 38
write(1, "CLIPS> ", 7) = 7
write(1, "(list-defmethods) "..., 63) = 63
write(1, "foo", 3) = 3
write(1, " #", 2) = 2
write(1, "3 (INTEGER FLOAT)", 18) = 18
write(1, "\n", 1) = 1
write(1, "foo", 3) = 3
write(1, " #", 2) = 2
write(1, "2 (NUMBER)", 11) = 11
write(1, "\n", 1) = 1
write(1, "foo", 3) = 3
write(1, " #", 2) = 2
write(1, "1 ()", 5) = 5
write(1, "\n", 1) = 1
write(1, "For a total of ", 15) = 15
write(1, "3", 1) = 1
write(1, " ", 1) = 1
write(1, "methods", 7) = 7
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defclass A (is-a USER) "..., 44) = 44
write(1, " (role concrete)\n", 19) = 19
write(1, " (multislot foo (default a) (c"..., 61) = 61
write(1, "CLIPS> ", 7) = 7
write(1, "(deffunction foo (?ins) "..., 44) = 44
write(1, " (bind ?a (send ?ins get-foo))"..., 33) = 33
write(1, " (printout t ?a \" \")\n", 23) = 23
write(1, " (printout t (send ?ins get-fo"..., 40) = 40
write(1, " (mv-slot-replace ?ins foo 1 1"..., 36) = 36
write(1, " (printout t ?a \" \")\n", 23) = 23
write(1, " (printout t (send ?ins get-fo"..., 42) = 42
write(1, "CLIPS> ", 7) = 7
write(1, "(make-instance a of A) "..., 44) = 44
write(1, "[", 1) = 1
write(1, "a", 1) = 1
write(1, "]", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(foo [a]) "..., 62) = 62
write(1, "(", 1) = 1
write(1, "a", 1) = 1
write(1, ")", 1) = 1
write(1, " ", 1) = 1
write(1, "(", 1) = 1
write(1, "a", 1) = 1
write(1, ")", 1) = 1
write(1, " ", 1) = 1
write(1, "(", 1) = 1
write(1, "a", 1) = 1
write(1, ")", 1) = 1
write(1, " ", 1) = 1
write(1, "(", 1) = 1
write(1, "1", 1) = 1
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule blah "..., 44) = 44
write(1, " ?f <- (i-f)\n", 15) = 15
write(1, " (test (progn (retract ?f) TRU"..., 36) = 36
write(1, " =>)\n", 7) = 7
write(1, "CLIPS> ", 7) = 7
write(1, "(assert (i-f)) "..., 44) = 44
write(1, "\n", 1) = 1
write(1, "[", 1) = 1
write(1, "FACTMNGR", 8) = 8
write(1, "1", 1) = 1
write(1, "] ", 2) = 2
write(1, "Facts may not be retracted durin"..., 51) = 51
write(1, "<Fact-", 6) = 6
write(1, "0", 1) = 1
write(1, ">", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(facts) "..., 44) = 44
write(1, "f-0 ", 8) = 8
write(1, "(", 1) = 1
write(1, "i-f", 3) = 3
write(1, ")", 1) = 1
write(1, "\n", 1) = 1
write(1, "For a total of ", 15) = 15
write(1, "1", 1) = 1
write(1, " ", 1) = 1
write(1, "fact", 4) = 4
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(agenda) "..., 44) = 44
write(1, "0 ", 7) = 7
write(1, "blah", 4) = 4
write(1, ": ", 2) = 2
write(1, "f-0", 3) = 3
write(1, "\n", 1) = 1
write(1, "For a total of ", 15) = 15
write(1, "1", 1) = 1
write(1, " ", 1) = 1
write(1, "activation", 10) = 10
write(1, ".\n", 2) = 2
write(1, "CLIPS> ", 7) = 7
write(1, "(clear) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(assert (i-f)) "..., 44) = 44
write(1, "<Fact-", 6) = 6
write(1, "0", 1) = 1
write(1, ">", 1) = 1
write(1, "\n", 1) = 1
write(1, "CLIPS> ", 7) = 7
write(1, "(defrule blah "..., 44) = 44
write(1, " ?f <- (i-f)\n", 15) = 15
write(1, " (test (progn (retract ?f) TRU"..., 36) = 36
write(1, " =>)\n", 7) = 7
write(1, "CLIPS> ", 7) = 7
write(1, "(facts) "..., 44) = 44
write(1, "CLIPS> ", 7) = 7
write(1, "(agenda) "..., 44) = 44
write(1, "0 ", 7) = 7
write(1, "blah", 4) = 4
write(1, ": ", 2) = 2
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

CLIPS Support

unread,
Dec 15, 2010, 12:30:37 AM12/15/10
to CLIPSESG
Try running the tests with compiler optimizations disabled and see if
you get the same error.

Ryan Minor

unread,
Dec 28, 2010, 3:28:16 PM12/28/10
to clip...@googlegroups.com
I am studying the Rete algorithm and notice that CLIPS implements "join from the right."

What is "join from the right"?

CLIPS Support

unread,
Dec 29, 2010, 12:03:29 PM12/29/10
to CLIPSESG
Joins from the right allow more complex topologies to be supported by
the join network, specifically groups of nested patterns within a not
conditional element:

(defrule example
(a ?x)
(not (b ?x)
(not (and (c ?x)
(d ?x))))
=>)

In early implementations of the rete algorithm, the right input to a
join was an alpha memory (a pattern matching a single fact). Joins
from the right allow the right input to be a beta memory (a group of
patterns).

Ryan Minor

unread,
May 15, 2011, 6:07:44 PM5/15/11
to clip...@googlegroups.com
Hi there

Was wondering if there is someplace I can find a comprehensive example of CLIPS in action? Say 100 rules.

I find the easiest way to learn a language is to following an example.

Cheers


CLIPS Support

unread,
May 17, 2011, 2:12:44 PM5/17/11
to CLIPSESG

surendra vasireddy

unread,
Oct 9, 2013, 3:54:35 AM10/9/13
to clip...@googlegroups.com
Hi,

what is the variable "beginNandDepth" stands for in rulebld.c . Pls elobarate

CLIPS Support

unread,
Oct 11, 2013, 9:19:24 PM10/11/13
to clip...@googlegroups.com
Nand is short for not/and. Each grouping of more than one pattern within a not conditional element is treated as its own join network that is linked into an enclosing join network.

(defrule example
   (a)
   (not (and (b)
             (c)
             (not (and (d)
                       (e)))
             (f)))
   (g)
   =>)

The begin and end nand depth indicates the level of nesting for each pattern. In this example, pattern (a) has a begin and end depth of 1. Patterns (b) and (c) have a begin and end depth of 2. Pattern (d) has a begin and end depth of 3. Pattern (e) has an begin depth of 3 and an end depth of 2. Pattern (f) has a begin depth of 2 and an end depth of 1. Pattern (g) has a begin and end depth of 1.

When the join network is created for this rule, a separate join network is created for the patterns (and (d) (e)). A join network is also created for (and (b) (c) (*) (f)) where  (*) is a not join node which receives the output of (and (d) (e)). Similarly a join network is created for (and (a) (*) (g)) where (*) is a not join node which receives the output of (and (b) (c) (*) (f)).

surendra vasireddy

unread,
Oct 17, 2013, 3:30:16 AM10/17/13
to clip...@googlegroups.com
Hi,

Is there a specific theory in computer sceince to better understand this logic . What i mean is , how any body can arrive at this logic with out some prior knowledge of dealing with similar kind of Problems!!!!

surendra vasireddy

unread,
Oct 18, 2013, 10:41:35 PM10/18/13
to clip...@googlegroups.com
I need little help from you.

Lets analyse the Pattern listed below


(defrule example
   (a)
   (not (and (b)
                 (c)
                 (not (and (d)
                               (e)))
             (f)))
   (g)
   =>)

I came to know from ClipsAdmin that The begin and end nand depth indicates the level of nesting for each pattern. 

In this example, pattern (a) has a begin and end depth of 1. 

Patterns (b) and (c) have a begin and end depth of 2. Pattern (d) has a begin and end depth of 3. Pattern (e) has an begin depth of 3 and an end depth of 2. Pattern (f) has a begin depth of 2 and an end depth of 1. Pattern (g) has a begin and end depth of 1.

My Question is how the CEs "d" will have the begin and end depth of 3 or how the CE "e" have end depth of 2 - cause this not incremented to my knowledge and the base Nand Depth i.e starting beginNandDepth is 1 in the lhsParseNode struct !!!!
I am referring to routine "IncrementNandDepth" in reorder.c file of Clips Source Code

CLIPS Support

unread,
Oct 21, 2013, 1:28:03 PM10/21/13
to clip...@googlegroups.com
You have to look through academic papers for the rete algorithm. Here's one that's available online: http://reports-archive.adm.cs.cmu.edu/anon/1995/CMU-CS-95-113.pdf. Section 2.8, Conjunctive Negations, is the term used in this paper for the not/and conditional elements in CLIPS. There are lots of different approaches you can take in implementing the rete algorithm and this paper covers a number of them. 

CLIPS Support

unread,
Oct 21, 2013, 1:36:04 PM10/21/13
to clip...@googlegroups.com
There's clearly code in the IncrementNandDepth function that's incrementing the begin and end depths. If you set a breakpoint on the code, you can step through the debugger after entering the rule at the CLIPS command prompt and see how the code works to assign these values.

       theLHS->beginNandDepth++;

       if (lastCE == FALSE) theLHS->endNandDepth++;
       else if (theLHS->bottom != NULL) theLHS->endNandDepth++;
Message has been deleted
Message has been deleted

surendra vasireddy

unread,
Dec 6, 2013, 4:48:44 AM12/6/13
to clip...@googlegroups.com
Hi,
we have an interesting problem in our production System
We are Using ILOG Rules Engine similar to Clips Version 6.2
Observing a strange behavior that the output is getting delayed by more than 30 minutes and some times even more when sizable inputs are fed to the Engine
This is major pain and wanna get rid of this issue ASAP

Can you throw some light on what could be the possible reasons for the rules engine Slow Down and How to mitigate them

Thanks in Advance

surendra

Grant Rettke

unread,
Dec 30, 2013, 10:04:35 PM12/30/13
to clip...@googlegroups.com
On Fri, Dec 6, 2013 at 3:48 AM, surendra vasireddy
<svasire...@gmail.com> wrote:
> Can you throw some light on what could be the possible reasons for the rules
> engine Slow Down and How to mitigate them

There are a lot of places to start.

What do your acceptance tests look like?

Have you tried going back in time and processing various data sets to
view the behavior?
Message has been deleted

surendra vasireddy

unread,
Jun 8, 2014, 8:22:56 AM6/8/14
to clip...@googlegroups.com
Hi,

rulebld.c has code for Right Join Nodes in case of NAND CEs
How about code for building Sharable Join Network in case of Ruleset Containing more than One Rule !!!!!!

surendra



On Wednesday, 29 December 2010 22:33:29 UTC+5:30, CLIPS Support wrote:

CLIPS Support

unread,
Jun 8, 2014, 12:01:20 PM6/8/14
to clip...@googlegroups.com
Same file. FindShareableJoin and TestJoinForReuse.
Message has been deleted
Message has been deleted
Message has been deleted

surendra vasireddy

unread,
Jul 30, 2014, 1:51:05 AM7/30/14
to clip...@googlegroups.com
Few Questions here

what will be the output of (not (and (c ?x)  Subnetwork ????
                                                  (d ?x))

As mentioned if this acts as beta i.e Partial Match Token instead of WME to next level of Subnetwork ((not (b ?x)) , Pls outline the algorithm for comparison with (not (b ?x) part of Subnetwork when driven from Right !!!!

cheers

On Wednesday, 29 December 2010 22:33:29 UTC+5:30, CLIPS Support wrote:
Reply all
Reply to author
Forward
0 new messages