• No results found

This is maybe the most dicult thing to extend. It is not impossible but it is far from trivial.

Before you add a new tag you should make sure that the desired behavior can't be achieved with a generic object. To start with you have to look at the following les.

1. term.h First you have to add your new tag to the proper tag value (enumerated type). Care should be taken to add the tag in an order which conforms with it's behavior.

When the tag value is extended you must make sure that all constants are up to date (TAG-MASK, POINTERMASK etc.). Macros to identify the new tag should also be added and possibly macros to handle the new object. The macros IsVar, IsNonVar, IsComplex, and

IsNumber might have to be changed.

2. unify.h Here you might have to modify the macros for dereferencing and trailing.

3. unify.c The uni cation table (unifytable) has to be extended to cover the new tag, and possibly extend the switch in unify.

4. inline.cAll you have to do here is to extend the table used when comparing objects (compare_

table), and possibly extend the switch incompare_term.

5. display.cHere you have to add code to print your new object in display_term.

6. assert.c Depending on whether you want to be able to assert clauses containing objects objects this kind or not you may have to extendcompile_headand compile_head_str. 7. gc.c&gc.hIt may or may not be a problem. If you add a new object which doesn't contain

references to other objects, and all words in the object has room for the GC-bits, then you are home free. Otherwise it will be a bit more complicated. I recommend taking a look at

\Garbage Collection for Prolog Based on WAM" by K. Appleby, M. Carlsson, S. Haridi and D. Sahlin, Communications of the AMC, June 1988, Volume 31, Number 6.

Predicate Index

$

$arg/3:::::::::::::::::::::::::::::::::::::::::::: 91

$atom/1::::::::::::::::::::::::::::::::::::::::::: 92

$atomic/1::::::::::::::::::::::::::::::::::::::::: 92

$b and/3:::::::::::::::::::::::::::::::::::::::::: 93

$b or/3:::::::::::::::::::::::::::::::::::::::::::: 93

$b xor/3:::::::::::::::::::::::::::::::::::::::::: 93

$close/1:::::::::::::::::::::::::::::::::::::::::: 95

$code file/2:::::::::::::::::::::::::::::::::::::: 95

$compare/3:::::::::::::::::::::::::::::::::::::::: 91

$current input/1::::::::::::::::::::::::::::::::: 94

$current output/1:::::::::::::::::::::::::::::::: 95

$div/3:::::::::::::::::::::::::::::::::::::::::::: 93

$eq univ/2:::::::::::::::::::::::::::::::::::::::: 91

$eval math/2:::::::::::::::::::::::::::::::::::::: 93

$fdopen/4::::::::::::::::::::::::::::::::::::::::: 95

$file code/2:::::::::::::::::::::::::::::::::::::: 95

$file mod time:::::::::::::::::::::::::::::::::::: 95

$float/1:::::::::::::::::::::::::::::::::::::::::: 92

$flush stream/1:::::::::::::::::::::::::::::::::: 94

$fopen/4:::::::::::::::::::::::::::::::::::::::::: 95

$functor/3:::::::::::::::::::::::::::::::::::::::: 91

$ge univ/2:::::::::::::::::::::::::::::::::::::::: 92

$get stream/2::::::::::::::::::::::::::::::::::::: 94

$get0 stream/2::::::::::::::::::::::::::::::::::: 94

$gt univ/2:::::::::::::::::::::::::::::::::::::::: 92

$ineq univ/2:::::::::::::::::::::::::::::::::::::: 91

$intdiv/3::::::::::::::::::::::::::::::::::::::::: 93

$integer/1:::::::::::::::::::::::::::::::::::::::: 92

$le univ/2:::::::::::::::::::::::::::::::::::::::: 91

$load/1::::::::::::::::::::::::::::::::::::::::::: 96

$lt univ/2:::::::::::::::::::::::::::::::::::::::: 91

$minus/3:::::::::::::::::::::::::::::::::::::::::: 92

$minus 1/2:::::::::::::::::::::::::::::::::::::::: 93

$mod/3:::::::::::::::::::::::::::::::::::::::::::: 93

$nl/1:::::::::::::::::::::::::::::::::::::::::::::: 94

$nonvar/1::::::::::::::::::::::::::::::::::::::::: 92

$number/1::::::::::::::::::::::::::::::::::::::::: 92

$plus/3::::::::::::::::::::::::::::::::::::::::::: 92

$plus 1/2::::::::::::::::::::::::::::::::::::::::: 92

$qload/1:::::::::::::::::::::::::::::::::::::::::: 96

$set input/2:::::::::::::::::::::::::::::::::::::: 95

$set output/2::::::::::::::::::::::::::::::::::::: 95

$statistics global/1::::::::::::::::::::::::::::: 96

$statistics local/1:::::::::::::::::::::::::::::: 96

$statistics memory/1::::::::::::::::::::::::::::: 96

$statistics runtime/1::::::::::::::::::::::::::: 96

$statistics trail/1:::::::::::::::::::::::::::::: 96

$stream code/2::::::::::::::::::::::::::::::::::: 95

$stream file/2::::::::::::::::::::::::::::::::::: 95

$stream mode/2::::::::::::::::::::::::::::::::::: 95

$stream name/2::::::::::::::::::::::::::::::::::: 95

$streams/1:::::::::::::::::::::::::::::::::::::::: 95

$times/3:::::::::::::::::::::::::::::::::::::::::: 93

$tofloat/2:::::::::::::::::::::::::::::::::::::::: 93

$tointeger/2::::::::::::::::::::::::::::::::::::: 93

$un minus/2::::::::::::::::::::::::::::::::::::::: 93

$univ/2::::::::::::::::::::::::::::::::::::::::::: 93

$var/1:::::::::::::::::::::::::::::::::::::::::::: 92

$write/2:::::::::::::::::::::::::::::::::::::::::: 94

D

display/1::::::::::::::::::::::::::::::::::::::::: 94

display/2::::::::::::::::::::::::::::::::::::::::: 94

F

fail/0:::::::::::::::::::::::::::::::::::::::::::: 96

flush/0::::::::::::::::::::::::::::::::::::::::::: 94

G

get/1::::::::::::::::::::::::::::::::::::::::::::::94

get0/1:::::::::::::::::::::::::::::::::::::::::::: 94

H

halt/0:::::::::::::::::::::::::::::::::::::::::::: 96

I

is/2::::::::::::::::::::::::::::::::::::::::::::::: 96

N

name/2:::::::::::::::::::::::::::::::::::::::::::: 96

nl/0::::::::::::::::::::::::::::::::::::::::::::::: 94

P

put/1:::::::::::::::::::::::::::::::::::::::::::::: 94

S

setarg/3:::::::::::::::::::::::::::::::::::::::::: 97

statistics/0::::::::::::::::::::::::::::::::::::: 96

T

true/0:::::::::::::::::::::::::::::::::::::::::::: 97

ttyflush/0:::::::::::::::::::::::::::::::::::::::: 94

ttyget/1:::::::::::::::::::::::::::::::::::::::::: 94

ttyget0/1::::::::::::::::::::::::::::::::::::::::: 94

ttynl/0::::::::::::::::::::::::::::::::::::::::::: 94

ttyput/1:::::::::::::::::::::::::::::::::::::::::: 94

U

unique name/3::::::::::::::::::::::::::::::::::::: 97

V

version/0::::::::::::::::::::::::::::::::::::::::: 97

W

wamdebug/0:::::::::::::::::::::::::::::::::::::::: 97

wamnodebug/0::::::::::::::::::::::::::::::::::::: 97

write/1::::::::::::::::::::::::::::::::::::::::::: 94

Macro and Instruction Index

A

allocate:::::::::::::::::::::::::::::::::::::::::: 38

Arityfy::::::::::::::::::::::::::::::::::::::::::: 78

ArityOf::::::::::::::::::::::::::::::::::::::::::: 78

await leftmost::::::::::::::::::::::::::::::::::: 62

await nonvar:::::::::::::::::::::::::::::::::::::: 62

await nonvar unify::::::::::::::::::::::::::::::: 65

await strictly nonvar:::::::::::::::::::::::::::: 63

await strictly nonvar unify::::::::::::::::::::: 66

await variable::::::::::::::::::::::::::::::::::: 64

await variable unify::::::::::::::::::::::::::::: 67

B

Bind::::::::::::::::::::::::::::::::::::::::::::::: 78

Bind HVA:::::::::::::::::::::::::::::::::::::::::: 79

Bind SVA:::::::::::::::::::::::::::::::::::::::::: 79

build neglist::::::::::::::::::::::::::::::::::::: 53

build neglist value:::::::::::::::::::::::::::::: 54

build poslist::::::::::::::::::::::::::::::::::::: 51

build poslist value:::::::::::::::::::::::::::::: 52

build rec poslist:::::::::::::::::::::::::::::::: 50

build variables:::::::::::::::::::::::::::::::::: 54

builtin::::::::::::::::::::::::::::::::::::::::::: 34

C

call::::::::::::::::::::::::::::::::::::::::::::::: 38

choice x:::::::::::::::::::::::::::::::::::::::::: 33

choice y:::::::::::::::::::::::::::::::::::::::::: 34

CreateHVA::::::::::::::::::::::::::::::::::::::::: 79

cut:::::::::::::::::::::::::::::::::::::::::::::::: 34

cut x:::::::::::::::::::::::::::::::::::::::::::::: 34

cut y:::::::::::::::::::::::::::::::::::::::::::::: 34

D

deallocate:::::::::::::::::::::::::::::::::::::::: 38

Deref:::::::::::::::::::::::::::::::::::::::::::::: 80

DerefHVA:::::::::::::::::::::::::::::::::::::::::: 80

Dispatch:::::::::::::::::::::::::::::::::::::::::: 81

DispatchLabel:::::::::::::::::::::::::::::::::::: 81

DispatchUp:::::::::::::::::::::::::::::::::::::::: 82

E

execute::::::::::::::::::::::::::::::::::::::::::: 38

F

fail::::::::::::::::::::::::::::::::::::::::::::::: 40

G

get constant:::::::::::::::::::::::::::::::::::::: 41

get constant x0::::::::::::::::::::::::::::::::::: 32

get list:::::::::::::::::::::::::::::::::::::::::: 42

get list x0::::::::::::::::::::::::::::::::::::::: 33

Get Local Stack Top:::::::::::::::::::::::::::::: 83

get nil:::::::::::::::::::::::::::::::::::::::::::: 42

get nil x0:::::::::::::::::::::::::::::::::::::::: 32

get structure::::::::::::::::::::::::::::::::::::: 42

get structure x0::::::::::::::::::::::::::::::::::32

Get UseArgs::::::::::::::::::::::::::::::::::::::: 83

get x value::::::::::::::::::::::::::::::::::::::: 41

get x variable:::::::::::::::::::::::::::::::::::: 41

get y first value::::::::::::::::::::::::::::::::: 41

get y value::::::::::::::::::::::::::::::::::::::: 41

get y variable:::::::::::::::::::::::::::::::::::: 41

GetArg:::::::::::::::::::::::::::::::::::::::::::: 82

GetArity:::::::::::::::::::::::::::::::::::::::::: 82

GetCar:::::::::::::::::::::::::::::::::::::::::::: 82

GetCdr:::::::::::::::::::::::::::::::::::::::::::: 82

GetFunctor:::::::::::::::::::::::::::::::::::::::: 82

GetInlineArity::::::::::::::::::::::::::::::::::: 82

GetInlineFnk::::::::::::::::::::::::::::::::::::: 82

GetMethod::::::::::::::::::::::::::::::::::::::::: 82

GetNumber::::::::::::::::::::::::::::::::::::::::: 82

I

InitCont:::::::::::::::::::::::::::::::::::::::::: 83

initialize left:::::::::::::::::::::::::::::::::: 60

initialize right::::::::::::::::::::::::::::::::: 60

inline:::::::::::::::::::::::::::::::::::::::::::: 35

IsATM:::::::::::::::::::::::::::::::::::::::::::::: 83

IsHVA:::::::::::::::::::::::::::::::::::::::::::::: 83

IsLST:::::::::::::::::::::::::::::::::::::::::::::: 83

IsNumber:::::::::::::::::::::::::::::::::::::::::: 83

IsSTR:::::::::::::::::::::::::::::::::::::::::::::: 83

IsUnsafe:::::::::::::::::::::::::::::::::::::::::: 83

IsVar:::::::::::::::::::::::::::::::::::::::::::::: 83

L

LoadHVA::::::::::::::::::::::::::::::::::::::::::: 83

LoadSVA::::::::::::::::::::::::::::::::::::::::::: 84

lock and get list::::::::::::::::::::::::::::::::: 71

lock and get structure::::::::::::::::::::::::::: 71

M

Make LST:::::::::::::::::::::::::::::::::::::::::: 84

Make LST S:::::::::::::::::::::::::::::::::::::::: 84

Make STR:::::::::::::::::::::::::::::::::::::::::: 84

Make STR S:::::::::::::::::::::::::::::::::::::::: 84

meta call::::::::::::::::::::::::::::::::::::::::: 35

meta execute:::::::::::::::::::::::::::::::::::::: 35

P

par builtin::::::::::::::::::::::::::::::::::::::: 68

par inline:::::::::::::::::::::::::::::::::::::::: 69

PointerToTerm:::::::::::::::::::::::::::::::::::: 84

PopCont::::::::::::::::::::::::::::::::::::::::::: 84

proceed::::::::::::::::::::::::::::::::::::::::::: 40

PushCont:::::::::::::::::::::::::::::::::::::::::: 84

PushOnHeap:::::::::::::::::::::::::::::::::::::::: 85

put constant:::::::::::::::::::::::::::::::::::::: 44

put global arg:::::::::::::::::::::::::::::::::::: 56

put list:::::::::::::::::::::::::::::::::::::::::: 45

put nil:::::::::::::::::::::::::::::::::::::::::::: 44

put nth head:::::::::::::::::::::::::::::::::::::: 56

put nth tail:::::::::::::::::::::::::::::::::::::: 56

put structure::::::::::::::::::::::::::::::::::::: 45

put x unsafe value:::::::::::::::::::::::::::::::: 44

put x value::::::::::::::::::::::::::::::::::::::: 44

put x variable:::::::::::::::::::::::::::::::::::: 43

put x void:::::::::::::::::::::::::::::::::::::::: 43

put y unsafe value:::::::::::::::::::::::::::::::: 44

put y value::::::::::::::::::::::::::::::::::::::: 44

put y variable:::::::::::::::::::::::::::::::::::: 44

put y void:::::::::::::::::::::::::::::::::::::::: 43

R

RefHVA:::::::::::::::::::::::::::::::::::::::::::: 85

RefStackUnsafe::::::::::::::::::::::::::::::::::: 85

RefVar:::::::::::::::::::::::::::::::::::::::::::: 85

retry::::::::::::::::::::::::::::::::::::::::::::::30

retry me else::::::::::::::::::::::::::::::::::::: 32

S

spawn left:::::::::::::::::::::::::::::::::::::::: 61

spawn right::::::::::::::::::::::::::::::::::::::: 60

start left body::::::::::::::::::::::::::::::::::: 59

start right body::::::::::::::::::::::::::::::::::58

switch on constant::::::::::::::::::::::::::::::: 28

switch on structure:::::::::::::::::::::::::::::: 29

switch on term:::::::::::::::::::::::::::::::::::: 27

T

Tagify:::::::::::::::::::::::::::::::::::::::::::: 85

Tagof::::::::::::::::::::::::::::::::::::::::::::::85

TagToPointer::::::::::::::::::::::::::::::::::::: 85

TidyTrail::::::::::::::::::::::::::::::::::::::::: 85

Trail HVA::::::::::::::::::::::::::::::::::::::::: 87

Trail SVA::::::::::::::::::::::::::::::::::::::::: 87

trust::::::::::::::::::::::::::::::::::::::::::::::31

trust me:::::::::::::::::::::::::::::::::::::::::: 32

try:::::::::::::::::::::::::::::::::::::::::::::::: 30

try me else::::::::::::::::::::::::::::::::::::::: 31

U

UnBind HVA:::::::::::::::::::::::::::::::::::::::: 87

UndoValue::::::::::::::::::::::::::::::::::::::::: 88

Unify::::::::::::::::::::::::::::::::::::::::::::::88

unify constant::::::::::::::::::::::::::::::::::: 47

unify global arg::::::::::::::::::::::::::::::::::57

unify list:::::::::::::::::::::::::::::::::::::::: 49

unify nil::::::::::::::::::::::::::::::::::::::::: 48

unify nth head:::::::::::::::::::::::::::::::::::: 56

unify nth tail:::::::::::::::::::::::::::::::::::: 56

unify structure:::::::::::::::::::::::::::::::::: 48

unify void:::::::::::::::::::::::::::::::::::::::: 45

unify x local value:::::::::::::::::::::::::::::: 47

unify x value::::::::::::::::::::::::::::::::::::: 46

unify x variable:::::::::::::::::::::::::::::::::: 45

unify y first value:::::::::::::::::::::::::::::: 46

unify y local value:::::::::::::::::::::::::::::: 47

unify y value::::::::::::::::::::::::::::::::::::: 46

unify y variable:::::::::::::::::::::::::::::::::: 45

unlock:::::::::::::::::::::::::::::::::::::::::::: 72

Unwind Trail:::::::::::::::::::::::::::::::::::::: 88

W

Worker Unwind Trail:::::::::::::::::::::::::::::: 89

WriteLocalValue:::::::::::::::::::::::::::::::::: 90

Data Type, Struct and VariableIndex

A

atom:::::::::::::::::::::::::::::::::::::::::::::::: 7

atom bucket:::::::::::::::::::::::::::::::::::::::: 7

B

BOOL:::::::::::::::::::::::::::::::::::::::::::::::: 6

C

choicepoint::::::::::::::::::::::::::::::::::::::: 11

code:::::::::::::::::::::::::::::::::::::::::::::::: 6

D

definfo:::::::::::::::::::::::::::::::::::::::::::: 8

definition::::::::::::::::::::::::::::::::::::::::: 8

E

enter instruction::::::::::::::::::::::::::::::::: 8

environment::::::::::::::::::::::::::::::::::::::: 11

F

float::::::::::::::::::::::::::::::::::::::::::::::: 7

G

generic::::::::::::::::::::::::::::::::::::::::::: 10

globalvar::::::::::::::::::::::::::::::::::::::::: 13

L

list:::::::::::::::::::::::::::::::::::::::::::::::: 9

M

MALLOCBASE::::::::::::::::::::::::::::::::::::::::: 4

method:::::::::::::::::::::::::::::::::::::::::::: 10

S

s32::::::::::::::::::::::::::::::::::::::::::::::::: 6

SIZE::::::::::::::::::::::::::::::::::::::::::::::: 10

structure:::::::::::::::::::::::::::::::::::::::::: 9

T

tag:::::::::::::::::::::::::::::::::::::::::::::::: 77

TAGGED::::::::::::::::::::::::::::::::::::::::::::: 6

tagvalue:::::::::::::::::::::::::::::::::::::::::: 77

U

u32::::::::::::::::::::::::::::::::::::::::::::::::: 6

UNTAGGED::::::::::::::::::::::::::::::::::::::::::: 6

V

variable:::::::::::::::::::::::::::::::::::::::::: 10

variable, constrained::::::::::::::::::::::::::::10

Concept Index

A

area, code:::::::::::::::::::::::::::::::::::::::::: 7 area, data:::::::::::::::::::::::::::::::::::::::::::6 area, dynamic:::::::::::::::::::::::::::::::::::::::6 area, static::::::::::::::::::::::::::::::::::::::: 6, 7 atom::::::::::::::::::::::::::::::::::::::::::::::: 4 atom table:::::::::::::::::::::::::::::::::::::::: 105 atom, de nition::::::::::::::::::::::::::::::::::::: 7 atom, mode::::::::::::::::::::::::::::::::::::::::: 7 atom, print name::::::::::::::::::::::::::::::::::: 7 atom, table::::::::::::::::::::::::::::::::::::::::: 7

B

binding, illegal::::::::::::::::::::::::::::::::: 10, 11 booting:::::::::::::::::::::::::::::::::::::::::::: 17 bound variable:::::::::::::::::::::::::::::::::::::: 4 builtin::::::::::::::::::::::::::::::::::::::::::::: 91 builtin C predicate:::::::::::::::::::::::::::::::::: 8 builtin C predicates::::::::::::::::::::::::::: 91, 106 bytecode format:::::::::::::::::::::::::::::::::: 101

C

choicepoint stack:::::::::::::::::::::::::::::::::: 10 clause, compiled:::::::::::::::::::::::::::::::::::: 8 code area::::::::::::::::::::::::::::::::::::::::::: 7 code format:::::::::::::::::::::::::::::::::::::::: 99 command line:::::::::::::::::::::::::::::::::::::: 17 compiled clause::::::::::::::::::::::::::::::::::::: 8 compound term:::::::::::::::::::::::::::::::: 3, 4, 9 conditionally bound variable:::::::::::::::::::::::: 4 constant:::::::::::::::::::::::::::::::::::::::::::: 3 constants:::::::::::::::::::::::::::::::::::::::::: 77

D

data area::::::::::::::::::::::::::::::::::::::::::: 6 debug::::::::::::::::::::::::::::::::::::::::::::: 20 delay:::::::::::::::::::::::::::::::::::::::::::::: 21 dereferencing::::::::::::::::::::::::::::::::::::::: 4 dynamic area::::::::::::::::::::::::::::::::::::::: 6

E

emulator macro:::::::::::::::::::::::::::::::::::: 78 emulator overview::::::::::::::::::::::::::::::::: 17 environment stack::::::::::::::::::::::::::::::::: 10 event:::::::::::::::::::::::::::::::::::::::::: 21, 38 extending::::::::::::::::::::::::::::::::::::::::: 105

F

oat, object::::::::::::::::::::::::::::::::::::::::: 7 freeze:::::::::::::::::::::::::::::::::::::::::: 21, 22 frozen goals, waking::::::::::::::::::::::::::::::: 22 functor::::::::::::::::::::::::::::::::::::::::::: 4, 5

G

gc::::::::::::::::::::::::::::::::::::::::::::::::: 38 gc bits:::::::::::::::::::::::::::::::::::::::::::::: 4 general uni cation::::::::::::::::::::::::::::::::: 72 generic object:::::::::::::::::::::::::::::: 3, 4, 9, 12 get instructions:::::::::::::::::::::::::::::::::::: 41 global stack::::::::::::::::::::::::::::::::::::::::: 8 global variables:::::::::::::::::::::::::::::::::::: 13 globalizing::::::::::::::::::::::::::::::::::::::::: 10

H

heap:::::::::::::::::::::::::::::::::::::::::::::::: 8

I

illegal binding:::::::::::::::::::::::::::::::::: 10, 11 indexing instructions::::::::::::::::::::::::::::::: 27 inlineable predicate::::::::::::::::::::::::: 8, 91, 107 instruction set::::::::::::::::::::::::::::: 27, 99, 105 instructions, get::::::::::::::::::::::::::::::::::: 41 instructions, indexing:::::::::::::::::::::::::::::: 27 instructions, procedural:::::::::::::::::::::::::::: 37 instructions, put::::::::::::::::::::::::::::::::::: 43 instructions, utility:::::::::::::::::::::::::::::::: 33 internal overview:::::::::::::::::::::::::::::::::: 18 internal overview, parallel:::::::::::::::::::::::::: 19 interpreted predicate:::::::::::::::::::::::::::::::: 8

