YAP 7.1.0
absmi.c File Reference

We next discuss several issues on trying to make Prolog programs run fast in YAP. More...

#include "absmi.h"
#include "heapgc.h"
#include "arith2.h"
#include "absmi_insts.h"

Go to the source code of this file.

Macros

#define IN_ABSMI_C   1
 code belongs to the emulator More...
 
#define _INATIV
 
#define HAS_CACHE_REGS   1
 use tmp variables that are placed in registers More...
 
#define DEBUG_INTERRUPTS()
 
#define YREG   YENV
 
#define I_R   (XREGS[0])
 

Functions

Int Yap_absmi (int inp)
 
int Yap_absmiEND (void)
 

Variables

long long vsc_count
 
void ** Yap_ABSMI_OPCODES
 
Term Yap_XREGS [MaxTemps]
 

Detailed Description

We next discuss several issues on trying to make Prolog programs run fast in YAP.

We assume two different programming styles:

  • Exwaution of deterministic programs often boils down to a recursive loop of the form:
loop(Done).
loop(Env) :-
do_something(Env,NewEnv),
loop(NewEnv).

or to the repeat-fail loop:

loop(Inp) :-
do_something(Inp,Out),
out_and_fail(Out).

Definition in file absmi.c.