android
This commit is contained in:
parent
30a332b671
commit
186c156a4a
@ -1,16 +1,3 @@
|
|||||||
/**
|
|
||||||
* @file coinduction.yap
|
|
||||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>, Arvin Bansal,
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @date Tue Nov 17 14:55:02 2015
|
|
||||||
*
|
|
||||||
* @brief Co-inductive execution
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* *
|
* *
|
||||||
* YAP Prolog *
|
* YAP Prolog *
|
||||||
@ -28,6 +15,20 @@
|
|||||||
* *
|
* *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file coinduction.yap
|
||||||
|
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>, Arvin Bansal,
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @date Tue Nov 17 14:55:02 2015
|
||||||
|
*
|
||||||
|
* @brief Co-inductive execution
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% :- yap_flag(unknown,error).
|
% :- yap_flag(unknown,error).
|
||||||
% :- style_check(all).
|
% :- style_check(all).
|
||||||
|
|
||||||
|
@ -21,14 +21,14 @@
|
|||||||
#define NAME() 'YAPsqlite3'
|
#define NAME() 'YAPsqlite3'
|
||||||
#define MODULE() myddas_sqlite3
|
#define MODULE() myddas_sqlite3
|
||||||
#define INIT() init_sqlite3
|
#define INIT() init_sqlite3
|
||||||
#elif defined( odbc )
|
#elif defined( odbc ) && !defined(ANDROID)
|
||||||
#undef odbc
|
#undef odbc
|
||||||
#define DBMS(x) odbc_##x
|
#define DBMS(x) odbc_##x
|
||||||
#define c_DBMS(x) c_odbc_##x
|
#define c_DBMS(x) c_odbc_##x
|
||||||
#define NAME() 'YAPodbc'
|
#define NAME() 'YAPodbc'
|
||||||
#define MODULE() myddas_odbc
|
#define MODULE() myddas_odbc
|
||||||
#define INIT() init_odbc
|
#define INIT() init_odbc
|
||||||
#elif defined( postgres )
|
#elif defined( postgres ) && !defined(ANDROID)
|
||||||
#undef postgres
|
#undef postgres
|
||||||
#define DBMS(x) postgres_##x
|
#define DBMS(x) postgres_##x
|
||||||
#define c_DBMS(x) c_postgres_##x
|
#define c_DBMS(x) c_postgres_##x
|
||||||
|
@ -8,15 +8,13 @@
|
|||||||
|
|
||||||
text_to_query( MString, Status ) :-
|
text_to_query( MString, Status ) :-
|
||||||
strip_module( MString, Mod, String ),
|
strip_module( MString, Mod, String ),
|
||||||
|
|
||||||
|
top_query(query_( MString, Mod, Status ) ).
|
||||||
|
|
||||||
|
query_( Mtring, Mod, Status ) :-
|
||||||
atomic_to_term( String, Goal, VarNames ),
|
atomic_to_term( String, Goal, VarNames ),
|
||||||
(
|
(
|
||||||
is_list(Goal) -> G = ensure_loaded( Goal ) ; G = Goal ),
|
is_list(Goal) -> G = ensure_loaded( Goal ) ; G = Goal ),
|
||||||
catch(query_to_answer( Mod:G, VarNames, Status, Bindings),
|
catch(query_to_answer( Mod:G, VarNames, Status, Bindings).
|
||||||
H,error_handler(H,error)
|
|
||||||
),
|
|
||||||
write_query_answer( Bindings ),
|
|
||||||
nl(user_error).
|
|
||||||
|
|
||||||
%:- [sqlitest].
|
|
||||||
user:file_search_path(data, Home) :-
|
|
||||||
user:file_search_path(library, Home).
|
|
||||||
|
Reference in New Issue
Block a user