Code Monkey home page Code Monkey logo

csneps's Introduction

CSNePS - Concurrent SNePS

CSNePS is an implementation (and extension of) of the SNePS 3 knowledge representation and reasoning system specification. CSNePS is written in the Clojure programming language, and is designed to utilize concurrency during inference.

Running CSNePS

CSNePS should be run using Leiningen for the best experience. Once you've installed Leiningen you can run CSnePS by changing into the CSNePS directory and typing either:

lein run

to launch CSNePS with its GUI, or

lein run -c

to launch the command line interface for CSNePS.

Further Documentation

While CSNePS is still under heavy development, the version available here should be usable. There is some documentation provided in the manual.pdf file in the doc folder, but most documentation is currently in the form of papers written about SNePS 3 and portions of CSNePS.

If you intend to use CSNePS it is best to first acquaint yourself with the SNePS 3 specification:

Stuart C. Shapiro, An Introduction to SNePS 3. In Bernhard Ganter & Guy W. Mineau, Eds. Conceptual Structures: Logical, Linguistic, and Computational Issues. Lecture Notes in Artificial Intelligence 1867. Springer-Verlag, Berlin, 2000, 510-524.

Daniel R. Schlegel and Stuart C. Shapiro, Visually Interacting with a Knowledge Base Using Frames, Logic, and Propositional Graphs. In Madalina Croitoru, Sebastian Rudolph, Nic Wilson, John Howse and Olivier Corby, Eds., Graph Structures for Knowledge Representation and Reasoning, Lecture Notes in Artificial Intelligence 7205, Springer-Verlag, Berlin, 2012, 188-207.

Next, you should aquiant yourself with Inference Graphs, which provide the natural deduction and subsumption reasoning abilities of CSNePS.

Daniel R. Schlegel, Concurrent Inference Graphs, PhD Dissertation, Department of Computer Science and Engineering, State University of New York at Buffalo, September 3, 2014.

Daniel R. Schlegel and Stuart C. Shapiro, Inference Graphs: Combining Natural Deduction and Subsumption Inference in a Concurrent Reasoner. In Proceedings of the Twenty-Ninth Conference on Artificial Intelligence (AAAI-15), in press.

csneps's People

Contributors

digitalneoplasm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csneps's Issues

Error on launch: "java.lang.IllegalArgumentException: Key must be integer"

Hello. I'm trying to use CSNePS, but I'm getting error messages on launch. I've tried snepsgui.sh, sneps.sh and also "lein run", with the same result. The error message is as follows:

$ ./csneps.sh 
java.lang.IllegalArgumentException: Key must be integer
 at clojure.lang.APersistentVector.assoc (APersistentVector.java:345)
    clojure.lang.APersistentVector.assoc (APersistentVector.java:18)
    clojure.lang.RT.assoc (RT.java:792)
    clojure.core$assoc__4371.invokeStatic (core.clj:191)
    clojure.core$update_in.invokeStatic (core.clj:5950)
    clojure.core$update_in.doInvoke (core.clj:5939)
    clojure.lang.RestFn.applyTo (RestFn.java:146)
    clojure.core$apply.invokeStatic (core.clj:652)
    clojure.core$update_in.invokeStatic (core.clj:5949)
    clojure.core$update_in.doInvoke (core.clj:5939)
    clojure.lang.RestFn.invoke (RestFn.java:467)
    cider_nrepl.plugin$middleware.invokeStatic (plugin.clj:54)
    cider_nrepl.plugin$middleware.invoke (plugin.clj:17)
    clojure.lang.Var.invoke (Var.java:379)
    leiningen.core.project$apply_middleware.invokeStatic (project.clj:750)
    leiningen.core.project$apply_middleware.invoke (project.clj:743)
    clojure.core.protocols$fn__6755.invokeStatic (protocols.clj:167)
    clojure.core.protocols/fn (protocols.clj:124)
    clojure.core.protocols$fn__6710$G__6705__6719.invoke (protocols.clj:19)
    clojure.core.protocols$seq_reduce.invokeStatic (protocols.clj:31)
    clojure.core.protocols$fn__6738.invokeStatic (protocols.clj:75)
    clojure.core.protocols/fn (protocols.clj:75)
    clojure.core.protocols$fn__6684$G__6679__6697.invoke (protocols.clj:13)
    clojure.core$reduce.invokeStatic (core.clj:6545)
    clojure.core$reduce.invoke (core.clj:6527)
    leiningen.core.project$apply_middleware.invokeStatic (project.clj:745)
    leiningen.core.project$apply_middleware.invoke (project.clj:743)
    leiningen.core.project$activate_middleware.invokeStatic (project.clj:777)
    leiningen.core.project$activate_middleware.invoke (project.clj:773)
    leiningen.core.project$init_project.invokeStatic (project.clj:902)
    leiningen.core.project$init_project.invoke (project.clj:892)
    leiningen.core.project$read.invokeStatic (project.clj:973)
    leiningen.core.project$read.invoke (project.clj:970)
    leiningen.core.project$read.invokeStatic (project.clj:974)
    leiningen.core.project$read.invoke (project.clj:970)
    leiningen.core.main$_main$fn__5998.invoke (main.clj:397)
    leiningen.core.main$_main.invokeStatic (main.clj:394)
    leiningen.core.main$_main.doInvoke (main.clj:391)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.lang.Var.invoke (Var.java:379)
    clojure.lang.AFn.applyToHelper (AFn.java:154)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.core$apply.invokeStatic (core.clj:646)
    clojure.main$main_opt.invokeStatic (main.clj:314)
    clojure.main$main_opt.invoke (main.clj:310)
    clojure.main$main.invokeStatic (main.clj:421)
    clojure.main$main.doInvoke (main.clj:384)
    clojure.lang.RestFn.invoke (RestFn.java:436)
    clojure.lang.Var.invoke (Var.java:388)
    clojure.lang.AFn.applyToHelper (AFn.java:160)
    clojure.lang.Var.applyTo (Var.java:700)
    clojure.main.main (main.java:37)