introduction:::::::::::::::::::::::::::::::::::::::: 1

L

list object:::::::::::::::::::::::::::::::::::::::: 4, 9 local stack::::::::::::::::::::::::::::::::::::::::: 10

M

macro:::::::::::::::::::::::::::::::::::::::::: 77, 78 macro, emulator::::::::::::::::::::::::::::::::::: 78 method::::::::::::::::::::::::::::::::::::::::::::: 9 model, storage:::::::::::::::::::::::::::::::::::::: 3

N

notation:::::::::::::::::::::::::::::::::::::::::::: 1 notational conventions:::::::::::::::::::::::::::::: 1 number::::::::::::::::::::::::::::::::::::::::::::: 4

O

object, oat:::::::::::::::::::::::::::::::::::::::::7 object, generic:::::::::::::::::::::::::::::::::::::: 9 object, list:::::::::::::::::::::::::::::::::::::::::: 9 object, structure:::::::::::::::::::::::::::::::::::: 9

P

pdl::::::::::::::::::::::::::::::::::::::::::::::::: 6 permanent variable::::::::::::::::::::::::::::::::: 3 predicate, builtin::::::::::::::::::::::::::::::::::::8 predicate, de nition::::::::::::::::::::::::::::::::: 8 predicate, inlineable::::::::::::::::::::::::::::::::: 8 predicate, interpreted::::::::::::::::::::::::::::::: 8 procedural instructions::::::::::::::::::::::::::::: 37 put instructions:::::::::::::::::::::::::::::::::::: 43

Q

qload format:::::::::::::::::::::::::::::::::::::: 104

R

register, wam:::::::::::::::::::::::::::::::::::::: 12 representation:::::::::::::::::::::::::::::::::::::: 3

S

stack:::::::::::::::::::::::::::::::::::::::::::::: 10 stack, choicepoint:::::::::::::::::::::::::::::::::: 10

stack, environment::::::::::::::::::::::::::::::::: 10 stack, global:::::::::::::::::::::::::::::::::::::::: 8 stack, local:::::::::::::::::::::::::::::::::::::::: 10 stack, trail::::::::::::::::::::::::::::::::::::::::: 12 static area:::::::::::::::::::::::::::::::::::::::: 6, 7 storage model::::::::::::::::::::::::::::::::::::::: 3 structure object:::::::::::::::::::::::::::::::: 3, 4, 9

T

tag::::::::::::::::::::::::::::::::::::::::::: 77, 107 tag bits::::::::::::::::::::::::::::::::::::::::::::: 4 temporary variable:::::::::::::::::::::::::::::::::: 3 term:::::::::::::::::::::::::::::::::::::::::::::::: 3 term, functor::::::::::::::::::::::::::::::::::::::: 5 timestamp:::::::::::::::::::::::::::::::::::::: 5, 10 trace:::::::::::::::::::::::::::::::::::::::::::::: 38 trail stack::::::::::::::::::::::::::::::::::::::::: 12 trail, value::::::::::::::::::::::::::::::::::::::::: 12

U

unbound variable::::::::::::::::::::::::::::::::::: 4 unconditionally bound variable:::::::::::::::::::::: 4 uni cation::::::::::::::::::::::::::::::::::::::::: 72 unify:::::::::::::::::::::::::::::::::::::::::::::: 72 utility instructions::::::::::::::::::::::::::::::::: 33

V

