Creating a GUI for CLIPS

1,010 views
Skip to first unread message

Ankit Kulshrestha

unread,
Nov 16, 2016, 11:57:59 PM11/16/16
to CLIPSESG
Hi,

I just discovered this google group. I'm taking a course in AI, and we are using CLIPS. I'm developing a GUI frontend for CLIPS and I've got a few questions:


1. Can I use library written in C++ to integrate with the C source code of CLIPS.

2. What library, is better suited for creating a GUI for CLIPS? I've got either Qt or GTK+ in mind.


Any other general pointers and tips would be appreciated. Thanks.

CLIPS Support

unread,
Nov 17, 2016, 10:51:34 PM11/17/16
to CLIPSESG
There are example projects at https://sourceforge.net/projects/clipsrules/files/CLIPS/6.30/ demonstrating how to integrate .NET, Swing, and iOS interfaces with CLIPS. You could use these to get some ideas for integrating with Qt or GTK+.

Ankit Kulshrestha

unread,
Nov 19, 2016, 9:51:51 AM11/19/16
to CLIPSESG
Thanks for pointing me there. BTW how difficult is the task of building a GUI?

CLIPS Support

unread,
Nov 22, 2016, 3:17:57 PM11/22/16
to CLIPSESG
It's significantly easier if you start with a working example, particularly if it's the platform you're targeting, but you'd still find it easier for example to build an android app if you can see how it was done for iOS.

Ronald Finkbine

unread,
Nov 23, 2016, 9:45:20 PM11/23/16
to clip...@googlegroups.com

You can write the GUI in any language you want just use the clips command line program in batch mode.


c:\ clips -f file.clp    // this  runs the clips program from the command line with the file.clp as input.


in the file.clp file yo:

 - 


Ronald Finkbine
ronaldf...@hotmail.com



From: clip...@googlegroups.com <clip...@googlegroups.com> on behalf of Ankit Kulshrestha <ankitkulsh...@gmail.com>
Sent: Saturday, November 19, 2016 9:51 AM
To: CLIPSESG
Subject: Re: Creating a GUI for CLIPS
 
--
You received this message because you are subscribed to the Google Groups "CLIPSESG" group.
To post to this group, send email to CLIP...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CLIPSESG?hl=en
 
--> IF YOU NO LONGER WANT TO RECEIVE EMAIL <--
Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
Click on "Edit my membership" link.
Select the "No Email" radio button.
Click the "Save these settings" button.

--> IF YOU WANT TO UNSUBSCRIBE <--
Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
Sign in
Click on "Edit my membership" link.
Click the "Unsubscribe" button.
Note: This appears to be the most reliable way to unsubscribe
 
Alternately, send email to CLIPSESG-u...@googlegroups.com. You will receive an email which you must respond to as well to unsubscribe. Clicking the link mentioned in the unsubscribe reply does not appear to work reliably.
---
You received this message because you are subscribed to the Google Groups "CLIPSESG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clipsesg+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ronald Finkbine

unread,
Nov 23, 2016, 9:51:18 PM11/23/16
to clip...@googlegroups.com

You can write the GUI in any language you want just use the clips command line program in batch mode.


c:\ clips -f file.clp    // this  runs the clips program from the command line with the file.clp as input.


in the file.clp file you:

  - turn on the dribble-on -- this writes output for a file you name

  - have the templates and the rules to run your expert system


So you have your Java program or whatever WRITE out the file.clp file (standard compiler technology).


In Java you then use ProcessBuilder to execute the "clips -f file.clp" command in batch mode and wait on it to run, then read the dribble on file that clips created when it ran and  parse that for output (knowledge).


Read that knowledge (as string data) back into your GUI program in Java and you have Clips running in batch.


It is quite satisfactory in running time, nothing every really hits the hard drive, it is all cached in memory.

 

I fiddled with this a couple years ago and got it working in a couple days.


Ronald Finkbine
ronaldf...@hotmail.com



From: clip...@googlegroups.com <clip...@googlegroups.com> on behalf of Ronald Finkbine <ronaldf...@hotmail.com>
Sent: Wednesday, November 23, 2016 9:45 PM
To: clip...@googlegroups.com

Ankit Kulshrestha

unread,
Nov 30, 2016, 11:05:25 PM11/30/16
to CLIPSESG
Thanks for pointing out a simple thing! I've created the gui but was struggling to get it running. How do you load clips in batch mode in c++?

Ronald Finkbine

unread,
Dec 2, 2016, 8:00:22 PM12/2/16
to clip...@googlegroups.com
Depends on the OS platform.

Google "c++ execute shell command"

and work the examples.


Alternately, send email to CLIPSESG-unsubscribe@googlegroups.com. You will receive an email which you must respond to as well to unsubscribe. Clicking the link mentioned in the unsubscribe reply does not appear to work reliably.

---
You received this message because you are subscribed to the Google Groups "CLIPSESG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clipsesg+unsubscribe@googlegroups.com.

Juri Zaburunov

unread,
Dec 6, 2016, 10:59:49 PM12/6/16
to CLIPSESG
You can use clipsmm lib, as I do. Batch file you can load with batch C API - function as I properly remember...

среда, 30 ноября 2016 г., 23:05:25 UTC-5 пользователь Ankit Kulshrestha написал:

Alex Gian

unread,
Dec 7, 2016, 6:05:55 AM12/7/16
to clip...@googlegroups.com

Why resort to batch files?
CLIPS has a great customisable I/O interface.

Read Chapter 7 of the Programmers Guide on I/O Routers!


Alternately, send email to CLIPSESG-unsubscribe@googlegroups.com. You will receive an email which you must respond to as well to unsubscribe. Clicking the link mentioned in the unsubscribe reply does not appear to work reliably.

---
You received this message because you are subscribed to the Google Groups "CLIPSESG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clipsesg+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages