This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/pl/android.yap

21 lines
532 B
Plaintext
Raw Permalink Normal View History

2019-01-09 09:32:09 +00:00
2019-04-07 00:25:10 +01:00
%:- module(android,
% [text_to_query/2]).
2019-01-09 09:32:09 +00:00
:- initialization(yap_flag(verbose,_,normal)).
2018-12-16 02:21:54 +00:00
2019-01-09 09:32:09 +00:00
:- meta_predicate( text_to_query( :, - ) ).
2018-12-16 02:21:54 +00:00
2019-01-09 09:32:09 +00:00
text_to_query( MString, Status ) :-
2019-04-07 00:25:10 +01:00
strip_module( user:MString, Mod, String ),
top_query(android:query_( Mod:String, Status ) ).
2019-04-05 23:52:34 +01:00
2019-04-07 00:25:10 +01:00
query_( Mod:String, Status ) :-
2019-01-09 09:32:09 +00:00
atomic_to_term( String, Goal, VarNames ),
(
2019-04-07 00:25:10 +01:00
is_list(Goal) -> G = consult( Goal ) ; G = Goal ),
query_to_answer( Mod:G, VarNames, Status, Bindings).
2019-04-05 23:52:34 +01:00
2018-12-16 02:21:54 +00:00
2019-04-07 00:25:10 +01:00
user:file_search_path(data, '/data/data/pt.up.yap/files/Yap/myddas').