I'm using the latest unmodified git cloned version:

 git log
commit cfa25695fd2117a1ab71e99219b94cef49692de4
Author: Daniel R. Schlegel <[email protected]>
Date:   Sat Jan 20 16:42:55 2018 -0500

    Missing channels built in cases where semtypes weren't subtypes, but were compatible, at build time.

Thanks in advance!

problem loading GUI

This seems like a really interesting piece of software.

I'm getting an UnsatisfiedLinkError on my Macbook Pro (Yosemite) when I try to load the GUI. The command-line version loads fine, but loading the GUI (with or without preloading csneps) results in the following link error: sun.awt.X11GraphicsEnvironment.initDisplay(Z)V. I've installed the latest version of XQuartz, and put its location and the location of the lib files on my CLASSPATH, without avail.

Any thoughts? Thanks so much.

Dead links

The links to learning resources are no longer valid.

REST API

Hi!
I'm wondering about the possibility to wrap the JAVA API in a REST API, so I can use CSNePS from another programs/platforms. Has someone tried this? Does it require much work from the current code?

Close takes the wrong number of parameters.

On line 166 of initialize.clj, you have the following:

(defineCaseframe 'Propositional '('close proposition) :docstring "[proposition] is closed over [closedvar]")

I think you're missing the parameter closedvar.

Thanks for making CSNePS! It's by far the easiest SNePS to run.

IllegalArgumentException while doing a query on vardemo.sneps with some additional assertions.

So, I'm trying to get a hang of CSNePS (from the command-line, eventually to use it as a library), but I'm running into problems. I started with the demo "vardemo.sneps", in particular I'm intrested in how "Every farmer who owns a Donkey, beats it" is handled. I did a slightly modified version, where the rellevant "assert" commands are turned into "assert!" to trigger forward inference, and I added assertions about a particular farmer (Sancho) and a particular donkey (Rucio):

;;; Every farmer that owns a donkey beats it
(assert! '(Beats (every x (Isa x Farmer) (Isa x Agent) (Owns x (some y(x) (Isa y Donkey) (Isa y Agent))))  y))

;; Sancho is an Agent, Rucio is an Agent.
(assert! '(Isa Sancho Agent))
(assert! '(Isa Rucio Agent))

;;; Sancho is a Farmer
(assert! '(Isa Sancho Farmer))

;;; Rucio is a Donkey
(assert! '(Isa Rucio Donkey))

;;; Sancho Owns Rucio
(assert! '(Owns Sancho Rucio))

So far, so good. Then I ask a trivial question and it answers correctly:

csneps.core.snuser=> (ask '(Owns Sancho Rucio))
I wonder if wft49!: (Owns Sancho Rucio)
I know that wft49!: (Owns Sancho Rucio)
#{wft49!: (Owns Sancho Rucio)}

But then I ask whether Sancho beats Rucio, and BOOM, error:

csneps.core.snuser=> (ask '(Beats Sancho Rucio))
I wonder if wft50?: (Beats Sancho Rucio)
I will consider using Slot&Path-Based inference.
Exception in thread "pool-3-thread-2" java.lang.IllegalArgumentException: No implementation of method: :get-new-messages of protocol: #'csneps.snip/MessageStructure found for class: nil
	at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
	at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
	at csneps.snip$eval7940$fn__7980$G__7923__7987.invoke(snip_message.clj:5)
	at csneps.snip$initiate_node_task.invokeStatic(snip_inference_graph.clj:1320)
	at csneps.snip$initiate_node_task.invoke(snip_inference_graph.clj:1177)
	at clojure.core$partial$fn__5563.invoke(core.clj:2622)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.RestFn.applyTo(RestFn.java:132)
	at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
	at clojure.lang.RestFn.invoke(RestFn.java:397)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)

csneps.core.snuser=> quit
Bye for now!

Here's the modified demo file in my fork of CSNePS:
https://github.com/martinodb/CSNePS/blob/semtype-objectlang/Demo/vardemo-modified.sneps

Can you please confirm as bug or explain my mistake? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.