FuXi 1.2 release

4 views
Skip to first unread message

Chimezie Ogbuji

unread,
Dec 20, 2010, 4:42:26 PM12/20/10
to fuxi-discussion, cwm
A new version of FuXi (1.2) has been committed to mercurial [1] and
uploaded to the Python Package Index [2]. The ReteAction wiki has
been updated to reflect the new method added for registering
externally defined actions to the production rule system. Below is
changelist of modifications made. The most significant changes are 1)
updates to the BFP reasoner so that it solves body literals in a rule
in chunks that are converted into SPARQL queries that are evaluated at
once (rather than at a tuple-at-a-time), 2) The handling of tokens by
the RETE algorithm should now be a little more efficient, and 3)
support for externally defined actions (as mentioned previously).

- Extends the meta-interpreter with capabilities for collapsing chains
of base predicate queries into a single SPARQL query
- lazy evaluation of conjunction of multiple base predicates causes
removal of certain meta interpreter rules
- changed PartialInstanciation._generateBindings to use more efficient
and concise algorithm
- added FuXi.Network.Network.reportSize method which reports a summary
of the RETE network (size of largest memories, etc.)
- fix to deprecation warnings regarding use of md5 (use hashlib if available)
- Added dict with set operations to FuXi.Rete.Util
- added copy method to FuXi.Syntax.InfixOWL.BooleanClass
- added registerReteAction method to Network instances

There is only one [3] more step left before the top-down / SLD
reasoner can be completely deprecated with the BFP reasoner

As usual, comments / issues / etc. are welcome!

[1] http://code.google.com/p/fuxi/source/detail?r=332ea68ad3
[2] http://pypi.python.org/pypi/FuXi/1.2.production
[3] http://code.google.com/p/fuxi/issues/detail?id=37

Owen Newnan

unread,
Dec 21, 2010, 2:49:36 PM12/21/10
to fuxi-di...@googlegroups.com
FYI here are results attempting installation/verification of FuXi 1.2 on OS X 10.6.5:

easy_install still fails on OS X (trouble report 33): 

easy_install-2.5 fuxi
Processing fuxi
error: Couldn't find a setup script in /Users/onewnan/Temp/FuXi/Install/fuxi

Manual installation succeeded.

I added support into the test suite for the new test, testReteAction.

Unit tests with errors / failures are generally as before with the notable exception that testOwl now fails under the gms strategy per following trace:

...

======================================================================

ERROR: testOwl (__main__.OwlTestSuite)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 361, in testOwl

    conclusionFile)

  File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 248, in MagicOWLProof

    timing=self.calculateEntailments(factGraph)

  File "/Users/Shared/workspaces/workspace/fuxi/test/testOWL.py", line 152, in calculateEntailments

    self.network.feedFactsToAdd(generateTokenSet(factGraph))

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 604, in feedFactsToAdd

    self.addWME(token)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 594, in addWME

    alphaNode.activate(wme.unboundCopy())

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/AlphaNode.py", line 322, in activate

    memory.successor.propagate(memory.position,aReteToken.debug,wme=aReteToken)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 660, in propagate

    self._activate(PartialInstanciation([wme],consistentBindings=wme.bindingDict.copy()),debug)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 607, in _activate

    self.network.fireConsequent(partInstOrList,self,debug)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 553, in fireConsequent

    self.addWME(inferredToken)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/Network.py", line 594, in addWME

    alphaNode.activate(wme.unboundCopy())

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/AlphaNode.py", line 322, in activate

    memory.successor.propagate(memory.position,aReteToken.debug,wme=aReteToken)

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 652, in propagate

    print self.clauseRepresentation()

  File "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py", line 557, in clauseRepresentation

    return repr(first(self.rules).formula)

AttributeError: 'NoneType' object has no attribute 'formula'


----------------------------------------------------------------------

Ran 1 test in 0.798s


FAILED (errors=1)


Entered a defect report on this.


William Waites

unread,
Dec 21, 2010, 3:04:45 PM12/21/10
to fuxi-di...@googlegroups.com
* [2010-12-21 12:49:36 -0700] Owen Newnan <one...@gmail.com> �crit:

] "/Users/Shared/workspaces/workspace/fuxi/build/lib/FuXi/Rete/BetaNode.py",


] line 557, in clauseRepresentation
]
] return repr(first(self.rules).formula)
]
] AttributeError: 'NoneType' object has no attribute 'formula'

]
] ...
]
] Entered a defect report on this.

This is the same as

http://code.google.com/p/fuxi/issues/detail?id=40

which contains a patch.

Not sure precisely why this happens (e.g. in what circumstances
an empty rule set ends up there...

Cheers,
-w
--
William Waites
http://eris.okfn.org/ww/foaf#i
9C7E F636 52F6 1004 E40A E565 98E3 BBF3 8320 7664

Reply all
Reply to author
Forward
0 new messages