GNU PROLOG with UTF8 support
Data Structures | Macros | Functions
wam_inst.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "engine_pl.h"
#include "unify.c"
Include dependency graph for wam_inst.c:

Data Structures

union  DblInt
 

Macros

#define CREATE_CHOICE_COMMON_PART(arity)
 
#define UPDATE_DELETE_COMMON_PART
 
#define UPDATE_CHOICE_COMMON_PART
 
#define DELETE_CHOICE_COMMON_PART
 
#define UNIFY_FCT_NAME   Pl_Unify
 
#define UNIFY_FCT_NAME   Pl_Unify_Occurs_Check
 
#define OCCURS_CHECK
 

Functions

static SwtInfLocate_Swt_Element (SwtTbl t, int size, PlLong key)
 
WamWord FC Pl_Create_Functor_Arity_Tagged (char *func_str, int arity)
 
SwtTbl FC Pl_Create_Swt_Table (int size)
 
void FC Pl_Create_Swt_Atm_Element (SwtTbl t, int size, int atom, CodePtr codep)
 
void FC Pl_Create_Swt_Stc_Element (SwtTbl t, int size, int func, int arity, CodePtr codep)
 
Bool FC Pl_Get_Atom_Tagged (WamWord w, WamWord start_word)
 
Bool FC Pl_Get_Atom (int atom, WamWord start_word)
 
Bool FC Pl_Get_Integer_Tagged (WamWord w, WamWord start_word)
 
Bool FC Pl_Get_Integer (PlLong n, WamWord start_word)
 
Bool FC Pl_Get_Float (double n, WamWord start_word)
 
Bool FC Pl_Get_Nil (WamWord start_word)
 
Bool FC Pl_Get_List (WamWord start_word)
 
Bool FC Pl_Get_Structure_Tagged (WamWord w, WamWord start_word)
 
Bool FC Pl_Get_Structure (int func, int arity, WamWord start_word)
 
WamWord FC Pl_Put_X_Variable (void)
 
WamWord FC Pl_Put_Y_Variable (WamWord *y_adr)
 
WamWord FC Pl_Put_Unsafe_Value (WamWord start_word)
 
WamWord FC Pl_Put_Atom_Tagged (WamWord w)
 
WamWord FC Pl_Put_Atom (int atom)
 
WamWord FC Pl_Put_Integer_Tagged (WamWord w)
 
WamWord FC Pl_Put_Integer (PlLong n)
 
WamWord FC Pl_Put_Float (double n)
 
WamWord FC Pl_Put_Nil (void)
 
WamWord FC Pl_Put_List (void)
 
WamWord FC Pl_Put_Structure_Tagged (WamWord w)
 
WamWord FC Pl_Put_Structure (int func, int arity)
 
WamWord FC Pl_Unify_Variable (void)
 
void FC Pl_Unify_Void (int n)
 
Bool FC Pl_Unify_Value (WamWord start_word)
 
Bool FC Pl_Unify_Local_Value (WamWord start_word)
 
Bool FC Pl_Unify_Atom_Tagged (WamWord w)
 
Bool FC Pl_Unify_Atom (int atom)
 
Bool FC Pl_Unify_Integer_Tagged (WamWord w)
 
Bool FC Pl_Unify_Integer (PlLong n)
 
Bool FC Pl_Unify_Nil (void)
 
Bool FC Pl_Unify_List (void)
 
Bool FC Pl_Unify_Structure_Tagged (WamWord w)
 
Bool FC Pl_Unify_Structure (int func, int arity)
 
WamWord FC Pl_Globalize_If_In_Local (WamWord start_word)
 
void FC Pl_Allocate (int n)
 
void FC Pl_Deallocate (void)
 
CodePtr FC Pl_Switch_On_Term (CodePtr c_var, CodePtr c_atm, CodePtr c_int, CodePtr c_lst, CodePtr c_stc)
 
CodePtr FC Pl_Switch_On_Term_Var_Atm (CodePtr c_var, CodePtr c_atm)
 
CodePtr FC Pl_Switch_On_Term_Var_Stc (CodePtr c_var, CodePtr c_stc)
 
