-
Notifications
You must be signed in to change notification settings - Fork 0
/
lp.txt
36 lines (24 loc) · 795 Bytes
/
lp.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- current:
envFrame ; environment stack (AND; nested predicate calls)
choice-point frame ; choice point stack (OR; backtracking search)
frame-object <- frame-object ..
trail ; variable binding (to be unwound on backtrack)
FrameObject
< EnvironmentFrame
< GenericChoiceFrame; represent OR state of search
- ctu; program, arg cntr
< ChoicePointFrame; OR part of search tree
- argVars
< GenericTripleMatchFrame; represent state of some triple match
< TripleMatchFrame; represent state of concrete triple match
< ConsumerChoicePointFrame; represent results of a tabled predicate
bind: add binding to trail
var.value = var (isRef)
unwind:
unbind var
remove from trail
deref:
find original var
{ ?a p1 ?b } => { ?a p2 ?b }
{ ?k p2 ?l } => { ?k p3 ?l }
{ ?x p3 ?y }?