GNU PROLOG with UTF8 support
Macros | Functions | Variables
foreign_supp.c File Reference
#include <string.h>
#include "engine_pl.h"
#include "bips_pl.h"
Include dependency graph for foreign_supp.c:

Macros

#define OBJ_INIT   Foreign_Initializer
 
#define FOREIGN_SUPP_FILE
 
#define QUERY_STACK_SIZE   128
 
#define CALL_INTERNAL   X1_2463616C6C5F696E7465726E616C
 
#define THROW_INTERNAL   X1_247468726F775F696E7465726E616C
 
#define PL_QUERY_RECOVER_ALT   X1_24706C5F71756572795F7265636F7665725F616C74
 

Functions

static CodePtr Prepare_Call (int func, int arity, WamWord *arg_adr)
 
 Prolog_Prototype (CALL_INTERNAL, 2)
 
 Prolog_Prototype (THROW_INTERNAL, 2)
 
 Prolog_Prototype (PL_QUERY_RECOVER_ALT, 0)
 
static void Foreign_Initializer (void)
 
void Pl_Foreign_Create_Choice (CodePtr codep_alt, int arity, int choice_size)
 
void Pl_Foreign_Update_Choice (CodePtr codep_alt, int arity, int choice_size)
 
CodePtr Pl_Foreign_Jump_Ret (CodePtr codep)
 
PlFIOArgPl_Foreign_Rd_IO_Arg (int arg_long, WamWord start_word, PlLong(*rd_fct)(), int fio_arg_index)
 
Bool Pl_Foreign_Un_IO_Arg (int arg_long, Bool(*un_fct)(), PlFIOArg *fa, WamWord start_word)
 
void Pl_Emit_Syntax_Error (char *file_name, int err_line, int err_col, char *err_msg)
 
void Pl_Exec_Continuation (int func, int arity, WamWord *arg_adr)
 
void Pl_Throw (WamWord ball_word)
 
void Pl_Query_Begin (Bool recoverable)
 
int Pl_Query_Call (int func, int arity, WamWord *arg_adr)
 
int Pl_Query_Start (int func, int arity, WamWord *arg_adr, Bool recoverable)
 
void Pl_Query_Recover_Alt_0 (void)
 
int Pl_Query_Next_Solution (void)
 
void Pl_Query_End (int op)
 
WamWord Pl_Get_Exception (void)
 
void Pl_No_More_Choice (void)
 
int Pl_Type_Of_Term (WamWord start_word)
 
char * Pl_Atom_Name (int atom)
 
int Pl_Atom_Length (int atom)
 
Bool Pl_Atom_Needs_Quote (int atom)
 
Bool Pl_Atom_Needs_Scan (int atom)
 
Bool Pl_Is_Valid_Atom (int atom)
 
int Pl_Atom_Char (char c)
 
int Pl_Atom_Nil (void)
 
int Pl_Atom_False (void)
 
int Pl_Atom_True (void)
 
int Pl_Atom_End_Of_File (void)
 
PlBool Pl_Unif (PlTerm term1, PlTerm term2)
 
PlBool Pl_Unif_With_Occurs_Check (PlTerm term1, PlTerm term2)
 
Bool Pl_Builtin_Var (WamWord term)
 
Bool Pl_Builtin_Non_Var (WamWord term)
 
Bool Pl_Builtin_Atom (WamWord term)
 
Bool Pl_Builtin_Integer (WamWord term)
 
Bool Pl_Builtin_Float (WamWord term)
 
Bool Pl_Builtin_Number (WamWord term)
 
Bool Pl_Builtin_Atomic (WamWord term)
 
Bool Pl_Builtin_Compound (WamWord term)
 
Bool Pl_Builtin_Callable (WamWord term)
 
Bool Pl_Builtin_Fd_Var (WamWord term)
 
Bool Pl_Builtin_Non_Fd_Var (WamWord term)
 
Bool Pl_Builtin_Generic_Var (WamWord term)
 
Bool Pl_Builtin_Non_Generic_Var (WamWord term)
 
Bool Pl_Builtin_List (WamWord term)
 
Bool Pl_Builtin_Partial_List (WamWord term)
 
Bool Pl_Builtin_List_Or_Partial_List (WamWord term)
 