CodePtr FC Pl_Switch_On_Term_Var_Atm_Lst (CodePtr c_var, CodePtr c_atm, CodePtr c_lst)
 
CodePtr FC Pl_Switch_On_Term_Var_Atm_Stc (CodePtr c_var, CodePtr c_atm, CodePtr c_stc)
 
CodePtr FC Pl_Switch_On_Atom (SwtTbl t, int size)
 
PlLong FC Pl_Switch_On_Integer (void)
 
CodePtr FC Pl_Switch_On_Structure (SwtTbl t, int size)
 
WamWord FC Pl_Get_Current_Choice (void)
 
void FC Pl_Cut (WamWord b_word)
 
void FC Pl_Soft_Cut (WamWord b_word)
 
void FC Pl_Global_Push_Float (double n)
 
double FC Pl_Obtain_Float (WamWord *adr)
 
void FC Pl_Create_Choice_Point (CodePtr codep_alt, int arity)
 
void FC Pl_Create_Choice_Point0 (CodePtr codep_alt)
 
void FC Pl_Create_Choice_Point1 (CodePtr codep_alt)
 
void FC Pl_Create_Choice_Point2 (CodePtr codep_alt)
 
void FC Pl_Create_Choice_Point3 (CodePtr codep_alt)
 
void FC Pl_Create_Choice_Point4 (CodePtr codep_alt)
 
void FC Pl_Update_Choice_Point (CodePtr codep_alt, int arity)
 
void FC Pl_Update_Choice_Point0 (CodePtr codep_alt)
 
void FC Pl_Update_Choice_Point1 (CodePtr codep_alt)
 
void FC Pl_Update_Choice_Point2 (CodePtr codep_alt)
 
void FC Pl_Update_Choice_Point3 (CodePtr codep_alt)
 
void FC Pl_Update_Choice_Point4 (CodePtr codep_alt)
 
void FC Pl_Delete_Choice_Point (int arity)
 
void FC Pl_Delete_Choice_Point0 (void)
 
void FC Pl_Delete_Choice_Point1 (void)
 
void FC Pl_Delete_Choice_Point2 (void)
 
void FC Pl_Delete_Choice_Point3 (void)
 
void FC Pl_Delete_Choice_Point4 (void)
 
void Pl_Defeasible_Open ()
 
void Pl_Defeasible_Undo ()
 
void Pl_Defeasible_Close (Bool success)
 
void FC Pl_Untrail (WamWord *low_adr)
 

Macro Definition Documentation

#define CREATE_CHOICE_COMMON_PART (   arity)
Value:
WamWord *old_B = B; \
WamWord *cur_B = Local_Top + CHOICE_STATIC_SIZE + arity; \
\
B = cur_B; \
ALTB(cur_B) = codep_alt; \
CPB(cur_B) = CP; \
BCIB(cur_B) = BCI; \
EB(cur_B) = E; \
BB(cur_B) = old_B; \
HB(cur_B) = HB1 = H; \
TRB(cur_B) = TR; \
CSB(cur_B) = CS; \
\
STAMP++
#define TRB(b)
Definition: wam_inst.h:102
#define ALTB(b)
Definition: wam_inst.h:96
#define CSB(b)
Definition: wam_inst.h:103
#define HB(b)
Definition: wam_inst.h:101
#define CPB(b)
Definition: wam_inst.h:97
#define EB(b)
Definition: wam_inst.h:99
#define CHOICE_STATIC_SIZE
Definition: wam_inst.h:94
#define BB(b)
Definition: wam_inst.h:100
#define BCIB(b)
Definition: wam_inst.h:98
long WamWord
Definition: LINUX_SIGSEGV.c:4
#define DELETE_CHOICE_COMMON_PART
Value:
Assign_B(BB(cur_B)); \
STAMP--
#define UPDATE_DELETE_COMMON_PART
Definition: wam_inst.c:1297
#define BB(b)
Definition: wam_inst.h:100
#define Assign_B(newB)
Definition: wam_inst.h:546
#define OCCURS_CHECK
#define UNIFY_FCT_NAME   Pl_Unify
#define UNIFY_FCT_NAME   Pl_Unify_Occurs_Check
#define UPDATE_CHOICE_COMMON_PART
Value:
ALTB(cur_B) = codep_alt; \
HB1 = H
#define UPDATE_DELETE_COMMON_PART
Definition: wam_inst.c:1297
#define ALTB(b)
Definition: wam_inst.h:96
#define UPDATE_DELETE_COMMON_PART
Value:
WamWord *cur_B = B; \
Pl_Untrail(TRB(cur_B)); \
\
CP = CPB(cur_B); \
BCI = BCIB(cur_B); \
H = HB(cur_B); \
E = EB(cur_B); \
CS = CSB(cur_B)
#define TRB(b)
Definition: wam_inst.h:102
#define CSB(b)
Definition: wam_inst.h:103
#define HB(b)
Definition: wam_inst.h:101
#define CPB(b)
Definition: wam_inst.h:97
#define EB(b)
Definition: wam_inst.h:99
#define BCIB(b)
Definition: wam_inst.h:98
long WamWord
Definition: LINUX_SIGSEGV.c:4
void FC Pl_Untrail(WamWord *low_adr)
Definition: wam_inst.c:1600

Function Documentation

static SwtInf * Locate_Swt_Element ( SwtTbl  t,
int  size,
PlLong  key 
)
static

Here is the caller graph for this function:

void FC Pl_Allocate ( int  n)

Here is the caller graph for this function:

void FC Pl_Create_Choice_Point ( CodePtr  codep_alt,
int  arity 
)

Here is the caller graph for this function:

void FC Pl_Create_Choice_Point0 ( CodePtr  codep_alt)

Here is the caller graph for this function:

void FC Pl_Create_Choice_Point1 ( CodePtr  codep_alt)
void FC Pl_Create_Choice_Point2 ( CodePtr  codep_alt)
void FC Pl_Create_Choice_Point3 ( CodePtr  codep_alt)
void FC Pl_Create_Choice_Point4 ( CodePtr  codep_alt)
WamWord FC Pl_Create_Functor_Arity_Tagged ( char *  func_str,
int  arity 
)

Here is the call graph for this function:

void FC Pl_Create_Swt_Atm_Element ( SwtTbl  t,
int  size,
int  atom,
CodePtr  codep 
)

Here is the call graph for this function:

void FC Pl_Create_Swt_Stc_Element ( SwtTbl  t,
int  size,
int  func,
int  arity,
CodePtr  codep 
)

Here is the call graph for this function:

SwtTbl FC Pl_Create_Swt_Table ( int  size)
void FC Pl_Cut ( WamWord  b_word)

Here is the caller graph for this function:

void FC Pl_Deallocate ( void  )

Here is the caller graph for this function:

void Pl_Defeasible_Close ( Bool  success)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Defeasible_Open ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Defeasible_Undo ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void FC Pl_Delete_Choice_Point ( int  arity)

Here is the caller graph for this function:

void FC Pl_Delete_Choice_Point0 ( void  )

Here is the caller graph for this function:

void FC Pl_Delete_Choice_Point1 ( void  )
void FC Pl_Delete_Choice_Point2 ( void  )
void FC Pl_Delete_Choice_Point3 ( void  )
void FC Pl_Delete_Choice_Point4 ( void  )
Bool FC Pl_Get_Atom ( int  atom,
WamWord  start_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Get_Atom_Tagged ( WamWord  w,
WamWord  start_word 
)

Here is the caller graph for this function:

WamWord FC Pl_Get_Current_Choice ( void  )

Here is the caller graph for this function:

Bool FC Pl_Get_Float ( double  n,
WamWord  start_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Get_Integer ( PlLong  n,
WamWord  start_word 
)

Here is the call graph for this function:

Bool FC Pl_Get_Integer_Tagged ( WamWord  w,
WamWord  start_word 
)

Here is the caller graph for this function:

Bool FC Pl_Get_List ( WamWord  start_word)

Here is the caller graph for this function:

Bool FC Pl_Get_Nil ( WamWord  start_word)

Here is the caller graph for this function:

Bool FC Pl_Get_Structure ( int  func,
int  arity,
WamWord  start_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Get_Structure_Tagged ( WamWord  w,
WamWord  start_word 
)

Here is the caller graph for this function:

void FC Pl_Global_Push_Float ( double  n)

Here is the caller graph for this function:

WamWord FC Pl_Globalize_If_In_Local ( WamWord  start_word)

Here is the caller graph for this function:

double FC Pl_Obtain_Float ( WamWord adr)

Here is the caller graph for this function:

WamWord FC Pl_Put_Atom ( int  atom)

Here is the caller graph for this function:

WamWord FC Pl_Put_Atom_Tagged ( WamWord  w)
WamWord FC Pl_Put_Float ( double  n)

Here is the call graph for this function:

Here is the caller graph for this function:

WamWord FC Pl_Put_Integer ( PlLong  n)

Here is the caller graph for this function:

WamWord FC Pl_Put_Integer_Tagged ( WamWord  w)
WamWord FC Pl_Put_List ( void  )

Here is the caller graph for this function:

WamWord FC Pl_Put_Nil ( void  )
WamWord FC Pl_Put_Structure ( int  func,
int  arity 
)

Here is the call graph for this function:

Here is the caller graph for this function:

WamWord FC Pl_Put_Structure_Tagged ( WamWord  w)

Here is the caller graph for this function:

WamWord FC Pl_Put_Unsafe_Value ( WamWord  start_word)

Here is the caller graph for this function:

WamWord FC Pl_Put_X_Variable ( void  )

Here is the caller graph for this function:

WamWord FC Pl_Put_Y_Variable ( WamWord y_adr)

Here is the caller graph for this function:

void FC Pl_Soft_Cut ( WamWord  b_word)

Here is the caller graph for this function:

CodePtr FC Pl_Switch_On_Atom ( SwtTbl  t,
int  size 
)

Here is the call graph for this function:

PlLong FC Pl_Switch_On_Integer ( void  )
CodePtr FC Pl_Switch_On_Structure ( SwtTbl  t,
int  size 
)

Here is the call graph for this function:

CodePtr FC Pl_Switch_On_Term ( CodePtr  c_var,
CodePtr  c_atm,
CodePtr  c_int,
CodePtr  c_lst,
CodePtr  c_stc 
)
CodePtr FC Pl_Switch_On_Term_Var_Atm ( CodePtr  c_var,
CodePtr  c_atm 
)
CodePtr FC Pl_Switch_On_Term_Var_Atm_Lst ( CodePtr  c_var,
CodePtr  c_atm,
CodePtr  c_lst 
)
CodePtr FC Pl_Switch_On_Term_Var_Atm_Stc ( CodePtr  c_var,
CodePtr  c_atm,
CodePtr  c_stc 
)
CodePtr FC Pl_Switch_On_Term_Var_Stc ( CodePtr  c_var,
CodePtr  c_stc 
)
Bool FC Pl_Unify_Atom ( int  atom)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Atom_Tagged ( WamWord  w)

Here is the caller graph for this function:

Bool FC Pl_Unify_Integer ( PlLong  n)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Integer_Tagged ( WamWord  w)

Here is the caller graph for this function:

Bool FC Pl_Unify_List ( void  )

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Local_Value ( WamWord  start_word)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Nil ( void  )

Here is the caller graph for this function:

Bool FC Pl_Unify_Structure ( int  func,
int  arity 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Structure_Tagged ( WamWord  w)

Here is the call graph for this function:

Here is the caller graph for this function:

Bool FC Pl_Unify_Value ( WamWord  start_word)

Here is the call graph for this function:

Here is the caller graph for this function:

WamWord FC Pl_Unify_Variable ( void  )

Here is the caller graph for this function:

void FC Pl_Unify_Void ( int  n)

Here is the caller graph for this function:

void FC Pl_Untrail ( WamWord low_adr)
void FC Pl_Update_Choice_Point ( CodePtr  codep_alt,
int  arity 
)

Here is the caller graph for this function:

void FC Pl_Update_Choice_Point0 ( CodePtr  codep_alt)

Here is the caller graph for this function:

void FC Pl_Update_Choice_Point1 ( CodePtr  codep_alt)
void FC Pl_Update_Choice_Point2 ( CodePtr  codep_alt)
void FC Pl_Update_Choice_Point3 ( CodePtr  codep_alt)
void FC Pl_Update_Choice_Point4 ( CodePtr  codep_alt)