Activity for Gary Riley

  • Gary Riley Gary Riley posted a comment on discussion Help

    In CLIPS 6.3, there are two C functions, EnvGetInstancePPForm and EnvGetFactPPForm, that will return the printed representation of an instance or a fact. You can iterate over the facts/instances and save that representation to later recreate the facts/instances. The drawback is that the buffer passed to the functions is fixed to whatever it's initially set. In CLIPS 6.4, the equivalent functions are InstancePPForm and FactPPForm and these use a data structure that will expand the string buffer needed...

  • Gary Riley Gary Riley posted a comment on discussion Help

    The ppfact function allows you to specify a logical name, so if you want to use a custom router you can iterate over the facts and use ppfact to direct the output to a logical name recognized by the router. CLIPS (6.31 6/12/19) CLIPS> (assert (a) (b) (c)) <Fact-3> CLIPS> (open "facts.out" out "w") TRUE CLIPS> (foreach ?f (get-fact-list) (ppfact ?f out)) CLIPS> (close out) TRUE CLIPS>

  • Gary Riley Gary Riley committed [r922] on Code

    70x Dynamic fact slot modification and test case updates

  • Gary Riley Gary Riley posted a comment on discussion Help

    The Windows IDE doesn't support editing text files. Edit your code using whichever text editor you prefer and then load it into the IDE by using the Load Constructs... menu item from the Environment menu.

  • Gary Riley Gary Riley committed [r921] on Code

    70x constructs-to-c updates

  • Gary Riley Gary Riley committed [r920] on Code

    70x constructs-to-c updatesq

  • Gary Riley Gary Riley modified ticket #17

    (get-char) followed by a tab then enter produces different results

  • Gary Riley Gary Riley posted a comment on ticket #17

    Checked in a fix to the repository.

  • Gary Riley Gary Riley committed [r919] on Code

    64x 70x Fix for get-char of tab character in Windows IDE

  • Gary Riley Gary Riley committed [r918] on Code

    70x CLIPSJNI and example updates

  • Gary Riley Gary Riley committed [r917] on Code

    70x Backward chaining examples

  • Gary Riley Gary Riley committed [r916] on Code

    70x Backward chaining examples

  • Gary Riley Gary Riley committed [r915] on Code

    70x Example and backward chaining code updates

  • Gary Riley Gary Riley committed [r914] on Code

    70x Named facts updates

  • Gary Riley Gary Riley committed [r913] on Code

    70x Initial checkin for named facts

  • Gary Riley Gary Riley posted a comment on ticket #76

    I checked in a fix. I forgot to test the original issue. There are multiple ways to generate a bug with this issue and just modifying QSetDefglobalValue won't fix all of them. Here's an example which globalbind-3.patch will still generate an error: (defglobal ?*foo* = (create$ 0.0)) (deffunction test (?foo) (bind ?*foo* ?foo) (println ?foo) (bind ?*foo* (create$ 3.0)) (println ?foo)) (test ?*foo*) What I did to resolve the issue is modify the routines which return the value of the global variable...

  • Gary Riley Gary Riley committed [r912] on Code

    64x 70x Fix for defglobal bug

  • Gary Riley Gary Riley modified ticket #16

    defrule allows variables like ?+ to be defined

  • Gary Riley Gary Riley posted a comment on ticket #16

    Checked in a fix to the 64x and 70x versions.

  • Gary Riley Gary Riley committed [r911] on Code

    64x 70x Added check to verify the first character of a variable is valid.

  • Gary Riley Gary Riley committed [r910] on Code

    64x 70x Simpler fix for defglobal issue

  • Gary Riley Gary Riley posted a comment on ticket #76

    Nice catch. I checked in an update.

  • Gary Riley Gary Riley committed [r909] on Code

    63x 64x 70x Updated fix to defglobal issue

  • Gary Riley Gary Riley posted a comment on ticket #76

    A fix has been checked into the svn repository. The issue occurs when setting the current value of a defglobal to its current value. This can cause the value to be prematurely released. The bug can occur outside the body of a deffunction, so the proposed patch won't fix the issue for all cases. CLIPS (6.4.1 4/8/23) CLIPS> (defglobal ?*foo* = (create$ 0.0)) CLIPS> (loop-for-count 1 do (bind ?*foo* ?*foo*)) [ARGACCES2] Function 'loop-for-count' expected argument #3 to be of type integer, float, symbol,...

  • Gary Riley Gary Riley committed [r908] on Code

    63x 64x 70x Fixed garbage collection issue with defglobal assigned its current value.

  • Gary Riley Gary Riley committed [r907] on Code

    64x Updated APG with correction for AddUDF and adding RemoveUDF

  • Gary Riley Gary Riley committed [r906] on Code

    64x 70x Fixed gensym* bug effecting unique instance name creation

  • Gary Riley Gary Riley committed [r905] on Code

    70x Deleted renamed deftable expected output

  • Gary Riley Gary Riley committed [r904] on Code

    70x Deleted tmpltv640 test case output

  • Gary Riley Gary Riley committed [r903] on Code

    70x Deleted tmpltv640 test case

  • Gary Riley Gary Riley committed [r902] on Code

    70x Support for ?var:slot fact references in methods and defrule actions

  • Gary Riley Gary Riley modified ticket #4

    Missing closing parenthesis for some defmessage-handler examples (section 9.3.3.9)

  • Gary Riley Gary Riley posted a comment on ticket #4

    Updated and checked in document changes.

  • Gary Riley Gary Riley committed [r901] on Code

    63x 64x 70x Fixed typos in Basic Programming Guide

  • Gary Riley Gary Riley committed [r900] on Code

    70x Generic function support for deftemplates and other minor changes

  • Gary Riley Gary Riley committed [r899] on Code

    64x 70x Fixed memory leak when recreating non-reactive instance

  • Gary Riley Gary Riley created a blog post

    Italian Translation of User's Guide

  • Gary Riley Gary Riley committed [r898] on Code

    64x 70x Added current version of documentation

  • Gary Riley Gary Riley committed [r897] on Code

    70x Initial commit of certainty factors

  • Gary Riley Gary Riley posted a comment on ticket #14

    One correction: focus does change the current module, but the other comments are still valid. The do-it rule is not executed in the initial run because foo is not on the focus stack and the fact assertion in the actions will attempt to assert in the foo module and not the MAIN module.

  • Gary Riley Gary Riley posted a comment on ticket #15

    What's the unexpected behavior in this example?

  • Gary Riley Gary Riley posted a comment on ticket #14

    When you first issue a (run) command. the MAIN module is the only module on the focus stack. The activation for the do-it rule is on the agenda for the foo module, however, so issuing a (run) command doesn't fire any rules. The only effect the run has is to remove the MAIN module from the focus stack. The do-it rule still remains on the agenda for foo. CLIPS (6.4.1 4/8/23) CLIPS> (defmodule foo) CLIPS> (defrule do-it (f ?f) =>) CLIPS> (assert (f 1)) <Fact-1> CLIPS> (agenda) 0 do-it: f-1 For a total...

  • Gary Riley Gary Riley created a blog post

    Contributions

  • Gary Riley Gary Riley committed [r896] on Code

    70x deftable contains-key and other fixes

  • Gary Riley Gary Riley committed [r895] on Code

    70x Add iff (inline if) and $ (create$ alias) functions

  • Gary Riley Gary Riley committed [r894] on Code

    64x Bug fix for watch methods with specific method index

  • Gary Riley Gary Riley posted a comment on discussion Help

    I checked in a fix.

  • Gary Riley Gary Riley committed [r893] on Code

    64x CLIPSJNI Fix for FactAddressValue equals

  • Gary Riley Gary Riley posted a comment on discussion Help

    OK, I confused myself and thought the == you were referring to was in the code posted beneath your comments instead of the equals in the FactAddressValue class. Your fix corrects the issue. I'll check in fix for that shortly. I also was able to move a lot of the code back into the PrimitiveValue class. I think the reason I might have kept that code in the subclasses was because I was getting an unchecked cast warning from the MultifieldValue class when I cast the value from the PrimitiveValue superclass...

  • Gary Riley Gary Riley posted a comment on discussion Help

    OK, I'll check that out.

  • Gary Riley Gary Riley posted a comment on discussion Help

    I don't recall why I moved the equals code from the superclass to the subclasses, but use of == in the equals method is just applying reflexivity. An object is equal to itself, so if both objects compared have the same address, they're equal. Otherwise , the values of the object need to be compared. This was the most common design pattern I found when searching for implementing the equals method.

  • Gary Riley Gary Riley posted a comment on discussion Open Discussion

    I checked in the changes for textpro that you can try out to see if they resolve the issue you were seeing.

  • Gary Riley Gary Riley committed [r892] on Code

    64x Removed limit on text processing file and entry name lengths.

  • Gary Riley Gary Riley modified ticket #6

    Add cr and lf as separately printable characters

  • Gary Riley Gary Riley posted a comment on ticket #6

    Added.

  • Gary Riley Gary Riley committed [r891] on Code

    64x Added cr and lf symbols for use with printout, println, and print.

  • Gary Riley Gary Riley posted a comment on discussion Open Discussion

    I checked in an update for #2. I did it slightly differently so that it would handle these three cases of line endings: cr/crlf/lf. For #1 I'm going to check to see how difficult it would be to just dynamically allocate the storage for the textpro strings rather than have an arbitary limit.

  • Gary Riley Gary Riley committed [r890] on Code

    64x Fix for readline handling crlf properly on unix systems

  • Gary Riley Gary Riley posted a comment on discussion Help

    Here's what I do when I have to reduce a large system where it's not immediately apparent where the erroneous behavior originates, but the behavior is reproducible. I run the system and get a trace of the rules that fire. I then see how many of the rules that don't fire can be deleted with the erroneous behavior still occurring. I then try to get rid of some of the rules that are firing. I'll run the system up to a point before the erroneous behavior occurs and save off the fact/instances. I'll then...

  • Gary Riley Gary Riley posted a comment on discussion Help

    No, it's not practical to debug a binary image. The first step is to produce the small possible program that replicates the behavior.

  • Gary Riley Gary Riley posted a comment on discussion Help

    I checked in a fix for this bug.

  • Gary Riley Gary Riley committed [r889] on Code

    64x Fixed member$ bug

  • Gary Riley Gary Riley posted a comment on discussion Help

    I checked in fixes for the format function to adjust the width and precision when multibyte characters are present in a string. I noticed when digging through the specifications for conversion characters for the printf function that the behavior for using 0 with the s conversion character isn't specified. On macOS/Xcode and Windows/Visual Studio, the padding uses 0, but on Linux it uses spaces.

  • Gary Riley Gary Riley committed [r888] on Code

    64x 70x Format function adjusts width and precision for multibyte UTF-8 characters

  • Gary Riley Gary Riley posted a comment on discussion Help

    If you can package something up that you can send to me, I can take a look at the issue and try to see what's causing it.

  • Gary Riley Gary Riley posted a comment on discussion Open Discussion

    Version 7.0 will support backward chaining, deftemplate inheritance, certainty factors, and a few other bells and whistles.

  • Gary Riley Gary Riley posted a comment on discussion Help

    Does this same error occur when running 6.4.0?

  • Gary Riley Gary Riley posted a comment on discussion Help

    The thing that comes to mind for this rule is having multiple patterns matched by the same object such as this: (defrule ind_forf_v (object (is-a R_SIMPLEV) (name ?rente)) (not (object (is-a R_SIMPLEV))) (test (send ?rente test_cond_if)) =>) If the object is deleted and the second pattern is processed first , then the test will be executed for the deleted object, and the deleted object will be sent a message. But there are checks in the code to prevent propagation occurring for situations like this....

  • Gary Riley Gary Riley posted a comment on discussion Help

    It looks like a bug. The only thing that gives me pause is the ... between the object conditional element and the test conditional element.

  • Gary Riley Gary Riley posted a comment on discussion Help

    I looked through the format code and I'm going to have to do some more sophisticated parsing of the format string to automatically adjust the lengths to handle multibyte UTF-8 characters. For now, since length$ served as a workaround in prior versions, I added a function called str-byte-length: CLIPS (6.4.2 4/12/24) CLIPS> (str-length "e") 1 CLIPS> (str-byte-length "é") 2 CLIPS>

  • Gary Riley Gary Riley committed [r887] on Code

    64x 70x Added str-byte-length function

  • Gary Riley Gary Riley posted a comment on discussion Help

    Here's an example of writing and reading to a file from the Windows CLIPSIDE. If you provide a complete example of the exact commands you used and the output of those commands, it might be possible to determine why it's not working. CLIPS (6.4.1 4/8/23) CLIPS> (open "c:/users/garyriley/desktop/fault.dat" fault "w") TRUE CLIPS> (printout fault "str" crlf) CLIPS> (close fault) TRUE CLIPS> (open "c:/users/garyriley/desktop/fault.dat" fault) TRUE CLIPS> (read fault) str CLIPS> (close fault) TRUE CLI...

  • Gary Riley Gary Riley committed [r886] on Code

    64x Updated CLIPSJNI jar files and DLL

  • Gary Riley Gary Riley posted a comment on discussion Help

    If the open function returns FALSE, the file wasn't opened. This can occur if you attempt to open a file to write in a write-protected directory.

  • Gary Riley Gary Riley modified ticket #13

    (get-watch-item all) always returns false

  • Gary Riley Gary Riley posted a comment on ticket #13

    Added fix to svn repository for both the CLIPS get-watch-item function and the corresponding C function GetWatchItem.

  • Gary Riley Gary Riley committed [r885] on Code

    64x Fix for get-watch-item all

  • Gary Riley Gary Riley posted a comment on discussion Help

    I'll look into it. You can use str-length where you previously used length$.

  • Gary Riley Gary Riley posted a comment on discussion Help

    It's been checked in already: https://sourceforge.net/p/clipsrules/code/884/

  • Gary Riley Gary Riley posted a comment on discussion Help

    I changed the code so that the subclasses of PrimitiveValue override the base methods for equal and hashCode, but it looks like I forgot to do this for the FactAddress, InstanceAddress, and ExternalAddress subclasses. I checked in some code to the svn repository to correct this.

  • Gary Riley Gary Riley committed [r884] on Code

    64x CLIPSJNI Added equal and hashCode methods for InstanceAddress, FactAddress, and ExternalAddress

  • Gary Riley Gary Riley posted a comment on discussion Help

    I checked in a fix to the svn repository. There's a router that get created when commands are executed to capture any error output. It wasn't getting removed from a HashMap that kept track of existing routers. The change was made in Environment.java to the method deleteRouter. public void deleteRouter( Router theRouter) { if (theRouter == null) { throw new NullPointerException("theRouter"); } if (deleteRouter(theEnvironment,theRouter.getName())) { routerMap.remove(theRouter.getName()); } ;; <-- Change...

  • Gary Riley Gary Riley committed [r883] on Code

    64x 70x CLIPSJNI Deleted routers not removed from HashMap

  • Gary Riley Gary Riley posted a comment on discussion Help

    I can reproduce the issue with the code at the beginning of this thread, so I'll take a look and try to figure out what's going on.

  • Gary Riley Gary Riley committed [r882] on Code

    70x Deftable

  • Gary Riley Gary Riley committed [r881] on Code

    64x Bug fix for garbage collection algorithm

  • Gary Riley Gary Riley posted a comment on discussion Help

    That's the syntax for generic functions. You can specify class names, but not current deftemplate names. CLIPS (6.4.1 4/8/23) CLIPS> (+ "a" "b") [ARGACCES2] Function '+' expected argument #1 to be of type integer or float. CLIPS> (defmethod + ((?s1 STRING) (?s2 STRING)) (str-cat ?s1 ?s2)) CLIPS> (+ "a" "b") "ab" CLIPS> (+ 2 3) 5 CLIPS>

  • Gary Riley Gary Riley posted a comment on discussion Help

    I'm planning on supporting the short hand syntax for retrieving fact slots at the very least within the actions of a rule. Currently you can use the fact-slot-value function to retrieve the slot values. I'd suggesting wrapping the function with a deffunction so it's not so verbose. CLIPS (6.4.1 4/8/23) CLIPS> (deftemplate T (slot x) (slot y)) CLIPS> (deffunction fsv (?f ?s) (fact-slot-value ?f ?s)) CLIPS> (deffunction Ttot (?a) (+ (fsv ?a x) (fsv ?a y))) CLIPS> (assert (T (x 1) (y 2))) <Fact-1> CLIPS>...

  • Gary Riley Gary Riley committed [r880] on Code

    70x Renamed deftable test files

  • Gary Riley Gary Riley committed [r879] on Code

    70x Deftable query functions

  • Gary Riley Gary Riley modified ticket #75

    CLIPS crashes when overloaded specific method is called.

  • Gary Riley Gary Riley posted a comment on ticket #75

    Fix checked in. The behavior of a method overriding a function that can only be called from a message-handler is now consistent with the behavior for a deffunction or non-overriding method. CLIPS> (clear) CLIPS> (deffunction ppi () (ppinstance)) CLIPS> (defclass FOO (is-a USER)) CLIPS> (defmessage-handler FOO doit() (ppi)) CLIPS> (make-instance [a] of FOO) [a] CLIPS> (send [a] doit) [MSGFUN4] The function 'ppinstance' may only be called from within message-handlers. [PRCCODE4] Execution halted during...

  • Gary Riley Gary Riley committed [r878] on Code

    64x 70x Fixed crash when generic function overrides a function that can only be called from a messager handler

  • Gary Riley Gary Riley committed [r877] on Code

    70x Deftable query functions

  • Gary Riley Gary Riley committed [r876] on Code

    70x Initial deftable commit

  • Gary Riley Gary Riley committed [r875] on Code

    70x Deftemplate slot reactivity

  • Gary Riley Gary Riley committed [r874] on Code

    70x Version number update

  • Gary Riley Gary Riley committed [r873] on Code

    70x Deftemplate reactive patterns and redesigned mab example

  • Gary Riley Gary Riley committed [r872] on Code

    65x Support for non-reactive deftemplate patterns

  • Gary Riley Gary Riley committed [r871] on Code

    65x Initial changes for non-reactive fact patterns and other minor changes

1 >