I have just received permission from one Dr. Vaucher to steal bits of his XProlog code for AI::Prolog. If I have the time, I should now be able to get basic math working in the next week or so. The only major obstacle I face right now is reimplementing the parser to handle the operators. That might take a bit.
I tried doing an end-run around the problem and define everything in terms of predicates and I have a development version which implements gt(X,Y), ge(X,Y), lt(X,Y) and le(X,Y), but generalizing that out proved difficult, though I think I might be able to do that. Still, being able to write X + Y instead of sum(X, Y) or sum([X|Y]) would be nice.
With a bit more work, this could serve as a convenient foundation for agent-based software.