Library-fication of OpenNARS

12 views
Skip to first unread message

Joe Geldart

unread,
Feb 9, 2008, 2:04:32 PM2/9/08
to open-nars
Hi,

I've just committed the first part of my work to turn OpenNARS into a
reusable library component. I've basically removed most of the static-
ness, turning Memory into an instantiable class. This has necessitated
going through much of the inference machinery, threading the
appropriate references to the memory through the method calls. This
hasn't been entirely straightforward, and I'm sure it could be done in
a much neater fashion, but I wanted to put this out there in the hope
that others will find it useful.

Also included in this process is a change of namespace (to
com.googlecode.opennars) and the inclusion of a new Reasoner class. To
use the library, instantiate a Reasoner and add observers. These will
then be notified (via the update method) of any sentences (and
InvalidInputExceptions at the moment) which the memory reports
(silence level is the decider here, as before.). The reasoner can be
made to step one cycle with a call to step(), or run in its own thread
with a call to start(). A call to stop() halts the reasoning thread.
Hopefully this is enough to deal with most threading use-cases, but
let me know if you need something different.

Lastly, the code includes the beginnings of a new IO syntax: LOAN (the
Non-Axiomatic Ontology Language). This language is intended to allow
one to ascribe non-axiomatic sentences to semantic web resources,
starting to open up the use of NARS for semantic web reasoning. I will
be writing a wiki article on this format soon, with some use-cases, as
well as writing an article for a journal. I'm also working on a formal
translation of standard RDF triples (including OWL) into NAL, and this
is called NATR (Non-Axiomatic Translation of RDF).

Lastly, I'd like to thank Pei Wang publicly for his open-sourcing of
NARS and I hope for lots of exciting work ahead.

Please send me any comments you may have about this work, and
especially bug reports and suggestions for improvement/future
features.

Regards,

Joe Geldart
University of Durham, UK

Pei Wang

unread,
Feb 10, 2008, 11:46:48 AM2/10/08
to open...@googlegroups.com
On Feb 9, 2008 2:04 PM, Joe Geldart <jgel...@gmail.com> wrote:
>
> Hi,
>
> I've just committed the first part of my work to turn OpenNARS into a
> reusable library component.

Joe,

Now I feel that this open source project is becoming real. Thanks!

> I've basically removed most of the static-
> ness, turning Memory into an instantiable class. This has necessitated
> going through much of the inference machinery, threading the
> appropriate references to the memory through the method calls. This
> hasn't been entirely straightforward, and I'm sure it could be done in
> a much neater fashion, but I wanted to put this out there in the hope
> that others will find it useful.

Yes, it makes sense.

> Also included in this process is a change of namespace (to
> com.googlecode.opennars) and the inclusion of a new Reasoner class. To
> use the library, instantiate a Reasoner and add observers. These will
> then be notified (via the update method) of any sentences (and
> InvalidInputExceptions at the moment) which the memory reports
> (silence level is the decider here, as before.). The reasoner can be
> made to step one cycle with a call to step(), or run in its own thread
> with a call to start(). A call to stop() halts the reasoning thread.
> Hopefully this is enough to deal with most threading use-cases, but
> let me know if you need something different.

Fine.

> Lastly, the code includes the beginnings of a new IO syntax: LOAN (the
> Non-Axiomatic Ontology Language). This language is intended to allow
> one to ascribe non-axiomatic sentences to semantic web resources,
> starting to open up the use of NARS for semantic web reasoning. I will
> be writing a wiki article on this format soon, with some use-cases, as
> well as writing an article for a journal. I'm also working on a formal
> translation of standard RDF triples (including OWL) into NAL, and this
> is called NATR (Non-Axiomatic Translation of RDF).

I'll need to know and think more about this. What will be the
relationship between LOAN and Narsese? I'm afraid that the concept of
"Non-Axiomatic" and the concept of "Ontology" are incompatible. I wait
for your wiki article.

> Lastly, I'd like to thank Pei Wang publicly for his open-sourcing of
> NARS and I hope for lots of exciting work ahead.

I hope the same.

Regards,

Pei

cdrick

unread,
Mar 9, 2008, 8:11:34 AM3/9/08
to open-nars, Klaus D. Witzel, cdri...@gmail.com
Hi,

I'm Cédrick Béler, new here and planning to port OpenNARS to squeak, a
free smalltalk. I'm still exploring NARS ;-) reading the e-book and
the book rigid flexibility (I find them really well explained and
progressive !).

So my question is about the code. I notice there are 2 slightly
different versions, trunk/nars/ and trunk/open-nars/com/googlecode/
opennars. Most files are the same, but there are differences like the
parser, io, gui... Is the second version relative to the librification
exposed in this thread ?

Which code do I have to look at so as to do a port later ? I think
open-nars but I'm not sure. If the second code is what's explained
here, I'm not sure I'm interested in LOAN, but maybe the reasoner and
the memory modification.

Thanks a lot,

Cédrick

ps: I'm new to google code and group, as svn... so I don't know if
there are conventions

Pei Wang

unread,
Mar 9, 2008, 11:16:53 AM3/9/08
to open...@googlegroups.com, Klaus D. Witzel
On 3/9/08, cdrick <cdri...@gmail.com> wrote:
>
> So my question is about the code. I notice there are 2 slightly
> different versions, trunk/nars/ and trunk/open-nars/com/googlecode/
> opennars. Most files are the same, but there are differences like the
> parser, io, gui... Is the second version relative to the librification
> exposed in this thread ?

Yes, the first one was the original version I uploaded, and the second
is Joe's version.

> Which code do I have to look at so as to do a port later ? I think
> open-nars but I'm not sure. If the second code is what's explained
> here, I'm not sure I'm interested in LOAN, but maybe the reasoner and
> the memory modification.

It is up to you. I haven't had the time to study Joe's changes, though
I probably will copy some of them in my version, such as removing the
staticness of the memory, but not the LOAN related part.

> ps: I'm new to google code and group, as svn... so I don't know if
> there are conventions

There are surely conventions, though I probably don't know more tha you do. ;-)

Pei

Reply all
Reply to author
Forward
0 new messages