value bits::::::::::::::::::::::::::::::::::::::::::: 4 value trail::::::::::::::::::::::::::::::::::::::::: 12 valuecell:::::::::::::::::::::::::::::::::::::::: 3, 10 variable::::::::::::::::::::::::::::::::::::::::: 3, 10 variable, bound::::::::::::::::::::::::::::::::::::: 4 variable, conditionally bound:::::::::::::::::::::::: 4 variable, constrained::::::::::::::::::::: 4, 10, 21, 22 variable, permanent::::::::::::::::::::::::::::::::: 3 variable, temporary::::::::::::::::::::::::::::::::: 3 variable, unbound:::::::::::::::::::::::::::::4, 5, 10 variable, unconditionally bound::::::::::::::::::::: 4

W

waking goals::::::::::::::::::::::::::::::::::::::: 22 wam code::::::::::::::::::::::::::::::::::::::::::99 wam register::::::::::::::::::::::::::::::::::::::: 12

wam, debug::::::::::::::::::::::::::::::::::::::: 20 wam, format::::::::::::::::::::::::::::::::::::::: 99 worker::::::::::::::::::::::::::::::::::::::::::::: 12 worker, heap:::::::::::::::::::::::::::::::::::: 8, 12

worker, stack::::::::::::::::::::::::::::::::::: 11, 12 worker, trail::::::::::::::::::::::::::::::::::::::: 12

Table of Contents

1 Introduction

::::::::::::::::::::::::::::::::::::::::::

1

1.1 Notational Conventions:::::::::::::::::::::::::::::::::::::::::::: 1

2 Storage Model

::::::::::::::::::::::::::::::::::::::::

3

2.1 Terms and their Representation::::::::::::::::::::::::::::::::::: 3 2.2 Parallel Engine Speci cs::::::::::::::::::::::::::::::::::::::::::: 5 2.3 Data Areas:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 6 2.3.1 Basic Type De nitions::::::::::::::::::::::::::::::::::: 6 2.3.2 The Code Area:::::::::::::::::::::::::::::::::::::::::: 7 2.3.3 The Static area:::::::::::::::::::::::::::::::::::::::::: 7 2.3.4 The Heap:::::::::::::::::::::::::::::::::::::::::::::::: 8 2.3.5 The Stack::::::::::::::::::::::::::::::::::::::::::::::: 10 2.3.6 The Trail::::::::::::::::::::::::::::::::::::::::::::::: 12 2.4 WAM Registers:::::::::::::::::::::::::::::::::::::::::::::::::: 12 2.5 The Database:::::::::::::::::::::::::::::::::::::::::::::::::::: 14 2.5.1 Instruction Set for Assert::::::::::::::::::::::::::::::: 15

3 Emulator Overview

:::::::::::::::::::::::::::::::::

17

3.1 Usage:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 3.2 Booting:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17 3.3 Internal Overview:::::::::::::::::::::::::::::::::::::::::::::::: 18 3.3.1 The Parallel Machine::::::::::::::::::::::::::::::::::: 19 3.4 The WAM-code Debugger:::::::::::::::::::::::::::::::::::::::: 20 3.5 Handling Events::::::::::::::::::::::::::::::::::::::::::::::::: 21 3.5.1 Waking Frozen Goals:::::::::::::::::::::::::::::::::::: 22

4 Instruction Set

::::::::::::::::::::::::::::::::::::::

27

4.1 Indexing Instructions::::::::::::::::::::::::::::::::::::::::::::: 27 4.2 Utility Instructions::::::::::::::::::::::::::::::::::::::::::::::: 33 4.3 Procedural Instructions:::::::::::::::::::::::::::::::::::::::::: 37 4.4 Get Instructions:::::::::::::::::::::::::::::::::::::::::::::::::: 41 4.5 Put Instructions:::::::::::::::::::::::::::::::::::::::::::::::::: 43 4.6 Unify Instructions:::::::::::::::::::::::::::::::::::::::::::::::: 45 4.7 Instructions for Reform Parallelism::::::::::::::::::::::::::::::: 49 4.7.1 Vector List Instructions::::::::::::::::::::::::::::::::: 49 4.7.2 Put Instructions:::::::::::::::::::::::::::::::::::::::: 55 4.7.3 Procedural Instructions::::::::::::::::::::::::::::::::: 57

Related documents