Bool Pl_Builtin_Term_Eq (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Term_Neq (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Term_Lt (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Term_Lte (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Term_Gt (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Term_Gte (WamWord term1, WamWord term2)
 
Bool Pl_Builtin_Compare (WamWord cmp_word, WamWord x, WamWord y)
 
Bool Pl_Builtin_Arg (WamWord arg_no_word, WamWord term_word, WamWord sub_term_word)
 
Bool Pl_Builtin_Functor (WamWord term_word, WamWord functor_word, WamWord arity_word)
 
Bool Pl_Builtin_Univ (WamWord term_word, WamWord list_word)
 
Bool Pl_Builtin_Eq (WamWord expr1, WamWord expr2)
 
Bool Pl_Builtin_Neq (WamWord expr1, WamWord expr2)
 
Bool Pl_Builtin_Lt (WamWord expr1, WamWord expr2)
 
Bool Pl_Builtin_Lte (WamWord expr1, WamWord expr2)
 
Bool Pl_Builtin_Gt (WamWord expr1, WamWord expr2)
 
Bool Pl_Builtin_Gte (WamWord expr1, WamWord expr2)
 
void Pl_Math_Evaluate (WamWord expr, WamWord *result)
 

Variables

PlLong pl_foreign_long [NB_OF_X_REGS]
 
double pl_foreign_double [NB_OF_X_REGS]
 
PlLongpl_base_fl = pl_foreign_long
 
double * pl_base_fd = pl_foreign_double
 
static PlFIOArg fio_arg_array [NB_OF_X_REGS]
 
static WamWordquery_stack [QUERY_STACK_SIZE]
 
static WamWord ** query_stack_top = query_stack
 
static WamWordgoal_H
 
WamWordpl_query_top_b
 
WamWord pl_query_exception
 

Macro Definition Documentation

#define CALL_INTERNAL   X1_2463616C6C5F696E7465726E616C
#define FOREIGN_SUPP_FILE
#define OBJ_INIT   Foreign_Initializer
#define PL_QUERY_RECOVER_ALT   X1_24706C5F71756572795F7265636F7665725F616C74
#define QUERY_STACK_SIZE   128
#define THROW_INTERNAL   X1_247468726F775F696E7465726E616C

Function Documentation

static void Foreign_Initializer ( void  )
static

Here is the call graph for this function:

int Pl_Atom_Char ( char  c)
int Pl_Atom_End_Of_File ( void  )
int Pl_Atom_False ( void  )
int Pl_Atom_Length ( int  atom)
char* Pl_Atom_Name ( int  atom)
Bool Pl_Atom_Needs_Quote ( int  atom)
Bool Pl_Atom_Needs_Scan ( int  atom)
int Pl_Atom_Nil ( void  )
int Pl_Atom_True ( void  )
Bool Pl_Builtin_Arg ( WamWord  arg_no_word,
WamWord  term_word,
WamWord  sub_term_word 
)

Here is the call graph for this function:

Bool Pl_Builtin_Atom ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Atomic ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Callable ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Compare ( WamWord  cmp_word,
WamWord  x,
WamWord  y 
)

Here is the call graph for this function:

Bool Pl_Builtin_Compound ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Eq ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Fd_Var ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Float ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Functor ( WamWord  term_word,
WamWord  functor_word,
WamWord  arity_word 
)

Here is the call graph for this function:

Bool Pl_Builtin_Generic_Var ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Gt ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Gte ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Integer ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_List ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_List_Or_Partial_List ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Lt ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Lte ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Neq ( WamWord  expr1,
WamWord  expr2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Non_Fd_Var ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Non_Generic_Var ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Non_Var ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Number ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Partial_List ( WamWord  term)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Eq ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Gt ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Gte ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Lt ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Lte ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Term_Neq ( WamWord  term1,
WamWord  term2 
)

Here is the call graph for this function:

Bool Pl_Builtin_Univ ( WamWord  term_word,
WamWord  list_word 
)

Here is the call graph for this function:

Bool Pl_Builtin_Var ( WamWord  term)

Here is the call graph for this function:

void Pl_Emit_Syntax_Error ( char *  file_name,
int  err_line,
int  err_col,
char *  err_msg 
)

Here is the call graph for this function:

void Pl_Exec_Continuation ( int  func,
int  arity,
WamWord arg_adr 
)

Here is the call graph for this function:

void Pl_Foreign_Create_Choice ( CodePtr  codep_alt,
int  arity,
int  choice_size 
)

Here is the call graph for this function:

CodePtr Pl_Foreign_Jump_Ret ( CodePtr  codep)
PlFIOArg* Pl_Foreign_Rd_IO_Arg ( int  arg_long,
WamWord  start_word,
PlLong(*)()  rd_fct,
int  fio_arg_index 
)
Bool Pl_Foreign_Un_IO_Arg ( int  arg_long,
Bool(*)()  un_fct,
PlFIOArg fa,
WamWord  start_word 
)
void Pl_Foreign_Update_Choice ( CodePtr  codep_alt,
int  arity,
int  choice_size 
)

Here is the call graph for this function:

WamWord Pl_Get_Exception ( void  )
Bool Pl_Is_Valid_Atom ( int  atom)
void Pl_Math_Evaluate ( WamWord  expr,
WamWord result 
)

Here is the call graph for this function:

void Pl_No_More_Choice ( void  )
void Pl_Query_Begin ( Bool  recoverable)

Here is the call graph for this function:

Here is the caller graph for this function:

int Pl_Query_Call ( int  func,
int  arity,
WamWord arg_adr 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Query_End ( int  op)

Here is the call graph for this function:

int Pl_Query_Next_Solution ( void  )

Here is the call graph for this function:

void Pl_Query_Recover_Alt_0 ( void  )

Here is the call graph for this function:

int Pl_Query_Start ( int  func,
int  arity,
WamWord arg_adr,
Bool  recoverable 
)

Here is the call graph for this function:

void Pl_Throw ( WamWord  ball_word)

Here is the call graph for this function:

int Pl_Type_Of_Term ( WamWord  start_word)
PlBool Pl_Unif ( PlTerm  term1,
PlTerm  term2 
)

Here is the call graph for this function:

PlBool Pl_Unif_With_Occurs_Check ( PlTerm  term1,
PlTerm  term2 
)

Here is the call graph for this function:

static CodePtr Prepare_Call ( int  func,
int  arity,
WamWord arg_adr 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Prolog_Prototype ( CALL_INTERNAL  ,
 
)
Prolog_Prototype ( THROW_INTERNAL  ,
 
)
Prolog_Prototype ( PL_QUERY_RECOVER_ALT  ,
 
)

Variable Documentation

PlFIOArg fio_arg_array[NB_OF_X_REGS]
static
WamWord* goal_H
static
double* pl_base_fd = pl_foreign_double
PlLong* pl_base_fl = pl_foreign_long
double pl_foreign_double[NB_OF_X_REGS]
PlLong pl_foreign_long[NB_OF_X_REGS]
WamWord pl_query_exception
WamWord* pl_query_top_b
WamWord* query_stack[QUERY_STACK_SIZE]
static
WamWord** query_stack_top = query_stack
static