#21 Support CLIPS 6.30

Approved
open
nobody
None
5
2016-12-30
2014-07-24
Uri Barkai
No

CLIPS 6.30 includes some important performance optimization, as Gary explains here.

I created a patch that allows PyCLIPS to support CLIPS 6.30 in addition to previous versions.
Unit tests pass on 6.24 and 6.30, Linux and Mac. I changed a few tests that did not pass due to new garbage collection behavior in 6.30.

Please find attached the patch together with the (current) clips 6.30 source file. If you decide to accept this patch, please add the 6.30 source archive to the PyCLIPS website next to the 6.24 one (e.g., http://pyclips.sourceforge.net/files/CLIPSSrc-6.30.zip). The patch includes an option to select the CLIPS source download URL (in a file, CLIPSSrc.url).

1 Attachments

Discussion

  • Uri Barkai

    Uri Barkai - 2014-07-24

    Attached the CLIPS source code. Latest version can be found here.

     
  • Gitttt

    Gitttt - 2016-12-14

    Thank you very much for your work! I am really happy to have a PyCLIPS based on CLIPS 6.30.

    Did you try to build it on Windows? I tried the installation via pip but it failed. I also tried the python setup.py build but this failed as well. I modified the sources you provide above and got the setup.py build to go through. Yet, the support of large integegers is still not working. Using large integers (of size sys.maxint+1 or bigger) causes the same error as it did before CLIPS 6.3. Could this be related to the compiler warnings I got on Windows (something about a conversion from __int64 to long) ?. Any ideas how to get PyCLIPS working on windows (having the clips 6.30 support of big integers)?

    PS: On Linux, everything worked fine.

     
    Last edit: Gitttt 2016-12-14
  • Uri Barkai

    Uri Barkai - 2016-12-14

    I've never tried to build it on Windows and unfortunately I can't help with the issue of large integers. Are you sure this a PyCLIPS issue? Did you manage to build CLIPS from source on the same platform, and did you get it to work with large integers? If the issue also exists in "pure" CLIPS then you could ask for help on that project.
    If you'd like to submit your changes, for the benefit of all Windows users, the project is now on GitHub: https://github.com/almostearthling/pyclips/tree/pyclips-1.1_clips-6.30 (Note the separate branch for 6.30).

     
  • Gitttt

    Gitttt - 2016-12-30

    Thank you for your answer!

    UPDATE:

    I took the pyclips code from the github repository you linked above. I downloaded the 6.30 source code from https://sourceforge.net/projects/clipsrules/files/CLIPS/6.30/ and extracted the contents of the "core" folder to a newly created folder "clipssrc".

    I installed cygwin including gcc, python-dev, python etc.

    I then ran python setup.py build from the cygwin terminal and everything went through. python setup.py install installed the module and it worked fine with large integers.

    Unfortunately, I cannot use this module from a windows python interpreter (if I am not mistaken).

    So I tried once again with visual studio express 2008.
    I added '-DWIN_MVC', to the CFLAGS list in line 730 and installed the patch utility for windows. I started the visual studio command prompt and ran python setup.py build. It went through and the installation via python setup.py install worked also. However, large integers still cause an error.

    I also made all the "conversion from '__int64' to 'long', possible loss of data" errors go away by changing the types of the corresponding variables to long long. This did not help with the error either.

    I have no clue what to try next and I am glad for any hints.

    Best regards,
    gitttt

    EDIT:

    The problem seems to be related to 32 and 64 bit. The same error occurs with a cygwin 32 bit installation. The 32bit Version of clips (installed via the official installer) works fine on my Windows 7 64 bit. Is it possible that the PyCLIPS supporting CLIPS 6.30 must be built as a 64bit module? Or at least with a 64bit compiler?

     
    Last edit: Gitttt 2016-12-31

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks