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

Data Structures

struct  DynScan
 

Macros

#define DYN_STAMP_NONE   ((DynStamp) -1)
 
#define ALL_MUST_BE_ERASED   (DynCInf *) 2 /* bit 0 used for mark */
 
#define MAX_KBYTES_BEFORE_CLEAN   512
 
#define MAX_SIZE_BEFORE_CLEAN   (MAX_KBYTES_BEFORE_CLEAN * 1024 / sizeof(WamWord))
 
#define START_DYNAMIC_SWT_SIZE   32
 
#define NO_INDEX   0
 
#define VAR_INDEX   1
 
#define ATM_INDEX   2
 
#define INT_INDEX   3
 
#define LST_INDEX   4
 
#define STC_INDEX   5
 
#define SCAN_DYN_TEST_ALT   X1_247363616E5F64796E5F746573745F616C74
 
#define SCAN_DYN_JUMP_ALT   X1_247363616E5F64796E5F6A756D705F616C74
 

Functions

static DynPInfAlloc_Init_Dyn_Info (PredInf *pred, int arity)
 
static int Index_From_First_Arg (WamWord first_arg_word, PlLong *key)
 
static void Add_To_2Chain (D2ChHdr *hdr, DynCInf *clause, Bool in_seq_chain, Bool asserta)
 
static void Remove_From_2Chain (D2ChHdr *hdr, DynCInf *clause, Bool in_seq_chain)
 
static void Erase_All (DynPInf *dyn)
 
static void Erase_All_Clauses_Of_File (DynPInf *dyn, int pl_file)
 
static void Clean_Erased_Clauses (void)
 
static void Unlink_Clause (DynCInf *clause)
 
static void Free_Clause (DynCInf *clause)
 
static DynScanGet_Scan_Choice_Point (WamWord *b)
 
static DynCInfScan_Dynamic_Pred_Next (DynScan *scan)
 
 Prolog_Prototype (SCAN_DYN_TEST_ALT, 0)
 
 Prolog_Prototype (SCAN_DYN_JUMP_ALT, 0)
 
DynCInfPl_Add_Dynamic_Clause (WamWord head_word, WamWord body_word, Bool asserta, Bool check_perm, int pl_file)
 
void Pl_Delete_Dynamic_Clause (DynCInf *clause)
 
PredInfPl_Update_Dynamic_Pred (int func, int arity, int what_to_do, int pl_file_for_multi)
 
DynCInfPl_Scan_Dynamic_Pred (int owner_func, int owner_arity, DynPInf *dyn, WamWord first_arg_word, ScanFct alt_fct, int alt_fct_type, int alt_info_size, WamWord *alt_info)
 
PlLong Pl_Scan_Dynamic_Pred_Alt_0 (void)
 
int Pl_Scan_Choice_Point_Pred (WamWord *b, int *arity)
 
void Pl_Copy_Clause_To_Heap (DynCInf *clause, WamWord *head_word, WamWord *body_word)
 

Variables

static DynStamp erase_stamp = 1
 
static DynPInffirst_dyn_with_erase = NULL
 
static int size_of_erased = 0
 

Macro Definition Documentation

#define ALL_MUST_BE_ERASED   (DynCInf *) 2 /* bit 0 used for mark */
#define ATM_INDEX   2
#define DYN_STAMP_NONE   ((DynStamp) -1)
#define INT_INDEX   3
#define LST_INDEX   4
#define MAX_KBYTES_BEFORE_CLEAN   512
#define MAX_SIZE_BEFORE_CLEAN   (MAX_KBYTES_BEFORE_CLEAN * 1024 / sizeof(WamWord))
#define NO_INDEX   0
#define SCAN_DYN_JUMP_ALT   X1_247363616E5F64796E5F6A756D705F616C74
#define SCAN_DYN_TEST_ALT   X1_247363616E5F64796E5F746573745F616C74
#define START_DYNAMIC_SWT_SIZE   32
#define STC_INDEX   5
#define VAR_INDEX   1

Function Documentation

static void Add_To_2Chain ( D2ChHdr hdr,
DynCInf clause,
Bool  in_seq_chain,
Bool  asserta 
)
static

Here is the caller graph for this function:

static DynPInf * Alloc_Init_Dyn_Info ( PredInf pred,
int  arity 
)
static

Here is the caller graph for this function:

static void Clean_Erased_Clauses ( void  )
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Erase_All ( DynPInf dyn)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Erase_All_Clauses_Of_File ( DynPInf dyn,
int  pl_file 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static void Free_Clause ( DynCInf clause)
static

Here is the caller graph for this function:

static DynScan * Get_Scan_Choice_Point ( WamWord b)
static

Here is the caller graph for this function:

static int Index_From_First_Arg ( WamWord  first_arg_word,
PlLong key 
)
static

Here is the caller graph for this function:

DynCInf* Pl_Add_Dynamic_Clause ( WamWord  head_word,
WamWord  body_word,
Bool  asserta,
Bool  check_perm,
int  pl_file 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Copy_Clause_To_Heap ( DynCInf clause,
WamWord head_word,
WamWord body_word 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Pl_Delete_Dynamic_Clause ( DynCInf clause)

Here is the call graph for this function:

Here is the caller graph for this function:

int Pl_Scan_Choice_Point_Pred ( WamWord b,
int *  arity 
)

Here is the call graph for this function:

Here is the caller graph for this function:

DynCInf* Pl_Scan_Dynamic_Pred ( int  owner_func,
int  owner_arity,
DynPInf dyn,
WamWord  first_arg_word,
ScanFct  alt_fct,
int  alt_fct_type,
int  alt_info_size,
WamWord alt_info 
)

Here is the call graph for this function:

Here is the caller graph for this function:

PlLong Pl_Scan_Dynamic_Pred_Alt_0 ( void  )

Here is the call graph for this function:

PredInf* Pl_Update_Dynamic_Pred ( int  func,
int  arity,
int  what_to_do,
int  pl_file_for_multi 
)

Here is the call graph for this function:

Here is the caller graph for this function:

Prolog_Prototype ( SCAN_DYN_TEST_ALT  ,
 
)
Prolog_Prototype ( SCAN_DYN_JUMP_ALT  ,
 
)
static void Remove_From_2Chain ( D2ChHdr hdr,
DynCInf clause,
Bool  in_seq_chain 
)
static

Here is the caller graph for this function:

static DynCInf * Scan_Dynamic_Pred_Next ( DynScan scan)
static

Here is the caller graph for this function:

static void Unlink_Clause ( DynCInf clause)
static

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

DynStamp erase_stamp = 1
static
DynPInf* first_dyn_with_erase = NULL
static
int size_of_erased = 0
static