prechac / prechacthis

5 stars 5 forks source link

offline edition for Android #3

Open flowma opened 10 years ago

flowma commented 10 years ago

On Anroid the easiest way to work offline will probably be to

Optionally one could

rpaterson commented 10 years ago

I spent some time getting prechacthis running on toProlog but couldn't get it to go. I suspect that this is because I don't know the first thing about Prolog though, rather than any fundamental incompatibility. Will work on it more later.

rpaterson commented 10 years ago

From what I can tell using SWI-Prolog with JPL on Android requires rooting the device, so if possible would be better to use some other solution. See http://www.swi-prolog.org/build/linuxonandroid.html

imccoy commented 10 years ago

It isn't too hard to get swi-pl to build using the android ndk. Making it work may be another story - my current version crashes with a stack trace full of frames that the debugger can't reconcile with functions, so that's fun.

My current plan is to try to get it basically working with android on x86 (at which point a UI could plausibly be developed), then attack arm. Happy to push what I've got up somewhere if anyone wants to poke at it with a stick.

imccoy commented 10 years ago

https://github.com/imccoy/prechac-droid has a thing that incorporates both swipl and prechacthis in a way that builds and runs through the NDK.

Right now it just runs a single prechacthis query and logs the results. It seems to work on both x86 and arm. There's some suggestions for directions for future work in the README of that prechac-droid repo. One other possible direction would be to bring it under the prechac project's umbrella.

I spent some time trying to get prechacthis working in pure-java prolog environment a while ago, but ran into a bunch of predicates that the environment didn't define (maybe assert/retract and friends, from memory? http://www.swi-prolog.org/pldoc/man?section=db)

flowma commented 10 years ago

Awesome work!! I need to have a look at this ASAP!