Python "dogelog"

Admin User, erstellt 03. Mai 2024
         
###
# Modern Albufeira Prolog Interpreter
#
# Warranty & Liability
# To the extent permitted by applicable law and unless explicitly
# otherwise agreed upon, XLOG Technologies AG makes no warranties
# regarding the provided information. XLOG Technologies AG assumes
# no liability that any problems might be solved with the information
# provided by XLOG Technologies AG.
#
# Rights & License
# All industrial property rights regarding the information - copyright
# and patent rights in particular - are the sole property of XLOG
# Technologies AG. If the company was not the originator of some
# excerpts, XLOG Technologies AG has at least obtained the right to
# reproduce, change and translate the information.
#
# Reproduction is restricted to the whole unaltered document. Reproduction
# of the information is only allowed for non-commercial uses. Selling,
# giving away or letting of the execution of the library is prohibited.
# The library can be distributed as part of your applications and libraries
# for execution provided this comment remains unchanged.
#
# Restrictions
# Only to be distributed with programs that add significant and primary
# functionality to the library. Not to be distributed with additional
# software intended to replace any components of the library.
#
# Trademarks
# Jekejeke is a registered trademark of XLOG Technologies AG.
##
MASK_PRED_DYNAMIC = 0x00000001
MASK_PRED_SPECIAL = 0x00000002
MASK_PRED_CHECK = 0x00000004
MASK_PRED_ARITHMETIC = 0x00000008
MASK_TOUCH_DYNAMIC = 0x00000001
MASK_ADD_BOTTOM = 0x00000001
MASK_ADD_DYNAMIC = 0x00000002
MASK_REMOVE_BOTTOM = 0x00000001
kb = {}
stage = -1
partition = "system"
def set_stage(num):
global stage
stage = num
def set_partition(path):
engine.partition = path
class Engine:
def __init__(self):
self.signal = NotImplemented
self.interrupt = lambda: None
self.text_output = NotImplemented
self.text_error = NotImplemented
self.text_input = NotImplemented
self.low = 0
self.high = 0
self.serno = 0
self.backtrail = None
self.backcount = 0
self.partition = "system" if stage == -1 else "user"
engine = Engine()
def set_engine(ptr):
global engine
engine = ptr
class Variable:
def __init__(self):
self.instantiated = NotImplemented
if engine.low < engine.high:
self.flags = engine.low
engine.low += 1
else:
self.flags = engine.serno
engine.serno += 1
self.tail = None
def is_variable(obj):
return isinstance(obj, Variable)
class Compound:
def __init__(self, functor, args):
self.functor = functor
self.args = args
def is_compound(obj):
return isinstance(obj, Compound)
class Place:
def __init__(self, index):
self.index = index
def is_place(obj):
return isinstance(obj, Place)
class Skeleton:
def __init__(self, functor, args):
self.functor = functor
self.args = args
def is_skeleton(obj):
return isinstance(obj, Skeleton)
class Quote:
def __init__(self, obj):
self.obj = obj
def is_quote(obj):
return isinstance(obj, Quote)
def unquote_objects(body):
i = 0
while i < len(body):
alpha = body[i]
if is_quote(alpha):
body[i] = alpha.obj
i += 1
class Clause:
def __init__(self, size, head, body, cutvar, idxval):
self.size = size
self.head = head
self.body = body
self.cutvar = cutvar
self.idxval = idxval
self.creator = stage
self.remover = NotImplemented
self.shard = ""
def is_clause(obj):
return isinstance(obj, Clause)
class Logical:
def __init__(self, cache, count, data):
self.cache = cache
self.count = count
self.data = data
def is_logical(obj):
return isinstance(obj, Logical)
class Provable:
def __init__(self, flags):
self.flags = flags
self.rope = NotImplemented
self.nonguard = NotImplemented
self.idxmap = NotImplemented
self.func = NotImplemented
self.creator = stage
self.remover = NotImplemented
self.overlay = NotImplemented
def is_provable(obj):
return isinstance(obj, Provable)
class Cache:
def __init__(self, name):
self.link = NotImplemented
self.name = name
def is_cache(obj):
return isinstance(obj, Cache)
def snapshot_data(rope):
res = rope.cache
if res is None:
res = [NotImplemented] * rope.count
rope_copy(res, rope)
rope.cache = res
return res
def rope_copy(res, rope):
data = rope.data
j = 0
i = 0
while i < len(data):
clause = data[i]
if clause.remover is NotImplemented:
res[j] = clause
j += 1
i += 1
def ensure_link(cache, arity):
peek = cache.link
if peek is NotImplemented or peek.remover is not NotImplemented:
peek = pred_link(cache.name, arity)
cache.link = peek
return peek
def pred_link(functor, arity):
temp = kb.get(functor, NotImplemented)
if temp is NotImplemented:
return NotImplemented
peek = (temp[arity] if arity < len(temp) else NotImplemented)
if peek is NotImplemented or peek.remover is not NotImplemented:
return NotImplemented
return peek
def make_defined(rope):
peek = Provable(0)
peek.rope = new_rope()
peek.nonguard = new_rope()
peek.idxmap = {}
i = 0
while i < len(rope):
add_peek(peek, rope[i], MASK_ADD_BOTTOM)
i += 1
return peek
def new_rope():
return Logical(None, 0, [])
def pred_touch(functor, arity, flags):
temp = kb.get(functor, NotImplemented)
if temp is NotImplemented:
temp = []
kb[functor] = temp
peek = (temp[arity] if arity < len(temp) else NotImplemented)
if peek is NotImplemented or peek.remover is not NotImplemented:
res = make_defined(VOID_ARGS)
if peek is not NotImplemented:
res.overlay = peek
if (flags & MASK_TOUCH_DYNAMIC) != 0:
res.flags |= MASK_PRED_DYNAMIC
while arity >= len(temp):
temp.append(NotImplemented)
temp[arity] = res
else:
if not is_logical(peek.rope):
raise make_error(Compound("permission_error",
["modify", "static_procedure",
make_indicator(functor, arity)]))
if (flags & MASK_TOUCH_DYNAMIC) != 0:
if (peek.flags & MASK_PRED_DYNAMIC) == 0:
raise make_error(Compound("permission_error",
["modify", "static_procedure",
make_indicator(functor, arity)]))
def pred_destroy(functor, arity):
temp = kb.get(functor, NotImplemented)
if temp is NotImplemented:
return
peek = (temp[arity] if arity < len(temp) else NotImplemented)
if peek is NotImplemented or peek.remover is not NotImplemented:
return
if peek.creator == stage:
peek = clear_pop(peek)
temp[arity] = peek
if peek is NotImplemented and trim_arities(temp):
del kb[functor]
else:
peek.remover = stage
def clear_pop(peek):
peek.remover = stage
peek.rope = None
peek.idxmap = None
peek.nonguard = None
back = peek
peek = back.overlay
back.overlay = NotImplemented
return peek
def trim_arities(peek):
pos = len(peek)
while pos > 0 and peek[pos-1] is NotImplemented:
pos -= 1
if pos == 0:
return True
if pos != len(peek):
del peek[pos:]
return False
def clear():
for functor in list(kb):
temp = kb[functor]
i = 0
while i < len(temp):
peek = temp[i]
if peek is NotImplemented:
i += 1
continue
if peek.creator == stage:
peek = clear_pop(peek)
temp[i] = peek
if peek is NotImplemented:
i += 1
continue
if peek.remover == stage:
peek.remover = NotImplemented
if is_logical(peek.rope):
rollback_peek(peek)
i += 1
if trim_arities(temp):
del kb[functor]
def rollback_peek(peek):
if not has_action(peek.rope):
return
for (key, value) in list(peek.idxmap.items()):
if has_action(value):
rollback_rope(value, False)
if len(value.data) == 0:
del peek.idxmap[key]
if has_action(peek.nonguard):
rollback_rope(peek.nonguard, False)
rollback_rope(peek.rope, True)
def has_action(rope):
rope = rope.data
i = 0
while i < len(rope):
clause = rope[i]
if clause.creator == stage:
return True
if clause.remover == stage:
return True
i += 1
return False
def rollback_rope(rope, update):
data = rope.data
j = 0
i = 0
while i < len(data):
clause = data[i]
if clause.creator == stage:
rope.count -= 1
else:
if clause.remover == stage:
if update:
clause.remover = NotImplemented
rope.count += 1
data[j] = clause
j += 1
i += 1
del data[j:]
rope.cache = None
def add(functor, arity, clause_or_pred):
add_clause(functor, arity, clause_or_pred, MASK_ADD_BOTTOM)
def add_clause(functor, arity, clause_or_pred, flags):
temp = kb.get(functor, NotImplemented)
if temp is NotImplemented:
temp = []
kb[functor] = temp
peek = (temp[arity] if arity < len(temp) else NotImplemented)
if is_clause(clause_or_pred):
if peek is NotImplemented or peek.remover is not NotImplemented:
res = make_defined(VOID_ARGS)
if peek is not NotImplemented:
res.overlay = peek
if (flags & MASK_ADD_DYNAMIC) != 0:
res.flags |= MASK_PRED_DYNAMIC
while arity >= len(temp):
temp.append(NotImplemented)
temp[arity] = res
peek = res
else:
if not is_logical(peek.rope):
raise make_error(Compound("permission_error",
["modify", "static_procedure",
make_indicator(functor, arity)]))
if (flags & MASK_ADD_DYNAMIC) != 0:
if (peek.flags & MASK_PRED_DYNAMIC) == 0:
raise make_error(Compound("permission_error",
["modify", "static_procedure",
make_indicator(functor, arity)]))
if (flags & MASK_ADD_DYNAMIC) == 0:
clause_or_pred.shard = engine.partition
add_peek(peek, clause_or_pred, flags)
else:
if peek is NotImplemented or peek.remover is not NotImplemented:
if peek is not NotImplemented:
clause_or_pred.overlay = peek
while arity >= len(temp):
temp.append(NotImplemented)
temp[arity] = clause_or_pred
else:
raise make_error(Compound("permission_error",
["coerce", "procedure", make_indicator(functor, arity)]))
def add_peek(peek, clause, flags):
add_rope(peek.rope, clause, flags)
idxval = clause.idxval
if idxval is NotImplemented:
for (key, value) in peek.idxmap.items():
add_rope(value, clause, flags)
add_rope(peek.nonguard, clause, flags)
else:
value = peek.idxmap.get(idxval, NotImplemented)
if value is NotImplemented:
value = clone_rope(peek.nonguard)
peek.idxmap[idxval] = value
add_rope(value, clause, flags)
def add_rope(rope, clause, flags):
if (flags & MASK_ADD_BOTTOM) != 0:
rope.data.append(clause)
else:
rope.data.insert(0, clause)
rope.count += 1
rope.cache = None
def clone_rope(rope):
return Logical(rope.cache, rope.count, list(rope.data))
def remove_clause(functor, arity, clause, flags):
if not is_clause(clause):
raise make_error(Compound("permission_error",
["coerce", "procedure", make_indicator(functor, arity)]))
temp = kb.get(functor, NotImplemented)
if temp is NotImplemented:
return False
peek = (temp[arity] if arity < len(temp) else NotImplemented)
if peek is NotImplemented or peek.remover is not NotImplemented:
return False
if not is_logical(peek.rope):
raise make_error(Compound("permission_error",
["modify", "static_procedure", make_indicator(functor, arity)]))
return remove_peek(peek, clause, flags)
def remove_peek(peek, clause, flags):
if clause.remover is not NotImplemented:
return False
if not remove_rope(peek.rope, clause, flags):
return False
idxval = clause.idxval
if idxval is NotImplemented:
for (key, value) in list(peek.idxmap.items()):
remove_rope(value, clause, flags)
if len(value.data) == 0:
del peek.idxmap[key]
remove_rope(peek.nonguard, clause, flags)
else:
value = peek.idxmap.get(idxval)
remove_rope(value, clause, flags)
if len(value.data) == 0:
del peek.idxmap[idxval]
clause.remover = stage
return True
def remove_rope(rope, clause, flags):
data = rope.data
if (flags & MASK_REMOVE_BOTTOM) == 0:
index = rope_index(data, clause)
else:
index = rope_last_index(data, clause)
if index == -1:
return False
if clause.creator == stage:
del data[index]
rope.count -= 1
rope.cache = None
return True
def rope_index(rope, clause):
i = 0
while i < len(rope):
if rope[i] is clause:
return i
i += 1
return -1
def rope_last_index(rope, clause):
i = len(rope)
while i > 0:
i -= 1
if rope[i] is clause:
return i
return -1
import time
import asyncio
VOID_ARGS = []
trail = None
redo = None
call = "[]"
count = 0
def make_error(beta):
return Exception(Compound("error", [beta, fetch_stack()]))
def fetch_stack():
temp = pred_link("sys_including", 3)
if temp is NotImplemented or not is_logical(temp.rope):
return "[]"
data = snapshot_data(temp.rope)
back = None
res = None
i = 0
while i < len(data):
elem = fetch_frame(data[i])
if not atomic_equal(elem.args[1], ctx):
i += 1
continue
elem = Compound("sys_including", [elem.args[0], elem.args[2]])
elem = Compound(".", [elem, NotImplemented])
if back is None:
res = elem
else:
back.args[1] = elem
back = elem
i += 1
if back is None:
res = "[]"
else:
back.args[1] = "[]"
return res
def fetch_frame(clause):
global temp_display
if clause.size != 0:
display = [NotImplemented] * clause.size
else:
display = None
temp_display = display
args = [NotImplemented] * len(clause.head)
i = 0
while i < len(args):
args[i] = exec_build(clause.head[i])
i += 1
temp_display = None
return Compound("sys_including", args)
def make_indicator(functor, arity):
return Compound("/", [functor, arity])
VAR_MASK_EVEN = 0x40000000
VAR_MASK_ODD = 0x20000000
VAR_MASK_STATE = VAR_MASK_EVEN | VAR_MASK_ODD
GC_MASK_ASYNC_MODE = 0x00000001
GC_MASK_ALLOW_YIELD = 0x00000008
GC_MASK_IMPORT_ASYNC = 0x00000010
GC_MASK_PROP_ASYNC = 0x00000020
GC_MASK_READ_ASYNC = 0x00000040
GC_MASK_FULL_ASYNC = GC_MASK_ASYNC_MODE | GC_MASK_ALLOW_YIELD
GC_MAX_TRAIL = 3000000
GC_MAX_INFERS = 55000
GC_MAX_DIRTY = 198000000
gc_flags = (VAR_MASK_ODD |
GC_MASK_IMPORT_ASYNC | GC_MASK_PROP_ASYNC | GC_MASK_READ_ASYNC)
gc_time = 0
gc_enter = 0
gc_tick = GC_MAX_INFERS
gc_tock = GC_MAX_DIRTY
def real_time():
return int(round(time.monotonic()*1000))
def set_gc_flags(flags):
global gc_flags
gc_flags = flags
def gc_major():
global gc_time
global gc_flags
gc_time -= real_time()
gc_flags ^= VAR_MASK_STATE
# mark phase
engine.low = 0
engine.high = engine.serno
engine.serno = 0
mark_call(call)
last = redo
while last is not None:
mark_call(last.cont)
last = last.tail
# sweep phase
last = redo
while last is not None:
last.mark = adjust_mark(last.mark)
last = last.tail
sweep_trail(None)
gc_time += real_time()
def mark_term(term):
while True:
if is_variable(term):
val = term.flags
if (val & VAR_MASK_STATE) == (gc_flags & VAR_MASK_STATE):
break
val = val & ~VAR_MASK_STATE
if val > engine.serno:
engine.serno = val + 1
if engine.low <= val and val < engine.high:
if val-engine.low > engine.high-val:
engine.high = val
else:
engine.low = val + 1
term.flags = val | (gc_flags & VAR_MASK_STATE)
if term.instantiated is not NotImplemented:
term = term.instantiated
else:
return
elif is_compound(term):
term = term.args
i = 0
while i < len(term) - 1:
mark_term(term[i])
i += 1
term = term[i]
else:
return
def mark_call(term):
gc_color = "E" if ((gc_flags & VAR_MASK_EVEN) != 0) else "O"
while is_compound(term) and term.functor != gc_color:
term.functor = gc_color
mark_term(term.args[0])
term = term.args[1]
def gc_minor():
global gc_time
gc_time -= real_time()
# mark phase
mark2_call(call)
last = redo
while last is not None:
mark2_call(last.cont)
last = last.tail
mark2_trail(engine.backtrail)
# sweep phase
last = redo
while last is not None:
last.mark = adjust_mark(last.mark)
last = last.tail
sweep_trail(engine.backtrail)
gc_time += real_time()
def mark2_term(term):
while True:
if is_variable(term):
val = term.flags
if (val & VAR_MASK_STATE) == (gc_flags & VAR_MASK_STATE):
break
val = val & ~VAR_MASK_STATE
term.flags = val | (gc_flags & VAR_MASK_STATE)
if term.instantiated is not NotImplemented:
term = term.instantiated
else:
return
elif is_compound(term):
term = term.args
i = 0
while i < len(term) - 1:
mark2_term(term[i])
i += 1
term = term[i]
else:
return
def mark2_call(term):
gc_color = "E" if ((gc_flags & VAR_MASK_EVEN) != 0) else "O"
while is_compound(term) and term.functor != gc_color:
term.functor = gc_color
mark2_term(term.args[0])
term = term.args[1]
def mark2_trail(stop):
temp = trail
while temp is not stop:
if (temp.flags & VAR_MASK_STATE) == VAR_MASK_STATE:
mark2_term(temp)
temp = temp.tail
def adjust_mark(temp):
while temp is not None:
if (temp.flags & VAR_MASK_STATE) == (gc_flags & VAR_MASK_STATE):
return temp
else:
temp = temp.tail
return None
def sweep_trail(stop):
global trail
global count
temp = trail
back = None
while temp is not stop:
term = temp
temp = term.tail
if (term.flags & VAR_MASK_STATE) == (gc_flags & VAR_MASK_STATE):
if back is not None:
back.tail = term
else:
trail = term
back = term
else:
count -= 1
term.instantiated = NotImplemented
term.tail = None
if back is not None:
back.tail = stop
else:
trail = stop
engine.backtrail = trail
engine.backcount = count
def solve_signal(rope, at, choice):
if engine.signal is not NotImplemented:
message = engine.signal
engine.signal = NotImplemented
raise make_error(message)
return True
def copy_term(alpha):
assoc = None
def copy_term2(alpha2):
nonlocal assoc
back = None
while True:
alpha2 = deref(alpha2)
if is_variable(alpha2):
if assoc is None:
assoc = {}
peek = NotImplemented
else:
peek = assoc.get(alpha2, NotImplemented)
if peek is NotImplemented:
peek = Variable()
assoc[alpha2] = peek
alpha2 = peek
break
elif is_compound(alpha2):
t1 = alpha2.args
args = [NotImplemented] * len(t1)
alpha2 = Compound(alpha2.functor, args)
i = 0
while i < len(args) - 1:
args[i] = copy_term2(t1[i])
i += 1
args[i] = back
back = alpha2
alpha2 = t1[i]
else:
break
while back is not None:
peek = back.args[len(back.args) - 1]
back.args[len(back.args) - 1] = alpha2
alpha2 = back
back = peek
return alpha2
return copy_term2(alpha)
def cont(term):
global call
call = term
def solve(snap, found):
global call
global redo
global gc_enter
global gc_tick
global gc_tock
while True:
if found is True:
if gc_enter >= gc_tick:
gc_tick += GC_MAX_INFERS
if count > GC_MAX_TRAIL:
gc_major()
if count > GC_MAX_TRAIL:
raise make_error(Compound("system_error",
["stack_overflow"]))
elif gc_enter >= gc_tock:
gc_tock += GC_MAX_DIRTY
gc_major()
elif (3 * (count - engine.backcount) > GC_MAX_TRAIL and
3 * engine.backcount > GC_MAX_TRAIL):
gc_minor()
if (gc_flags & GC_MASK_ASYNC_MODE) != 0:
more(Choice(solve_signal, None, None, trail))
return lambda: immediate_promise()
goal = call
if is_compound(goal):
gc_enter += 1
goal = deref(goal.args[0])
peek = lookup_pred(goal)
if peek is NotImplemented or (peek.flags & MASK_PRED_ARITHMETIC) != 0:
raise make_error(Compound("existence_error",
["procedure", make_indicator_term(goal)]))
if is_compound(goal):
goal = goal.args
else:
goal = VOID_ARGS
if (peek.flags & MASK_PRED_CHECK) != 0:
if not peek.func(goal):
found = False
else:
cont(call.args[1])
found = True
elif (peek.flags & MASK_PRED_SPECIAL) != 0:
found = peek.func(goal)
else:
peek = defined_clauses(peek, goal)
found = solve2_rope(goal, snapshot_data(peek), 0, None)
else:
break
elif found is False:
if redo is not snap:
choice = redo
redo = choice.tail
unbind(choice.mark)
call = choice.cont
found = choice.func(choice.data, choice.at, choice)
else:
break
else:
break
return found
async def immediate_promise():
try:
await asyncio.sleep(0)
except asyncio.CancelledError:
pass
def lookup_pred(goal):
if is_compound(goal):
functor = goal.functor
arity = len(goal.args)
else:
functor = goal
arity = 0
return resolve_functor(functor, arity)
def resolve_functor(functor, arity):
if is_cache(functor):
return ensure_link(functor, arity)
elif is_atom(functor):
return pred_link(functor, arity)
elif is_provable(functor):
return functor
else:
check_callable(functor)
return NotImplemented
def make_indicator_term(goal):
if is_compound(goal):
functor = goal.functor
arity = len(goal.args)
else:
functor = goal
arity = 0
if is_cache(functor):
functor = functor.name
return make_indicator(functor, arity)
def solve_rope(rope, at, choice):
goal = deref(call.args[0])
if is_compound(goal):
goal = goal.args
else:
goal = VOID_ARGS
return solve2_rope(goal, rope, at, choice)
def solve2_rope(args, rope, at, choice):
mark = trail
while at < len(rope):
clause = rope[at]
at += 1
if clause.size != 0:
display = [NotImplemented] * clause.size
else:
display = None
if exec_head(clause.head, display, args):
peek = clause.cutvar
if peek != -1:
display[peek] = redo
if at < len(rope):
if choice is None:
choice = Choice(solve_rope, rope, at, mark)
else:
choice.at = at
more(choice)
if exec_check(clause.body, display):
return True
if redo is not choice:
return False
more(choice.tail)
else:
return exec_check(clause.body, display)
unbind(mark)
return False
def cut(last):
global redo
redo = last
def more(choice):
global redo
redo = choice
class Choice:
def __init__(self, func, data, at, mark):
self.func = func
self.data = data
self.at = at
self.mark = mark
self.cont = call
self.tail = redo
class Goal:
def __init__(self, size, body):
self.size = size
self.body = body
def defined_clauses(pred, args):
peek = pred.rope
if peek.count < 2:
return peek
if len(args) > 0 and len(pred.idxmap) > 0:
key = key_value(args[0])
if key is NotImplemented:
return peek
else:
peek = pred.idxmap.get(key, NotImplemented)
if peek is NotImplemented:
return pred.nonguard
else:
return peek
else:
return peek
def key_value(term):
term = deref(term)
if is_variable(term):
return NotImplemented
elif is_compound(term):
return term.functor
elif isinstance(term, dict) or isinstance(term, list):
return id(term)
else:
return term
def run(goal):
if not launch(goal, "main", VOID_ARGS):
raise make_error(Compound("syntax_error", ["directive_failed"]))
def snap_setup():
global redo
redo = Choice(solve_setup, None, None, trail)
return redo
def solve_setup(rope, at, choice):
return False
def snap_cleanup(snap):
global call
cut(snap.tail)
unbind(snap.mark)
call = snap.cont
def is_atom(obj):
return isinstance(obj, str)
def is_number(obj):
return is_integer(obj) or is_float(obj)
def is_integer(obj):
return isinstance(obj, int) and not isinstance(obj, bool)
def is_float(obj):
return isinstance(obj, float)
temp_display = None
def exec_build(template):
back = None
while True:
if is_place(template):
index = template.index
if index == -1:
template = Variable()
elif index < -1:
template = Variable()
temp_display[(-index)-2] = template
else:
template = temp_display[index]
break
elif is_skeleton(template):
t1 = template.args
args = [NotImplemented] * len(t1)
template = Compound(template.functor, args)
i = 0
while i < len(args) - 1:
args[i] = exec_build(t1[i])
i += 1
args[i] = back
back = template
template = t1[i]
else:
break
while back is not None:
peek = back.args[len(back.args) - 1]
back.args[len(back.args) - 1] = template
template = back
back = peek
return template
def exec_unify(template, alpha):
while True:
if is_place(template):
template = template.index
if template == -1:
return True
elif template < -1:
temp_display[(-template)-2] = deref(alpha)
return True
else:
return unify(temp_display[template], alpha)
elif is_skeleton(template):
alpha = deref(alpha)
if is_variable(alpha):
t1 = template.args
args = [NotImplemented] * len(t1)
template = Compound(template.functor, args)
i = 0
while i < len(args):
args[i] = exec_build(t1[i])
i += 1
bind(template, alpha)
return True
elif is_compound(alpha):
if len(template.args) != len(alpha.args):
return False
if template.functor != alpha.functor:
return False
template = template.args
alpha = alpha.args
i = 0
while i < len(template) - 1:
if not exec_unify(template[i], alpha[i]):
return False
i += 1
template = template[i]
alpha = alpha[i]
else:
return False
else:
return unify(template, alpha)
def exec_body(code, display):
global temp_display
temp_display = display
back = None
res = None
i = 0
while i < len(code):
goal = exec_build(code[i])
temp = Compound(".", [goal, NotImplemented])
if back is None:
res = temp
else:
back.args[1] = temp
back = temp
i += 1
if back is None:
res = "[]"
else:
back.args[1] = "[]"
temp_display = None
return res
def exec_head(code, display, aux):
global temp_display
temp_display = display
i = 0
while i < len(code):
if not exec_unify(code[i], aux[i]):
temp_display = None
return False
i += 1
temp_display = None
return True
def exec_eval(template):
if is_skeleton(template):
peek = resolve_functor(template.functor, len(template.args) + 1)
if peek is NotImplemented or (peek.flags & MASK_PRED_ARITHMETIC) == 0:
raise make_error(Compound("type_error",
["evaluable", make_indicator(template.functor, len(template.args))]))
return peek.func(template.args)
else:
if is_place(template):
template = template.index
if template < 0:
raise make_error("instantiation_error")
else:
template = temp_display[template]
template = deref(template)
if is_number(template):
return template
peek = lookup_eval(template)
if peek is NotImplemented or (peek.flags & MASK_PRED_ARITHMETIC) == 0:
raise make_error(Compound("type_error",
["evaluable", make_indicator_term(template)]))
if is_compound(template):
template = template.args
else:
template = VOID_ARGS
return peek.func(template)
def exec_test(template):
global gc_enter
if is_skeleton(template):
peek = resolve_functor(template.functor, len(template.args))
if peek is NotImplemented or (peek.flags & MASK_PRED_CHECK) == 0:
args = [NotImplemented] * len(template.args)
i = 0
while i < len(args):
args[i] = exec_build(template.args[i])
i += 1
if peek is NotImplemented or (peek.flags & MASK_PRED_ARITHMETIC) != 0:
return Compound(template.functor, args)
else:
return Compound(peek, args)
else:
gc_enter += 1
return peek.func(template.args)
else:
if is_place(template):
template = template.index
if template < 0:
raise make_error("instantiation_error")
else:
template = temp_display[template]
template = deref(template)
peek = lookup_pred(template)
if peek is NotImplemented or (peek.flags & MASK_PRED_CHECK) == 0:
return template
else:
gc_enter += 1
if is_compound(template):
template = template.args
else:
template = VOID_ARGS
return peek.func(template)
def exec_check(code, display):
global temp_display
temp_display = display
check = True
back = None
res = None
i = 0
while i < len(code):
goal = exec_test(code[i]) if check else exec_build(code[i])
if True is goal:
i += 1
continue
if False is goal:
temp_display = None
return False
temp = Compound(".", [goal, NotImplemented])
if back is None:
res = temp
else:
back.args[1] = temp
back = temp
check = False
i += 1
if back is None:
res = call.args[1]
else:
back.args[1] = call.args[1]
temp_display = None
cont(res)
return True
def atomic_equal(alpha, beta):
if is_atom(alpha) or is_number(alpha):
if is_float(alpha):
return is_float(beta) and alpha == beta
elif is_float(beta):
return False
else:
return alpha == beta
elif is_atom(beta) or is_number(beta):
return False
else:
return alpha is beta
def unify(first, second):
while True:
first = deref(first)
second = deref(second)
if is_variable(first):
if is_variable(second) and first is second:
return True
bind(second, first)
return True
if is_variable(second):
bind(first, second)
return True
if not is_compound(first):
return atomic_equal(first, second)
if not is_compound(second):
return False
if len(first.args) != len(second.args):
return False
if first.functor != second.functor:
return False
first = first.args
second = second.args
i = 0
while i < len(first) - 1:
if not unify(first[i], second[i]):
return False
i += 1
first = first[i]
second = second[i]
def deref(term):
while is_variable(term) and term.instantiated is not NotImplemented:
term = term.instantiated
return term
def bind(source, term):
global trail
global count
term.instantiated = source
term.tail = trail
if (term.flags & VAR_MASK_STATE) == (gc_flags & VAR_MASK_STATE):
term.flags |= VAR_MASK_STATE
trail = term
count += 1
def unbind(mark):
global trail
global count
while mark is not trail:
term = trail
if engine.backtrail is term:
engine.backtrail = term.tail
engine.backcount -= 1
trail = term.tail
count -= 1
term.instantiated = NotImplemented
term.tail = None
def check_nonvar(beta):
if is_variable(beta):
raise make_error("instantiation_error")
def check_callable(beta):
if is_variable(beta) or is_number(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["callable", beta]))
def lookup_eval(expr):
if is_compound(expr):
functor = expr.functor
arity = len(expr.args)
else:
functor = expr
arity = 0
return resolve_functor(functor, arity + 1)
class Context:
def __init__(self):
self.trail = None
self.redo = None
self.call = "[]"
self.count = 0
self.gc_flags = (VAR_MASK_ODD |
GC_MASK_IMPORT_ASYNC | GC_MASK_PROP_ASYNC | GC_MASK_READ_ASYNC)
self.engine = Engine()
ctx = "main"
def ctx_set(buf):
global ctx
ctx = buf
def ctx_switch(buf):
global trail
global redo
global call
global count
global gc_flags
temp = trail
trail = buf.trail
buf.trail = temp
temp = redo
redo = buf.redo
buf.redo = temp
temp = call
call = buf.call
buf.call = temp
temp = count
count = buf.count
buf.count = temp
temp = gc_flags
gc_flags = buf.gc_flags
buf.gc_flags = temp
temp = engine
set_engine(buf.engine)
buf.engine = temp
def launch(form, buf, params):
global call
if buf != "main":
ctx_set(buf)
ctx_switch(buf)
back = gc_flags & GC_MASK_FULL_ASYNC
set_gc_flags(gc_flags & ~GC_MASK_FULL_ASYNC)
snap = snap_setup()
if isinstance(form, Clause):
call = melt_clause(form, params)
elif isinstance(form, Goal):
call = melt_directive(form)
else:
call = form
try:
found = solve(snap, True)
finally:
snap_cleanup(snap)
set_gc_flags((gc_flags & ~GC_MASK_FULL_ASYNC) | back)
if buf != "main":
ctx_switch(buf)
ctx_set("main")
return found
def melt_directive(goal):
if goal.size != 0:
display = [NotImplemented] * goal.size
else:
display = None
return exec_body(goal.body, display)
def melt_clause(clause, params):
if clause.size != 0:
display = [NotImplemented] * clause.size
else:
display = None
if exec_head(clause.head, display, params):
temp = clause.cutvar
if temp != -1:
display[temp] = redo
return exec_body(clause.body, display)
else:
return "[]"
async def launch_async(form, buf, params):
global call
if buf != "main":
ctx_set(buf)
ctx_switch(buf)
back = gc_flags & GC_MASK_FULL_ASYNC
set_gc_flags(gc_flags | GC_MASK_FULL_ASYNC)
found = True
snap = snap_setup()
if isinstance(form, Clause):
call = melt_clause(form, params)
elif isinstance(form, Goal):
call = melt_directive(form)
else:
call = form
try:
while True:
found = solve(snap, found)
if found is False:
break
elif found is not True:
if buf != "main":
ctx_switch(buf)
ctx_set("main")
await found()
if buf != "main":
ctx_set(buf)
ctx_switch(buf)
found = False
else:
break
finally:
snap_cleanup(snap)
set_gc_flags((gc_flags & ~GC_MASK_FULL_ASYNC) | back)
if buf != "main":
ctx_switch(buf)
ctx_set("main")
return found
def register_interrupt(buf, func):
en = determine_engine(buf)
en.interrupt = func
def register_signal(buf, msg):
en = determine_engine(buf)
en.signal = msg
def invoke_interrupt(buf):
en = determine_engine(buf)
en.interrupt()
def determine_engine(buf):
if buf != "main":
if buf is not ctx:
return buf.engine
else:
return engine
else:
if ctx != "main":
return ctx.engine
else:
return engine
pool = [[15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15],
[12, 24, 24, 24, 26, 24, 24, 24, 21, 22, 24, 25, 24, 20, 24, 24],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 24, 24, 25, 25, 25, 24],
[24, 353, 385, 417, 449, 481, 513, 545, 577, 609, 641, 673, 705, 737, 769, 801],
[833, 865, 897, 929, 961, 993, 1025, 1057, 1089, 1121, 1153, 21, 24, 22, 27, 23],
[27, 354, 386, 418, 450, 482, 514, 546, 578, 610, 642, 674, 706, 738, 770, 802],
[834, 866, 898, 930, 962, 994, 1026, 1058, 1090, 1122, 1154, 21, 25, 22, 25, 15],
[12, 24, 26, 26, 26, 26, 28, 24, 27, 28, 5, 29, 25, 16, 28, 27],
[28, 25, 11, 11, 27, 2, 24, 24, 27, 11, 5, 30, 11, 11, 11, 24],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 25, 1, 1, 1, 1, 1, 1, 1, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 2, 2, 2],
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1],
[2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 2],
[1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2],
[2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1],
[1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1],
[1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1],
[2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 5, 1, 2, 2, 2],
[5, 5, 5, 5, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 2, 1],
[2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2],
[2, 1, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2],
[1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 2],
[2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[4, 4, 27, 27, 27, 27, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[4, 4, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27],
[4, 4, 4, 4, 4, 27, 27, 27, 27, 27, 27, 27, 4, 27, 4, 27],
[27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[1, 2, 1, 2, 4, 27, 1, 2, 0, 0, 4, 2, 2, 2, 24, 1],
[0, 0, 0, 0, 27, 27, 1, 24, 1, 1, 1, 0, 1, 0, 1, 1],
[2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1],
[2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[2, 2, 2, 2, 1, 2, 25, 1, 2, 1, 1, 2, 2, 1, 1, 1],
[1, 2, 28, 6, 6, 6, 6, 6, 7, 7, 1, 2, 1, 2, 1, 2],
[1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2],
[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 0, 0, 4, 24, 24, 24, 24, 24, 24],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 20, 0, 0, 28, 28, 26],
[0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 6],
[24, 6, 6, 24, 6, 6, 24, 6, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5],
[5, 5, 5, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[16, 16, 16, 16, 16, 16, 25, 25, 25, 24, 24, 26, 24, 24, 28, 28],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 16, 24, 24, 24],
[4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 24, 24, 24, 24, 5, 5],
[6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 24, 5, 6, 6, 6, 6, 6, 6, 6, 16, 28, 6],
[6, 6, 6, 6, 6, 4, 4, 6, 6, 28, 6, 6, 6, 6, 5, 5],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 5, 5, 28, 28, 5],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 16],
[5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 4, 4, 28, 24, 24, 24, 4, 0, 0, 6, 26, 26],
[5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 4, 6, 6, 6, 4, 6, 6, 6, 6, 6, 0, 0],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 0, 0, 24, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 27, 5, 5, 5, 5, 5, 5, 0],
[16, 16, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 6, 6, 6, 6, 6],
[6, 6, 16, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 8, 6, 5, 8, 8],
[8, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 6, 8, 8],
[5, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 6, 6, 24, 24, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[24, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 6, 8, 8, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5],
[5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5],
[5, 0, 5, 0, 0, 0, 5, 5, 5, 5, 0, 0, 6, 5, 8, 8],
[8, 6, 6, 6, 6, 0, 0, 8, 8, 0, 0, 8, 8, 6, 5, 0],
[0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 5, 5, 0, 5],
[5, 5, 6, 6, 0, 0, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[5, 5, 26, 26, 11, 11, 11, 11, 11, 11, 28, 26, 5, 24, 6, 0],
[0, 6, 6, 8, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5],
[5, 0, 5, 5, 0, 5, 5, 0, 5, 5, 0, 0, 6, 0, 8, 8],
[8, 6, 6, 0, 0, 0, 0, 6, 6, 0, 0, 6, 6, 6, 0, 0],
[0, 6, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 5, 0],
[0, 0, 0, 0, 0, 0, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[6, 6, 5, 5, 5, 6, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 6, 6, 8, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5],
[5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 0, 0, 6, 5, 8, 8],
[8, 6, 6, 6, 6, 6, 0, 6, 6, 8, 0, 8, 8, 6, 0, 0],
[5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[24, 26, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 6, 6, 6, 6],
[0, 6, 8, 8, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5],
[5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 0, 0, 6, 5, 8, 6],
[8, 6, 6, 6, 6, 0, 0, 8, 8, 0, 0, 8, 8, 6, 0, 0],
[0, 0, 0, 0, 0, 6, 6, 8, 0, 0, 0, 0, 5, 5, 0, 5],
[28, 5, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 6, 5, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5],
[5, 0, 5, 5, 5, 5, 0, 0, 0, 5, 5, 0, 5, 0, 5, 5],
[0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 5, 0, 0, 0, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 8, 8],
[6, 8, 8, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 6, 0, 0],
[5, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0],
[11, 11, 11, 28, 28, 28, 28, 28, 28, 26, 28, 0, 0, 0, 0, 0],
[6, 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5],
[5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 6, 5, 6, 6],
[6, 8, 8, 8, 8, 0, 6, 6, 6, 0, 6, 6, 6, 6, 0, 0],
[0, 0, 0, 0, 0, 6, 6, 0, 5, 5, 5, 0, 0, 5, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 24, 11, 11, 11, 11, 11, 11, 11, 28],
[5, 6, 8, 8, 24, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5],
[5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 0, 6, 5, 8, 6],
[8, 8, 8, 8, 8, 0, 6, 8, 8, 0, 8, 8, 6, 6, 0, 0],
[0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 5, 5, 0],
[0, 5, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 8, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 5, 8, 8],
[8, 6, 6, 6, 6, 0, 8, 8, 8, 0, 8, 8, 8, 6, 5, 28],
[0, 0, 0, 0, 5, 5, 5, 8, 11, 11, 11, 11, 11, 11, 11, 5],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 5, 5, 5, 5, 5, 5],
[0, 6, 8, 8, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 5],
[5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 6, 0, 0, 0, 0, 8],
[8, 8, 6, 6, 6, 0, 6, 0, 8, 8, 8, 8, 8, 8, 8, 8],
[0, 0, 8, 8, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 26],
[5, 5, 5, 5, 5, 5, 4, 6, 6, 6, 6, 6, 6, 6, 6, 24],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 24, 24, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 5, 5, 0, 5, 0, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5],
[5, 5, 5, 5, 0, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 6, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 0, 0],
[5, 5, 5, 5, 5, 0, 4, 0, 6, 6, 6, 6, 6, 6, 6, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 5, 5, 5, 5],
[5, 28, 28, 28, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24],
[24, 24, 24, 28, 24, 28, 28, 28, 6, 6, 28, 28, 28, 28, 28, 28],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 28, 6, 28, 6, 28, 6, 21, 22, 21, 22, 8, 8],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0],
[0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8],
[6, 6, 6, 6, 6, 24, 6, 6, 5, 5, 5, 5, 5, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 28, 28],
[28, 28, 28, 28, 28, 28, 6, 28, 28, 28, 28, 28, 28, 0, 28, 28],
[24, 24, 24, 24, 24, 28, 28, 28, 28, 24, 24, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 6, 6, 6],
[6, 8, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8, 8, 6, 6, 5],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 24, 24, 24, 24, 24, 24],
[5, 5, 5, 5, 5, 5, 8, 8, 6, 6, 5, 5, 5, 5, 6, 6],
[6, 5, 8, 8, 8, 5, 5, 8, 8, 8, 8, 8, 8, 8, 5, 5],
[5, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 6, 8, 8, 6, 6, 8, 8, 8, 8, 8, 8, 6, 5, 8],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 8, 8, 8, 6, 28, 28],
[1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 24, 4, 2, 2, 2],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5, 5, 5, 5, 0, 0],
[5, 0, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 0],
[5, 0, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 6, 6, 6],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0],
[20, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 28, 24, 5],
[12, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 21, 22, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 24, 24, 24, 10, 10],
[10, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 6, 6, 6, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
[5, 5, 6, 6, 8, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5],
[5, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 8, 8],
[8, 8, 8, 8, 8, 8, 6, 8, 8, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 24, 24, 24, 4, 24, 24, 24, 26, 5, 6, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0],
[24, 24, 24, 24, 24, 24, 20, 24, 24, 24, 24, 6, 6, 6, 16, 6],
[5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0],
[6, 6, 6, 8, 8, 8, 8, 6, 6, 8, 8, 8, 0, 0, 0, 0],
[8, 8, 6, 8, 8, 8, 8, 8, 8, 6, 6, 6, 0, 0, 0, 0],
[28, 0, 0, 0, 24, 24, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0],
[5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 11, 0, 0, 0, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[5, 5, 5, 5, 5, 5, 5, 6, 6, 8, 8, 6, 0, 0, 24, 24],
[5, 5, 5, 5, 5, 8, 6, 8, 6, 6, 6, 6, 6, 6, 6, 0],
[6, 8, 6, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8],
[8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 6],
[24, 24, 24, 24, 24, 24, 24, 4, 24, 24, 24, 24, 24, 24, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0],
[6, 6, 6, 6, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 6, 8, 6, 6, 6, 6, 6, 8, 6, 8, 8, 8],
[8, 8, 6, 8, 8, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0],
[24, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 28, 28, 28, 28, 28, 28, 28, 28, 28, 24, 24, 0],
[6, 6, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 8, 6, 6, 6, 6, 8, 8, 6, 6, 8, 6, 6, 6, 5, 5],
[5, 5, 5, 5, 5, 5, 6, 8, 6, 6, 8, 8, 8, 6, 8, 6],
[6, 6, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24],
[5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6],
[6, 6, 6, 6, 8, 8, 6, 6, 0, 0, 0, 24, 24, 24, 24, 24],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 24, 24],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1],
[24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 24, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 8, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 6, 5, 5],
[5, 5, 5, 5, 6, 5, 5, 8, 6, 6, 5, 0, 0, 0, 0, 0],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4],
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4],
[1, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1],
[2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0],
[2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 0, 1, 0, 1, 0, 1],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0],
[2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3],
[2, 2, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 3, 27, 2, 27],
[27, 27, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 3, 27, 27, 27],
[2, 2, 2, 2, 0, 0, 2, 2, 1, 1, 1, 1, 0, 27, 27, 27],
[2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 27, 27, 27],
[0, 0, 2, 2, 2, 0, 2, 2, 1, 1, 1, 1, 3, 27, 27, 0],
[12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16],
[20, 20, 20, 20, 20, 20, 24, 24, 29, 30, 21, 29, 29, 30, 21, 29],
[24, 24, 24, 24, 24, 24, 24, 24, 13, 14, 16, 16, 16, 16, 16, 12],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 29, 30, 24, 24, 24, 24, 23],
[23, 24, 24, 24, 25, 21, 22, 24, 24, 24, 24, 24, 24, 24, 24, 24],
[24, 24, 25, 24, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 12],
[16, 16, 16, 16, 16, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16],
[11, 4, 0, 0, 11, 11, 11, 11, 11, 11, 25, 25, 25, 21, 22, 4],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 25, 25, 25, 21, 22, 0],
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0],
[26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26],
[26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7],
[7, 6, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 1, 28, 28, 28, 28, 1, 28, 28, 2, 1, 1, 1, 2, 2],
[1, 1, 1, 2, 28, 1, 28, 28, 25, 1, 1, 1, 1, 1, 28, 28],
[28, 28, 28, 28, 1, 28, 1, 28, 1, 28, 1, 1, 1, 1, 28, 2],
[1, 1, 1, 1, 2, 5, 5, 5, 5, 2, 28, 28, 2, 2, 1, 1],
[25, 25, 25, 25, 25, 1, 2, 2, 2, 2, 28, 25, 28, 28, 2, 28],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
[10, 10, 10, 1, 2, 10, 10, 10, 10, 11, 28, 28, 0, 0, 0, 0],
[25, 25, 25, 25, 25, 28, 28, 28, 28, 28, 25, 25, 28, 28, 28, 28],
[25, 28, 28, 25, 28, 28, 25, 28, 28, 28, 28, 28, 28, 28, 25, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 25, 25],
[28, 28, 25, 28, 25, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25],
[25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25],
[28, 28, 28, 28, 28, 28, 28, 28, 21, 22, 21, 22, 28, 28, 28, 28],
[25, 25, 28, 28, 28, 28, 28, 28, 28, 21, 22, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 25, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 25, 25, 25, 25, 25],
[25, 25, 25, 25, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 25, 25, 25, 25],
[25, 25, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 11, 11, 11, 11, 11, 11],
[28, 28, 28, 28, 28, 28, 28, 25, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 25, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 25, 25, 25, 25, 25, 25, 25, 25],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 25],
[28, 28, 28, 28, 28, 28, 28, 28, 21, 22, 21, 22, 21, 22, 21, 22],
[21, 22, 21, 22, 21, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[25, 25, 25, 25, 25, 21, 22, 25, 25, 25, 25, 25, 25, 25, 25, 25],
[25, 25, 25, 25, 25, 25, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22],
[25, 25, 25, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21],
[22, 21, 22, 21, 22, 21, 22, 21, 22, 25, 25, 25, 25, 25, 25, 25],
[25, 25, 25, 25, 25, 25, 25, 25, 21, 22, 21, 22, 25, 25, 25, 25],
[25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 21, 22, 25, 25],
[25, 25, 25, 25, 25, 28, 28, 25, 25, 25, 25, 25, 25, 28, 28, 28],
[28, 28, 28, 28, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1],
[1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 4, 4, 1, 1],
[1, 2, 1, 2, 2, 28, 28, 28, 28, 28, 28, 1, 2, 1, 2, 6],
[6, 6, 1, 2, 0, 0, 0, 0, 0, 24, 24, 24, 24, 11, 24, 24],
[2, 2, 2, 2, 2, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 4],
[24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 0],
[24, 24, 29, 30, 29, 30, 24, 24, 24, 29, 30, 24, 29, 30, 24, 24],
[24, 24, 24, 24, 24, 24, 24, 20, 24, 24, 20, 24, 29, 30, 24, 24],
[29, 30, 21, 22, 21, 22, 21, 22, 21, 22, 24, 24, 24, 24, 24, 4],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 20, 20, 24, 24, 24, 24],
[20, 24, 21, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24],
[28, 28, 24, 24, 24, 21, 22, 21, 22, 21, 22, 21, 22, 20, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0],
[12, 24, 24, 24, 28, 4, 5, 10, 21, 22, 21, 22, 21, 22, 21, 22],
[21, 22, 28, 28, 21, 22, 21, 22, 21, 22, 21, 22, 20, 21, 22, 22],
[28, 10, 10, 10, 10, 10, 10, 10, 10, 10, 6, 6, 6, 6, 8, 8],
[20, 4, 4, 4, 4, 4, 28, 28, 10, 10, 10, 4, 5, 24, 28, 28],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 6, 6, 27, 27, 4, 4, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 24, 4, 4, 4, 5],
[0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[28, 28, 11, 11, 11, 11, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 11, 11, 11, 11, 11, 11, 11, 11],
[28, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 24, 24, 24],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 5, 0, 0, 0, 0],
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 6],
[7, 7, 7, 24, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 24, 4],
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 4, 4, 6, 6],
[5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
[6, 6, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0],
[27, 27, 27, 27, 27, 27, 27, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[27, 27, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 1, 2],
[1, 2, 1, 2, 1, 2, 1, 2, 4, 27, 27, 1, 2, 1, 2, 5],
[1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2],
[1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
[1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 2, 0, 0, 0, 0, 0],
[1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 0, 0, 0, 0, 0, 0],
[0, 0, 4, 4, 4, 1, 2, 5, 4, 4, 2, 5, 5, 5, 5, 5],
[5, 5, 6, 5, 5, 5, 6, 5, 5, 5, 5, 6, 5, 5, 5, 5],
[5, 5, 5, 8, 8, 6, 6, 8, 28, 28, 28, 28, 6, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 28, 28, 26, 28, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0],
[8, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],
[8, 8, 8, 8, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 24, 24],
[6, 6, 5, 5, 5, 5, 5, 5, 24, 24, 24, 5, 24, 5, 5, 6],
[5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 24, 24],
[5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24],
[5, 5, 5, 6, 8, 8, 6, 6, 6, 6, 8, 8, 6, 6, 8, 8],
[8, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 4],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 0, 24, 24],
[5, 5, 5, 5, 5, 6, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 5, 5, 5, 5, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 8],
[8, 6, 6, 8, 8, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 6, 8, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 24, 24, 24, 24],
[4, 5, 5, 5, 5, 5, 5, 28, 28, 28, 5, 8, 6, 8, 5, 5],
[6, 5, 6, 6, 6, 5, 5, 6, 6, 5, 5, 5, 5, 5, 6, 6],
[5, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 4, 24, 24],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 6, 6, 8, 8],
[24, 24, 5, 4, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0],
[0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 27, 4, 4, 4, 4],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 27, 27, 0, 0, 0, 0],
[5, 5, 5, 8, 8, 6, 8, 8, 6, 8, 8, 24, 8, 6, 0, 0],
[5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5],
[19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19],
[18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18],
[2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 5, 6, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 25, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 5, 0],
[5, 5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27],
[27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 22, 21],
[0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 28],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 26, 28, 28, 28],
[24, 24, 24, 24, 24, 24, 24, 21, 22, 24, 0, 0, 0, 0, 0, 0],
[24, 20, 20, 23, 23, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21],
[22, 21, 22, 21, 22, 24, 24, 21, 22, 24, 24, 24, 24, 23, 23, 23],
[24, 24, 24, 0, 24, 24, 24, 24, 20, 21, 22, 21, 22, 21, 22, 24],
[24, 24, 25, 20, 25, 25, 25, 0, 24, 26, 24, 24, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 16],
[0, 24, 24, 24, 26, 24, 24, 24, 21, 22, 24, 25, 24, 20, 24, 24],
[834, 866, 898, 930, 962, 994, 1026, 1058, 1090, 1122, 1154, 21, 25, 22, 25, 21],
[22, 24, 21, 22, 24, 24, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4],
[0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5],
[0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 0, 0, 0],
[26, 26, 25, 27, 28, 26, 26, 0, 28, 25, 25, 25, 25, 28, 28, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 28, 28, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 5],
[24, 24, 24, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[10, 10, 10, 10, 10, 11, 11, 11, 11, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 11, 11, 28, 28, 28, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0],
[28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 0, 0],
[6, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0],
[11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5],
[5, 10, 5, 5, 5, 5, 5, 5, 5, 5, 10, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 24],
[5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5],
[24, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2],
[1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1],
[1, 1, 1, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 0, 0, 0],
[4, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 0, 0, 5, 0, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 0, 0, 5, 0, 0, 5],
[5, 5, 5, 5, 5, 5, 0, 24, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 5, 5, 5, 5, 5, 5, 28, 28, 11, 11, 11, 11, 11, 11, 11],
[0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 5, 5, 0, 5, 5, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11],
[5, 5, 5, 5, 5, 5, 11, 11, 11, 11, 11, 11, 0, 0, 0, 24],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 24],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 11, 11, 5, 5],
[0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 6, 6, 6, 0, 6, 6, 0, 0, 0, 0, 0, 6, 6, 6, 6],
[5, 5, 5, 5, 0, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 0, 0, 6, 6, 6, 0, 0, 0, 0, 6],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 11, 11, 24],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 11, 11, 11],
[5, 5, 5, 5, 5, 5, 5, 5, 28, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 6, 6, 0, 0, 0, 0, 11, 11, 11, 11, 11],
[24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 0, 0, 0, 24, 24, 24, 24, 24, 24, 24],
[5, 5, 5, 5, 5, 5, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 5, 5, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11],
[5, 5, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 24, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11],
[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11],
[5, 5, 5, 5, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 6, 6, 20, 0, 0],
[5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6],
[11, 11, 11, 11, 11, 11, 11, 5, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 11, 11, 11, 11, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0],
[5, 5, 6, 6, 6, 6, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 0],
[8, 6, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24, 24, 24, 0, 0],
[11, 11, 11, 11, 11, 11, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[6, 5, 5, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6],
[8, 8, 8, 6, 6, 6, 6, 8, 8, 6, 6, 24, 24, 16, 24, 24],
[24, 24, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0],
[6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 8, 6, 6, 6],
[6, 6, 6, 6, 6, 0, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[24, 24, 24, 24, 5, 8, 8, 5, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 6, 24, 24, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8],
[8, 5, 5, 5, 5, 24, 24, 24, 24, 6, 6, 6, 6, 24, 8, 6],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 24, 5, 24, 24, 24],
[0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 6],
[6, 6, 8, 8, 6, 8, 6, 6, 24, 24, 24, 24, 24, 24, 6, 5],
[5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 0, 5, 5, 5, 5, 0, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 24, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6],
[8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0],
[6, 6, 8, 8, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5],
[5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 0, 6, 6, 5, 8, 8],
[6, 8, 8, 8, 8, 0, 0, 8, 8, 0, 0, 8, 8, 8, 0, 0],
[5, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 5, 5, 5],
[5, 5, 8, 8, 0, 0, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0],
[6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6],
[8, 8, 6, 6, 6, 8, 6, 5, 5, 5, 5, 24, 24, 24, 24, 24],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 24, 24, 0, 24, 6, 5],
[8, 8, 8, 6, 6, 6, 6, 6, 6, 8, 6, 8, 8, 8, 8, 6],
[6, 8, 6, 6, 5, 5, 24, 5, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8],
[8, 8, 6, 6, 6, 6, 0, 0, 8, 8, 8, 8, 6, 6, 8, 6],
[6, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24],
[24, 24, 24, 24, 24, 24, 24, 24, 5, 5, 5, 5, 6, 6, 0, 0],
[8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 6, 8, 6],
[6, 24, 24, 24, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 8, 6, 8, 8],
[6, 6, 6, 6, 6, 6, 8, 6, 5, 24, 0, 0, 0, 0, 0, 0],
[8, 8, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 0, 0, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 11, 11, 24, 24, 24, 28],
[6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 24, 0, 0, 0, 0],
[11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
[5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 0, 0, 5, 5, 5, 5],
[5, 5, 5, 5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5],
[8, 8, 8, 8, 8, 8, 0, 8, 8, 0, 0, 6, 6, 8, 6, 5],
[8, 5, 8, 6, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5],
[5, 8, 8, 8, 6, 6, 6, 6, 0, 0, 6, 6, 8, 8, 8, 8],
[6, 5, 24, 5, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5],
[5, 5, 5, 6, 6, 6, 6, 6, 6, 8, 5, 6, 6, 6, 6, 24],
[24, 24, 24, 24, 24, 24, 24, 6, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 6, 6, 6, 6, 6, 6, 8, 8, 6, 6, 6, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 24, 24, 24, 5, 24, 24],
[24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 8, 6],
[5, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[24, 24, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 0, 8, 6, 6, 6, 6, 6, 6],
[6, 8, 6, 6, 8, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 5, 5, 5, 5, 5],
[5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 6, 0, 6, 6, 0, 6],
[6, 6, 6, 6, 6, 6, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 0],
[6, 6, 0, 8, 8, 6, 8, 6, 5, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 6, 6, 8, 8, 24, 24, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 5, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 8, 8, 6, 6, 6, 6, 6, 0, 0, 0, 8, 8],
[6, 8, 6, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24],
[11, 11, 11, 11, 11, 28, 28, 28, 28, 28, 28, 28, 28, 26, 26, 26],
[26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24],
[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0],
[24, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16],
[6, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 24, 24, 24, 24, 24, 28, 28, 28, 28],
[4, 4, 4, 4, 24, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 11, 11, 11, 11, 11],
[11, 11, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 5],
[11, 11, 11, 11, 11, 11, 11, 24, 24, 24, 24, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 6],
[5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],
[8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8],
[8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 6],
[6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],
[4, 4, 24, 4, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 4, 4, 0, 4, 4, 0],
[5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 28, 6, 6, 24],
[16, 16, 16, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 0, 0, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 8, 8, 6, 6, 6, 28, 28, 28, 8, 8, 8],
[8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 6, 6, 6, 6, 6],
[6, 6, 6, 28, 28, 6, 6, 6, 6, 6, 6, 6, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 6, 6, 6, 28, 28],
[28, 28, 6, 6, 6, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2],
[2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 1, 1],
[0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1],
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 0, 2, 0, 2, 2, 2],
[2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1],
[1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 0],
[1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1],
[1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2],
[2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 25],
[2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 25],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 25, 2, 2, 2, 2, 2, 2],
[1, 1, 1, 1, 1, 1, 1, 1, 1, 25, 2, 2, 2, 2, 2, 2],
[2, 2, 2, 25, 2, 2, 2, 2, 2, 2, 1, 2, 0, 0, 41, 73],
[105, 137, 169, 201, 233, 265, 297, 329, 41, 73, 105, 137, 169, 201, 233, 265],
[297, 329, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 41, 73, 105, 137],
[169, 201, 233, 265, 297, 329, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329],
[6, 6, 6, 6, 6, 6, 6, 28, 28, 28, 28, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 28, 28, 28],
[28, 28, 28, 28, 28, 6, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 6, 28, 28, 24, 24, 24, 24, 24, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 6],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2],
[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0],
[0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0],
[6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6],
[6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 6, 6, 6, 6, 6],
[6, 6, 0, 6, 6, 0, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0],
[4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6],
[6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 0, 0],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 0, 5, 28],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6],
[41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 0, 0, 26],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 6, 6, 6],
[5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 0, 5, 5, 0],
[5, 5, 5, 5, 5, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11],
[2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 4, 0, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 11, 11, 11],
[26, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 11],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0],
[5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],
[0, 5, 5, 0, 5, 0, 0, 5, 0, 5, 5, 5, 5, 5, 5, 5],
[5, 5, 5, 0, 5, 5, 5, 5, 0, 5, 0, 5, 0, 0, 0, 0],
[0, 0, 5, 0, 0, 0, 0, 5, 0, 5, 0, 5, 0, 5, 5, 5],
[0, 5, 5, 0, 5, 0, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5],
[0, 5, 5, 0, 5, 0, 0, 5, 5, 5, 5, 0, 5, 5, 5, 5],
[5, 5, 5, 0, 5, 5, 5, 5, 0, 5, 5, 5, 5, 0, 5, 0],
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5],
[0, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5],
[25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0],
[0, 0, 0, 0, 0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27],
[28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 28, 28, 28, 28, 28],
[28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0],
[28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 28],
[28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28],
[28, 28, 28, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28],
[0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0]]
pool2 = [[0, 0, 1, 2, 3, 4, 5, 6, 0, 0, 7, 8, 9, 10, 11, 12,
13, 13, 13, 14, 15, 13, 13, 16, 17, 18, 19, 20, 21, 22, 13, 23,
13, 13, 13, 24, 25, 11, 11, 11, 11, 26, 11, 27, 28, 29, 30, 31,
32, 32, 32, 32, 32, 32, 32, 33, 34, 35, 36, 11, 37, 38, 13, 39],
[9, 9, 9, 11, 11, 11, 13, 13, 40, 13, 13, 13, 41, 13, 13, 13,
13, 13, 13, 42, 9, 43, 11, 11, 44, 45, 32, 46, 47, 48, 49, 50,
51, 52, 48, 48, 53, 32, 54, 55, 48, 48, 48, 48, 48, 56, 57, 58,
59, 60, 48, 32, 61, 48, 48, 48, 48, 48, 62, 63, 64, 48, 65, 66],
[48, 67, 68, 69, 48, 70, 71, 48, 72, 73, 48, 48, 74, 32, 75, 32,
76, 48, 48, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 83, 84, 91, 92, 93, 94, 95, 96, 97, 84, 98, 99, 100, 88, 101,
102, 83, 84, 103, 104, 105, 88, 106, 107, 108, 109, 110, 111, 112, 94, 113],
[114, 115, 84, 116, 117, 118, 88, 119, 120, 115, 84, 121, 122, 123, 88, 124,
125, 115, 48, 126, 127, 128, 88, 129, 130, 131, 48, 132, 133, 134, 94, 135,
136, 48, 48, 137, 138, 139, 140, 140, 141, 48, 142, 143, 144, 145, 140, 140,
146, 147, 148, 149, 150, 48, 151, 152, 153, 154, 32, 155, 156, 157, 140, 140],
[48, 48, 158, 159, 160, 161, 162, 163, 164, 165, 9, 9, 166, 11, 11, 167,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 168, 169, 48, 48, 168, 48, 48, 170, 171, 172, 48, 48,
48, 171, 48, 48, 48, 173, 174, 175, 48, 176, 9, 9, 9, 9, 9, 177],
[178, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 179, 48, 180, 181, 48, 48, 48, 48, 182, 183,
48, 184, 48, 185, 48, 186, 187, 188, 48, 48, 48, 189, 190, 191, 192, 193],
[194, 192, 48, 48, 195, 48, 48, 196, 197, 48, 198, 48, 48, 48, 48, 199,
48, 200, 201, 202, 203, 48, 204, 205, 48, 48, 206, 48, 207, 208, 209, 209,
48, 210, 48, 48, 48, 211, 212, 213, 192, 192, 214, 215, 216, 140, 140, 140,
217, 48, 48, 218, 219, 160, 220, 221, 222, 48, 223, 64, 48, 48, 224, 225],
[48, 48, 226, 227, 228, 64, 48, 229, 230, 9, 9, 231, 232, 233, 234, 235,
11, 11, 236, 27, 27, 27, 237, 238, 11, 239, 27, 27, 32, 32, 32, 32,
13, 13, 13, 13, 13, 13, 13, 13, 13, 240, 13, 13, 13, 13, 13, 13,
241, 242, 241, 241, 242, 243, 241, 244, 245, 245, 245, 246, 247, 248, 249, 250],
[251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 261, 262, 263, 264, 265,
266, 267, 268, 269, 270, 271, 272, 272, 273, 274, 275, 209, 276, 277, 209, 278,
279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
280, 209, 281, 209, 209, 209, 209, 282, 209, 283, 279, 284, 209, 285, 286, 209],
[209, 209, 287, 140, 288, 140, 271, 271, 271, 289, 209, 209, 209, 209, 290, 271,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 291, 292, 209, 209, 293,
209, 209, 209, 209, 209, 209, 294, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 295, 296, 271, 297, 209, 209, 298, 279, 299, 279],
[209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
279, 279, 279, 279, 279, 279, 279, 279, 300, 301, 279, 279, 279, 302, 279, 303,
279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279,
209, 209, 209, 279, 304, 209, 209, 305, 209, 306, 209, 209, 209, 209, 209, 209],
[9, 9, 9, 11, 11, 11, 307, 308, 13, 13, 13, 13, 13, 13, 309, 310,
11, 11, 311, 48, 48, 48, 312, 313, 48, 314, 315, 315, 315, 315, 32, 32,
316, 317, 318, 319, 320, 321, 140, 140, 209, 322, 209, 209, 209, 209, 209, 323,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 324, 140, 325],
[326, 327, 328, 329, 136, 48, 48, 48, 48, 330, 178, 48, 48, 48, 48, 331,
332, 48, 48, 136, 48, 48, 48, 48, 200, 333, 48, 48, 209, 209, 323, 48,
209, 334, 335, 209, 336, 337, 209, 209, 335, 209, 209, 337, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 209, 209, 209, 209,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 338, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 151, 209, 209, 209, 287, 48, 48, 229,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
339, 48, 340, 140, 13, 13, 341, 342, 13, 343, 48, 48, 48, 48, 344, 345,
31, 346, 347, 348, 13, 13, 13, 349, 350, 351, 352, 353, 354, 355, 140, 356],
[357, 48, 358, 359, 48, 48, 48, 360, 361, 48, 48, 362, 363, 192, 32, 364,
64, 48, 365, 48, 366, 367, 48, 151, 76, 48, 48, 368, 369, 370, 371, 372,
48, 48, 373, 374, 375, 376, 48, 377, 48, 48, 48, 378, 379, 380, 381, 382,
383, 384, 315, 11, 11, 385, 386, 11, 11, 11, 11, 11, 48, 48, 387, 192],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 388, 48, 389, 48, 48, 206],
[390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390,
390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390, 390],
[391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391],
[391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 204, 48, 48, 48, 48, 48, 48, 207, 140, 140,
392, 393, 394, 395, 396, 48, 48, 48, 48, 48, 48, 397, 398, 399, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 400, 209, 48, 48, 48, 48, 401, 48, 48, 402, 140, 140, 403,
32, 404, 32, 405, 406, 407, 408, 409, 48, 48, 48, 48, 48, 48, 48, 410,
411, 2, 3, 4, 5, 412, 413, 414, 48, 415, 48, 200, 416, 417, 418, 419],
[420, 48, 172, 421, 204, 204, 140, 140, 48, 48, 48, 48, 48, 48, 48, 71,
422, 271, 271, 423, 272, 272, 272, 424, 425, 426, 427, 140, 140, 209, 209, 428,
140, 140, 140, 140, 140, 140, 140, 140, 48, 151, 48, 48, 48, 100, 429, 430,
48, 48, 431, 48, 432, 48, 48, 433, 48, 434, 48, 48, 435, 436, 140, 140],
[9, 9, 437, 11, 11, 48, 48, 48, 48, 204, 192, 9, 9, 438, 11, 439,
48, 48, 440, 48, 48, 48, 441, 442, 442, 443, 444, 445, 140, 140, 140, 140,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 314, 48, 199, 440, 140, 446, 27, 27, 447, 140, 140, 140, 140],
[448, 48, 48, 449, 48, 450, 48, 451, 48, 200, 452, 140, 140, 140, 48, 453,
48, 454, 48, 455, 140, 140, 140, 140, 48, 48, 48, 456, 271, 457, 271, 271,
458, 459, 48, 460, 461, 462, 48, 463, 48, 464, 140, 140, 465, 48, 466, 467,
48, 48, 48, 468, 48, 469, 48, 470, 48, 471, 472, 140, 140, 140, 140, 140],
[48, 48, 48, 48, 196, 140, 140, 140, 9, 9, 9, 473, 11, 11, 11, 474,
48, 48, 475, 192, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 271, 476, 48, 48, 477, 478, 140, 140, 140, 479,
48, 464, 480, 48, 62, 481, 140, 48, 482, 140, 140, 48, 483, 140, 48, 314],
[484, 48, 48, 485, 486, 457, 487, 488, 222, 48, 48, 489, 490, 48, 196, 192,
491, 48, 492, 493, 494, 48, 48, 495, 222, 48, 48, 496, 497, 498, 499, 500,
48, 97, 501, 502, 503, 140, 140, 140, 504, 505, 506, 48, 48, 507, 508, 192,
509, 83, 84, 510, 511, 512, 513, 514, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 48, 515, 516, 517, 478, 140, 48, 48, 48, 518, 519, 192, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 520, 521, 522, 523, 140, 140,
48, 48, 48, 524, 525, 192, 526, 140, 48, 48, 527, 528, 192, 140, 140, 140,
48, 173, 529, 530, 314, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 501, 531, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 532,
533, 534, 48, 535, 536, 192, 140, 140, 140, 140, 537, 48, 48, 538, 539, 140,
540, 48, 48, 541, 542, 543, 48, 48, 544, 545, 546, 48, 48, 48, 48, 196,
547, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[84, 48, 520, 548, 549, 148, 175, 550, 48, 551, 552, 553, 140, 140, 140, 140,
554, 48, 48, 555, 556, 192, 557, 48, 558, 559, 192, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 560,
561, 115, 48, 562, 563, 192, 140, 140, 140, 140, 140, 100, 271, 564, 565, 566],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 207, 140, 140, 140, 140, 140, 140],
[272, 272, 272, 272, 272, 272, 567, 568, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 388, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 48, 48, 48, 48, 569],
[48, 48, 48, 570, 571, 572, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 314, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 196, 48, 200, 370, 48, 48, 48, 48, 200, 192, 48, 204, 573,
48, 48, 48, 574, 575, 576, 577, 578, 48, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 9, 9, 11, 11, 271, 579, 140, 140, 140, 140, 140, 140,
48, 48, 48, 48, 580, 581, 582, 582, 583, 584, 140, 140, 140, 140, 585, 586],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 440],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 199, 140, 140,
196, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 587],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 588, 589, 140, 590, 591, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 206,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 48, 48, 48, 48, 71, 151, 196, 592, 593, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
32, 32, 594, 32, 595, 209, 209, 209, 209, 209, 209, 209, 323, 140, 140, 140],
[209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 324,
209, 209, 596, 209, 209, 209, 597, 598, 599, 209, 600, 209, 209, 209, 288, 140,
209, 209, 209, 209, 601, 140, 140, 140, 140, 140, 140, 140, 271, 602, 271, 602,
209, 209, 209, 209, 209, 287, 271, 461, 140, 140, 140, 140, 140, 140, 140, 140],
[9, 603, 11, 604, 605, 606, 241, 9, 607, 608, 609, 610, 611, 9, 603, 11,
612, 613, 11, 614, 615, 616, 617, 9, 618, 11, 9, 603, 11, 604, 605, 11,
241, 9, 607, 617, 9, 618, 11, 9, 603, 11, 619, 9, 620, 621, 622, 623,
11, 624, 9, 625, 626, 627, 628, 11, 629, 9, 630, 11, 631, 632, 633, 634],
[209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
32, 32, 32, 635, 32, 32, 636, 637, 638, 639, 45, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
640, 641, 642, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[643, 644, 645, 27, 27, 27, 646, 140, 647, 140, 140, 140, 140, 140, 140, 140,
48, 48, 151, 648, 649, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 650, 140, 48, 48, 651, 652,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 653, 192,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 654, 200],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 655, 595, 140, 140,
9, 9, 607, 11, 656, 370, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[140, 140, 140, 140, 140, 140, 140, 499, 271, 271, 657, 658, 140, 140, 140, 140,
499, 271, 659, 660, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
661, 48, 662, 663, 664, 665, 666, 667, 668, 206, 669, 206, 140, 140, 140, 670,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[209, 209, 325, 209, 209, 209, 209, 209, 209, 323, 334, 671, 671, 671, 209, 324,
672, 209, 209, 209, 209, 209, 209, 209, 209, 209, 673, 140, 140, 140, 674, 209,
675, 209, 209, 325, 676, 677, 324, 140, 140, 140, 140, 140, 140, 140, 140, 140,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 678],
[209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 679, 426, 426,
209, 209, 209, 209, 209, 209, 209, 680, 209, 209, 209, 209, 209, 176, 325, 427],
[325, 209, 209, 209, 681, 176, 209, 209, 681, 209, 673, 677, 140, 140, 140, 140,
209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
209, 209, 209, 209, 209, 323, 673, 426, 676, 209, 209, 682, 683, 325, 676, 676,
209, 209, 209, 209, 209, 209, 209, 209, 209, 684, 209, 209, 288, 140, 140, 192],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 207, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 204, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 478, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 100, 140],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 204, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 71, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
[48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 140, 140, 140, 140, 140],
[685, 140, 570, 570, 570, 570, 570, 570, 140, 140, 140, 140, 140, 140, 140, 140,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
[391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391,
391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 391, 686]]
buf3 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 13, 13,
13, 13, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 15, 16, 17, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 18, 19, 19, 20, 20, 20, 20, 20, 20, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 13, 35, 33, 33,
33, 36, 33, 33, 33, 33, 33, 33, 33, 33, 37, 38, 13, 13, 13, 13,
13, 39, 13, 40, 33, 33, 33, 33, 33, 33, 33, 41, 42, 33, 33, 43,
33, 33, 33, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 33,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 13, 13, 56, 13, 13, 13, 57, 58, 13,
13, 13, 13, 59, 13, 13, 13, 13, 13, 13, 60, 33, 33, 33, 61, 33,
13, 13, 13, 13, 62, 13, 13, 13, 63, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
64, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 65,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 65]
def code_property(ch):
return pool[pool2[buf3[ch >> 10]][(ch >> 4) & 0x3F]][ch & 0xF]
def code_type(ch):
return code_property(ch) & 0x1F
def code_numeric(ch):
return (code_property(ch) >> 5) - 1
import asyncio
from collections import OrderedDict
import time
import locale
import sys
import importlib
MAX_ARITY = 2147483647
def make_special(func):
peek = Provable(MASK_PRED_SPECIAL)
peek.func = func
return peek
def make_check(func):
peek = Provable(MASK_PRED_CHECK)
peek.func = func
return peek
def make_arithmetic(func):
peek = Provable(MASK_PRED_ARITHMETIC)
peek.func = func
return peek
def test_fail(args):
return False
def test_cut(args):
choice = deref(exec_build(args[0]))
cut(choice)
return True
def test_mark(args):
choice = redo
return exec_unify(args[0], choice)
def special_seq(args):
temp = deref(args[0])
solve_mark(temp)
temp = deref(args[1])
solve_seq(temp)
return True
def solve_mark(temp):
if is_compound(temp) and temp.functor == 'just' and len(temp.args) == 1:
temp = deref(temp.args[0])
bind(redo, temp)
def solve_seq(goal):
back = None
res = None
while is_compound(goal) and goal.functor == "." and len(goal.args) == 2:
peek = goal.args[0]
temp = Compound(".", [peek, NotImplemented])
if back is None:
res = temp
else:
back.args[1] = temp
back = temp
goal = deref(goal.args[1])
if back is None:
res = call.args[1]
else:
back.args[1] = call.args[1]
cont(res)
def special_alt(args):
goal = deref(args[0])
return solve_alt(goal, -1, None)
def solve_alt(goal, at, choice):
if is_compound(goal) and goal.functor == "." and len(goal.args) == 2:
mark = trail
peek = deref(goal.args[0])
temp = deref(peek.args[0])
solve_mark(temp)
peek = deref(peek.args[1])
goal = deref(goal.args[1])
if is_compound(goal) and goal.functor == "." and len(goal.args) == 2:
if choice is None:
choice = Choice(solve_alt, goal, -1, mark)
else:
choice.data = goal
more(choice)
solve_seq(peek)
return True
else:
return False
def test_sys_raise(args):
problem = exec_build(args[0])
raise Exception(copy_term(problem))
def special_sys_trap(args):
goal = deref(args[0])
snap = snap_setup()
goal = Compound(".", [goal, "[]"])
cont(goal)
return solve_catch(snap, True, None)
def solve_catch(snap, found, choice):
if choice is not None:
choice.mark = None
choice.cont = "[]"
choice.tail = None
try:
found = solve(snap, found)
except Exception as err:
snap_cleanup(snap)
goal = deref(call.args[0])
err = map_throwable(err)
if not unify(goal.args[1], err.args[0]):
raise err from None
goal = deref(goal.args[2])
goal = Compound(".", [goal, call.args[1]])
cont(goal)
return True
if found is False:
return False
if redo is not snap:
if choice is None:
choice = Choice(solve_catch, snap, False, trail)
else:
choice.mark = trail
choice.cont = call
choice.tail = redo
more(choice)
else:
cut(snap.tail)
if found is True:
cont(snap.cont.args[1])
return found
def map_throwable(err):
if isinstance(err, RecursionError):
err = make_error(Compound("system_error", ["stack_overflow"]))
return err
def test_os_sleep_promise(args):
delay = deref(exec_build(args[0]))
check_integer(delay)
if delay < 0:
raise make_error(Compound("domain_error",
["not_less_than_zero", delay]))
buf = ctx
return exec_unify(args[1], lambda: sleep_promise(buf, delay))
async def sleep_promise(buf, delay):
register_interrupt(buf, asyncio.current_task().cancel)
try:
await asyncio.sleep(delay/1000.0)
except asyncio.CancelledError:
pass
finally:
register_interrupt(buf, lambda: None)
def test_os_import_promise(args):
url = deref(exec_build(args[0]))
check_atom(url)
res = {}
if not exec_unify(args[1], res):
return False
buf = ctx
return exec_unify(args[2], lambda: import_promise(buf, url, res))
async def import_promise(buf, url, res):
name = find_name(url)
module = await asyncio.to_thread(blocking_import, name)
res["module"] = module
def blocking_import(name):
return importlib.import_module(name)
def find_name(url):
if not url.endswith(".py"):
return None
path = find_path(url)
if path is None:
return None
url = url[len(path)+1:len(url)-3]
url = url.replace("/", ".")
url = url.replace("\\", ".")
return url
def find_path(url):
i = 0
while i < len(sys.path):
path = sys.path[i]
if (url.startswith(path) and
(url.startswith("/", len(path)) or
url.startswith("\\", len(path)))):
return path
i = i+1
return None
def test_os_invoke_main(args):
module = deref(exec_build(args[0]))
module.main()
return True
def special_yield(args):
if (gc_flags & GC_MASK_ALLOW_YIELD) == 0:
raise make_error(Compound("system_error", ["illegal_yield"]))
cont(call.args[1])
more(Choice(solve_signal, None, None, trail))
return deref(args[0])
def special_shield(args):
goal = deref(args[0])
snap = snap_setup()
goal = Compound(".", [goal, "[]"])
cont(goal)
return solve_shield(snap, True, None)
def solve_shield(snap, found, choice):
if choice is not None:
choice.mark = None
choice.cont = "[]"
choice.tail = None
back = gc_flags & GC_MASK_ASYNC_MODE
set_gc_flags(gc_flags & ~GC_MASK_ASYNC_MODE)
try:
found = solve(snap, found)
except Exception as err:
set_gc_flags((gc_flags & ~GC_MASK_ASYNC_MODE) | back)
snap_cleanup(snap)
raise err from None
set_gc_flags((gc_flags & ~GC_MASK_ASYNC_MODE) | back)
if found is False:
return False
if redo is not snap:
if choice is None:
choice = Choice(solve_shield, snap, False, trail)
else:
choice.mark = trail
choice.cont = call
choice.tail = redo
more(choice)
else:
cut(snap.tail)
if found is True:
cont(snap.cont.args[1])
return found
def special_unshield(args):
goal = deref(args[0])
snap = snap_setup()
goal = Compound(".", [goal, "[]"])
cont(goal)
return solve_unshield(snap, True, None)
def solve_unshield(snap, found, choice):
if choice is not None:
choice.mark = None
choice.cont = "[]"
choice.tail = None
back = gc_flags & GC_MASK_ASYNC_MODE
set_gc_flags(gc_flags | GC_MASK_ASYNC_MODE)
try:
found = solve(snap, found)
except Exception as err:
set_gc_flags((gc_flags & ~GC_MASK_ASYNC_MODE) | back)
snap_cleanup(snap)
raise err from None
set_gc_flags((gc_flags & ~GC_MASK_ASYNC_MODE) | back)
if found is False:
return False
if redo is not snap:
if choice is None:
choice = Choice(solve_unshield, snap, False, trail)
else:
choice.mark = trail
choice.cont = call
choice.tail = redo
more(choice)
else:
cut(snap.tail)
if found is True:
cont(snap.cont.args[1])
return found
def check_atom(beta):
if not is_atom(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["atom", beta]))
def check_number(beta):
if not is_number(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["number", beta]))
def check_integer(beta):
if not is_integer(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["integer", beta]))
def check_atomic(beta):
if is_variable(beta) or is_compound(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["atomic", beta]))
def check_nil(beta):
if beta != "[]":
if is_compound(beta) and beta.functor == "." and len(beta.args) == 2:
raise make_error(Compound("representation_error", ["int"]))
else:
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["list", beta]))
def check_symbol(beta):
if is_variable(beta) or is_compound(beta) or is_number(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["symbol", beta]))
def test_unify(args):
alpha = exec_build(args[0])
return exec_unify(args[1], alpha)
def test_copy_term(args):
alpha = exec_build(args[0])
alpha = copy_term(alpha)
return exec_unify(args[1], alpha)
def test_univ(args):
alpha = deref(exec_build(args[0]))
if is_variable(alpha):
beta = deref(exec_build(args[1]))
beta = special_univ_pack(beta)
return unify(alpha, beta)
else:
alpha = special_univ_unpack(alpha)
return exec_unify(args[1], alpha)
def special_univ_pack(beta):
if (is_compound(beta) and
"." == beta.functor and
len(beta.args) == 2):
peek = deref(beta.args[1])
args = list_objects(peek)
peek = deref(beta.args[0])
if len(args) == 0:
check_atomic(peek)
else:
check_symbol(peek)
peek = Compound(peek, args)
return peek
else:
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["list", beta]))
def list_objects(obj):
peek = obj
arity = 0
while (is_compound(peek) and
"." == peek.functor and
len(peek.args) == 2 and
arity < MAX_ARITY):
arity += 1
peek = deref(peek.args[1])
check_nil(peek)
if arity == 0:
return VOID_ARGS
else:
args = [NotImplemented] * arity
peek = obj
arity = 0
while (is_compound(peek) and
"." == peek.functor and
len(peek.args) == 2):
args[arity] = deref(peek.args[0])
arity += 1
peek = deref(peek.args[1])
return args
def special_univ_unpack(alpha):
if is_compound(alpha):
res = Compound(".", [alpha.functor, NotImplemented])
back = res
alpha = alpha.args
i = 0
while i < len(alpha):
peek = Compound(".", [alpha[i], NotImplemented])
back.args[1] = peek
back = peek
i += 1
back.args[1] = "[]"
else:
res = Compound(".", [alpha, "[]"])
return res
def test_functor(args):
alpha = deref(exec_build(args[0]))
if is_variable(alpha):
functor = deref(exec_build(args[1]))
arity = deref(exec_build(args[2]))
check_integer(arity)
if arity < 0:
raise make_error(Compound("domain_error",
["not_less_than_zero", arity]))
if arity > MAX_ARITY:
raise make_error(Compound("representation_error",
["max_arity"]))
if arity == 0:
check_atomic(functor)
res = functor
else:
check_symbol(functor)
temp = [NotImplemented] * arity
i = 0
while i < arity:
temp[i] = Variable()
i += 1
res = Compound(functor, temp)
return unify(alpha, res)
else:
if is_compound(alpha):
functor = alpha.functor
arity = len(alpha.args)
else:
functor = alpha
arity = 0
if not exec_unify(args[1], functor):
return False
return exec_unify(args[2], arity)
def test_arg(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
beta = deref(exec_build(args[1]))
check_callable(beta)
if is_compound(beta):
arity = len(beta.args)
else:
arity = 0
if alpha < 1 or arity < alpha:
return False
beta = beta.args[alpha - 1]
return exec_unify(args[2], beta)
def test_change_arg(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
beta = deref(exec_build(args[1]))
check_callable(beta)
gamma = deref(exec_build(args[2]))
if is_compound(beta):
arity = len(beta.args)
else:
arity = 0
if alpha < 1 or arity < alpha:
return False
beta = beta.args[alpha - 1]
check_var(beta)
link(gamma, beta)
return True
def check_var(beta):
if not is_variable(beta):
beta = copy_term(beta)
raise make_error(Compound("type_error", ["var", beta]))
def link(source, term):
if term.tail is None:
term.instantiated = source
if ((term.flags & VAR_MASK_STATE) ==
(gc_flags & VAR_MASK_STATE)):
mark2_term(source)
else:
beta = copy_term(term)
raise make_error(Compound("type_error", ["conductor", beta]))
def test_ir_object_new(args):
res = {}
return exec_unify(args[0], res)
def test_ir_object_current(args):
obj = deref(exec_build(args[0]))
key = deref(exec_build(args[1]))
check_atom(key)
try:
res = obj[key]
except KeyError:
return False
return exec_unify(args[2], res)
def test_ir_object_set(args):
obj = deref(exec_build(args[0]))
key = deref(exec_build(args[1]))
check_atom(key)
value = deref(exec_build(args[2]))
obj[key] = value
return True
def test_ir_object_keys(args):
obj = deref(exec_build(args[0]))
res = obj.keys()
res = set_to_list(res, "[]")
return exec_unify(args[1], res)
def test_ground(args):
alpha = exec_build(args[0])
alpha = first_variable(alpha)
return alpha is NotImplemented
def test_nonground(args):
alpha = exec_build(args[0])
alpha = first_variable(alpha)
if alpha is NotImplemented:
return False
return exec_unify(args[1], alpha)
def first_variable(alpha):
while True:
alpha = deref(alpha)
if is_variable(alpha):
return alpha
elif is_compound(alpha):
alpha = alpha.args
i = 0
while i < len(alpha) - 1:
res = first_variable(alpha[i])
if res is not NotImplemented:
return res
i += 1
alpha = alpha[i]
else:
return NotImplemented
def test_term_variables(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
gamma = deref(exec_build(args[2]))
alpha = term_variables(alpha)
alpha = set_to_list(alpha, gamma)
return unify(beta, alpha)
def term_variables(alpha):
res = None
def term_variables2(alpha2):
nonlocal res
while True:
alpha2 = deref(alpha2)
if is_variable(alpha2):
if res is None:
res = OrderedDict()
res[alpha2] = None
break
elif is_compound(alpha2):
alpha2 = alpha2.args
i = 0
while i < len(alpha2) - 1:
term_variables2(alpha2[i])
i += 1
alpha2 = alpha2[i]
else:
break
term_variables2(alpha)
return res
def test_term_singletons(args):
alpha = exec_build(args[0])
alpha = term_singletons(alpha)
alpha = set_to_list(alpha, "[]")
return exec_unify(args[1], alpha)
def term_singletons(alpha):
res = None
anon = None
def term_singletons2(alpha2):
nonlocal res
nonlocal anon
while True:
alpha2 = deref(alpha2)
if is_variable(alpha2):
if res is None:
res = OrderedDict()
anon = OrderedDict()
if alpha2 in res:
del anon[alpha2]
else:
res[alpha2] = None
anon[alpha2] = None
break
elif is_compound(alpha2):
alpha2 = alpha2.args
i = 0
while i < len(alpha2) - 1:
term_singletons2(alpha2[i])
i += 1
alpha2 = alpha2[i]
else:
break
term_singletons2(alpha)
return anon
def set_to_list(temp, end):
back = None
res = None
if temp is not None:
for peek in iter(temp):
peek = Compound(".", [peek, NotImplemented])
if back is None:
res = peek
else:
back.args[1] = peek
back = peek
if back is None:
res = end
else:
back.args[1] = end
return res
def test_reference(args):
alpha = deref(exec_build(args[0]))
if is_variable(alpha) or is_compound(alpha):
return False
if is_atom(alpha) or is_number(alpha):
return False
return True
def test_acyclic(args):
alpha = exec_build(args[0])
return is_acyclic(alpha)
def is_acyclic(alpha):
visited = None
def is_acyclic2(alpha2):
nonlocal visited
undo = None
while True:
if is_variable(alpha2):
if alpha2.instantiated is not NotImplemented:
if visited is None:
visited = set()
elif alpha2 in visited:
return False
visited.add(alpha2)
if undo is None:
undo = []
undo.append(alpha2)
alpha2 = alpha2.instantiated
else:
break
elif is_compound(alpha2):
alpha2 = alpha2.args
i = 0
while i < len(alpha2)-1:
if not is_acyclic2(alpha2[i]):
return False
i += 1
alpha2 = alpha2[i]
else:
break
if undo is not None:
i = len(undo)-1
while i >= 0:
visited.discard(undo[i])
i -= 1
return True
return is_acyclic2(alpha)
def test_callable(args):
alpha = deref(exec_build(args[0]))
if is_variable(alpha) or is_number(alpha):
return False
return True
def test_var(args):
alpha = deref(exec_build(args[0]))
return is_variable(alpha)
def test_nonvar(args):
alpha = deref(exec_build(args[0]))
return not is_variable(alpha)
def test_compound(args):
alpha = deref(exec_build(args[0]))
return is_compound(alpha)
def test_atomic(args):
alpha = deref(exec_build(args[0]))
if is_compound(alpha) or is_variable(alpha):
return False
return True
def test_atom(args):
alpha = deref(exec_build(args[0]))
return is_atom(alpha)
def test_number(args):
alpha = deref(exec_build(args[0]))
return is_number(alpha)
def test_integer(args):
alpha = deref(exec_build(args[0]))
return is_integer(alpha)
def test_float(args):
alpha = deref(exec_build(args[0]))
return is_float(alpha)
def narrow_float(alpha):
if is_integer(alpha):
try:
return float(alpha)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
else:
return alpha
def test_code_type(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
if alpha < 0 or alpha > 0x10FFFF:
alpha = 0 # UNASSIGNED
else:
alpha = code_type(alpha)
return exec_unify(args[1], alpha)
def test_code_numeric(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
if alpha < 0 or alpha > 0x10FFFF:
alpha = -1 # UNASSIGNED
else:
alpha = code_numeric(alpha)
return exec_unify(args[1], alpha)
def test_atom_integer(args):
text = deref(exec_build(args[0]))
radix = deref(exec_build(args[1]))
check_integer(radix)
if radix < 2 or radix > 36:
raise make_error(Compound("domain_error", ["radix", radix]))
if is_variable(text):
beta = deref(exec_build(args[2]))
check_integer(beta)
if beta >= 0:
beta = atom_integer_encode(beta, radix)
else:
beta = "-" + atom_integer_encode(- beta, radix)
return unify(text, beta)
else:
check_atom(text)
text = atom_integer_decode(text, radix)
return exec_unify(args[2], text)
def atom_integer_encode(num, radix):
if radix == 10:
return str(num)
if num.bit_length() < 32:
return str_integer(num, radix)
else:
step = 32 // (radix - 1).bit_length()
base = radix ** step
count = 0
res = str_integer(num % base, radix)
num = num // base
while num != 0:
count += step
res = res.rjust(count, "0")
res = str_integer(num % base, radix) + res
num = num // base
return res
def str_integer(num, radix):
res = chr_digit(num % radix)
num = num // radix
while num != 0:
res = chr_digit(num % radix) + res
num = num // radix
return res
def chr_digit(num):
if num < 10:
return chr(num + 48)
else:
return chr(num + 87)
def atom_integer_decode(text, radix):
text = ascii_replace(text, radix, False)
try:
return int(text, radix)
except Exception:
raise make_error(Compound("syntax_error", ["illegal_number"]))
def test_atom_number(args):
text = deref(exec_build(args[0]))
if is_variable(text):
beta = deref(exec_build(args[1]))
check_number(beta)
beta = atom_number_encode(beta)
return unify(text, beta)
else:
check_atom(text)
text = atom_number_decode(text)
return exec_unify(args[1], text)
def atom_number_encode(num):
if is_integer(num):
return str(num)
else:
return shape_number("%.17g" % num)
def shape_number(res):
peek = res.find("e")
if peek != -1:
res = shape_number_mantissa(res[0:peek]) + \
"E" + shape_number_exponent(res[peek+1:])
else:
res = shape_number_mantissa(res)
return res
def shape_number_mantissa(res):
if "." not in res:
res += ".0"
return res
def shape_number_exponent(res):
if 0 < len(res) and ord(res[0]) == 43: # '+'
res = res[1:]
if res.startswith("0") and 1 < len(res):
res = res[1:]
elif res.startswith("-0") and 2 < len(res):
res = "-" + res[2:]
return res
def atom_number_decode(text):
text = ascii_replace(text, 10, True)
if "." in text or "e" in text or "E" in text:
try:
return float(text)
except Exception:
raise make_error(Compound("syntax_error", ["illegal_number"]))
else:
try:
return int(text)
except Exception:
raise make_error(Compound("syntax_error", ["illegal_number"]))
def test_atom_reference(args):
text = deref(exec_build(args[0]))
if is_variable(text):
obj = deref(exec_build(args[1]))
if obj is True:
obj = "True"
elif obj is False:
obj = "False"
elif obj is None:
obj = "None"
else:
obj = "Reference"
return unify(text, obj)
else:
check_atom(text)
if text == "True":
obj = True
elif text == "False":
obj = False
elif text == "None":
obj = None
else:
obj = NotImplemented
if obj is NotImplemented:
raise make_error(Compound("syntax_error", ["illegal_number"]))
return exec_unify(args[1], obj)
def ascii_replace(text, radix, expo):
buf = ""
last = 0
pos = 0
while pos < len(text):
ch = ord(text[pos])
val = code_numeric(ch)
if val >= 0 and val < radix:
if ch <= 127: # ASCII
pass
else:
if val < 10:
val += 48 # '0'
else:
val += 55 # 'A'-10
buf += text[last:pos] + chr(val)
last = pos + 1
elif (ch == 43 or ch == 45) and (pos == 0 or
(expo and (ord(text[pos-1]) == 101 or ord(text[pos-1]) == 69))):
pass
elif expo and (ch == 46 or ch == 101 or ch == 69):
pass
else:
raise make_error(Compound("syntax_error", ["illegal_number"]))
pos += 1
if last != 0:
buf += text[last:]
return buf
else:
return text
def test_sys_get_locale(args):
loc = locale.getlocale()[0]
return exec_unify(args[0], loc if loc is not None else "")
def test_sys_time_atom(args):
text = deref(exec_build(args[0]))
check_atom(text)
tms = deref(exec_build(args[1]))
if is_variable(tms):
res = deref(exec_build(args[2]))
check_atom(res)
date = time.strptime(res, text)
return unify(tms, int(time.mktime(date)*1000))
else:
check_integer(tms)
date = time.localtime(tms/1000)
return exec_unify(args[2], time.strftime(text, date))
def test_sys_get_args(args):
res = "[]"
i = len(sys.argv)-1
while i >= 1:
res = Compound(".", [sys.argv[i], res])
i -= 1
return exec_unify(args[0], res)
add("fail", 0, make_check(test_fail))
add("$CUT", 1, make_check(test_cut))
add("$MARK", 1, make_check(test_mark))
add("$SEQ", 2, make_special(special_seq))
add("$ALT", 1, make_special(special_alt))
add("sys_raise", 1, make_check(test_sys_raise))
add("sys_trap", 3, make_special(special_sys_trap))
add("os_sleep_promise", 2, make_check(test_os_sleep_promise))
add("os_import_promise", 3, make_check(test_os_import_promise))
add("os_invoke_main", 1, make_check(test_os_invoke_main))
add("$YIELD", 1, make_special(special_yield))
add("shield", 1, make_special(special_shield))
add("unshield", 1, make_special(special_unshield))
add("=", 2, make_check(test_unify))
add("copy_term", 2, make_check(test_copy_term))
add("=..", 2, make_check(test_univ))
add("functor", 3, make_check(test_functor))
add("arg", 3, make_check(test_arg))
add("change_arg", 3, make_check(test_change_arg))
add("ir_object_new", 1, make_check(test_ir_object_new))
add("ir_object_current", 3, make_check(test_ir_object_current))
add("ir_object_set", 3, make_check(test_ir_object_set))
add("ir_object_keys", 2, make_check(test_ir_object_keys))
add("ground", 1, make_check(test_ground))
add("nonground", 2, make_check(test_nonground))
add("term_variables", 3, make_check(test_term_variables))
add("term_singletons", 2, make_check(test_term_singletons))
add("reference", 1, make_check(test_reference))
add("acyclic_term", 1, make_check(test_acyclic))
add("callable", 1, make_check(test_callable))
add("var", 1, make_check(test_var))
add("nonvar", 1, make_check(test_nonvar))
add("compound", 1, make_check(test_compound))
add("atomic", 1, make_check(test_atomic))
add("atom", 1, make_check(test_atom))
add("number", 1, make_check(test_number))
add("integer", 1, make_check(test_integer))
add("float", 1, make_check(test_float))
add("code_type", 2, make_check(test_code_type))
add("code_numeric", 2, make_check(test_code_numeric))
add("atom_integer", 3, make_check(test_atom_integer))
add("atom_number", 2, make_check(test_atom_number))
add("atom_reference", 2, make_check(test_atom_reference))
add("sys_get_locale", 1, make_check(test_sys_get_locale))
add("sys_time_atom", 3, make_check(test_sys_time_atom))
add("sys_get_args", 1, make_check(test_sys_get_args))
import math
import sys
def test_eval(args):
res = exec_eval(args[0])
return exec_unify(args[1], res)
def arit_neg(args):
alpha = exec_eval(args[0])
return -alpha
def arit_add(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
return alpha + beta
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_sub(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
return alpha - beta
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_mul(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
return alpha * beta
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_quot(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
if beta == 0:
raise make_error(Compound("evaluation_error", ["zero_divisor"]))
try:
if is_integer(alpha) and is_integer(beta):
return float(alpha) / float(beta)
else:
return alpha / beta
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_intquot(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta == 0:
raise make_error(Compound("evaluation_error", ["zero_divisor"]))
res = abs(alpha) // abs(beta)
if (alpha < 0) != (beta < 0):
return -res
else:
return res
def arit_rem(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta == 0:
raise make_error(Compound("evaluation_error", ["zero_divisor"]))
res = abs(alpha) % abs(beta)
if alpha < 0:
return -res
else:
return res
def arit_float(args):
alpha = exec_eval(args[0])
return narrow_float(alpha)
def arit_intpow(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
if is_integer(alpha) and is_integer(beta):
if beta < 0:
raise make_error(Compound("domain_error",
["not_less_than_zero", beta]))
return alpha ** beta
else:
return float(alpha) ** float(beta)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_div(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta == 0:
raise make_error(Compound("evaluation_error", ["zero_divisor"]))
return alpha // beta
def arit_mod(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta == 0:
raise make_error(Compound("evaluation_error", ["zero_divisor"]))
return alpha % beta
def arit_abs(args):
alpha = exec_eval(args[0])
return abs(alpha)
def arit_sign(args):
alpha = exec_eval(args[0])
if is_integer(alpha):
if alpha < 0:
return -1
elif alpha > 0:
return 1
else:
return 0
else:
if alpha < 0.0:
return -1.0
elif alpha > 0.0:
return 1.0
else:
return 0.0
def arit_min(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
if is_integer(alpha) and is_integer(beta):
return min(alpha, beta)
else:
return min(narrow_float(alpha), narrow_float(beta))
def arit_max(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
if is_integer(alpha) and is_integer(beta):
return max(alpha, beta)
else:
return max(narrow_float(alpha), narrow_float(beta))
def arit_truncate(args):
alpha = exec_eval(args[0])
if is_integer(alpha):
return alpha
else:
return math.trunc(alpha)
def arit_floor(args):
alpha = exec_eval(args[0])
if is_integer(alpha):
return alpha
else:
return math.floor(alpha)
def arit_ceiling(args):
alpha = exec_eval(args[0])
if is_integer(alpha):
return alpha
else:
return math.ceil(alpha)
def arit_round(args):
alpha = exec_eval(args[0])
if is_integer(alpha):
return alpha
else:
return (math.floor(2*alpha)+1) >> 1
def test_numberequal(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return number_equal(alpha, beta)
def test_numbernotequal(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return not number_equal(alpha, beta)
def number_equal(alpha, beta):
if is_integer(alpha) and is_integer(beta):
return alpha == beta
else:
return narrow_float(alpha) == narrow_float(beta)
def test_numberless(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return number_less(alpha, beta)
def test_numbergreaterequal(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return not number_less(alpha, beta)
def test_numbergreater(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return number_less(beta, alpha)
def test_numberlessequal(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
return not number_less(beta, alpha)
def number_less(alpha, beta):
if is_integer(alpha) and is_integer(beta):
return alpha < beta
else:
return narrow_float(alpha) < narrow_float(beta)
def arit_sin(args):
alpha = exec_eval(args[0])
return math.sin(alpha)
def arit_cos(args):
alpha = exec_eval(args[0])
return math.cos(alpha)
def arit_tan(args):
alpha = exec_eval(args[0])
try:
return math.tan(alpha)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_asin(args):
alpha = exec_eval(args[0])
try:
return math.asin(alpha)
except ValueError:
raise make_error(Compound("evaluation_error", ["undefined"]))
def arit_acos(args):
alpha = exec_eval(args[0])
try:
return math.acos(alpha)
except ValueError:
raise make_error(Compound("evaluation_error", ["undefined"]))
def arit_atan(args):
alpha = exec_eval(args[0])
return math.atan(alpha)
def arit_pi(args):
return math.pi
def arit_pow(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
return float(alpha) ** float(beta)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_exp(args):
alpha = exec_eval(args[0])
try:
return math.exp(alpha)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_log(args):
alpha = exec_eval(args[0])
try:
return math.log(alpha)
except ValueError:
raise make_error(Compound("evaluation_error", ["undefined"]))
def arit_sqrt(args):
alpha = exec_eval(args[0])
try:
return math.sqrt(alpha)
except ValueError:
raise make_error(Compound("evaluation_error", ["undefined"]))
def arit_e(args):
return math.e
def arit_epsilon(args):
return sys.float_info.epsilon
def arit_atan2(args):
alpha = exec_eval(args[0])
beta = exec_eval(args[1])
try:
alpha = float(alpha)
beta = float(beta)
if alpha == 0 and beta == 0:
raise make_error(Compound("evaluation_error", ["undefined"]))
else:
return math.atan2(alpha, beta)
except OverflowError:
raise make_error(Compound("evaluation_error", ["float_overflow"]))
def arit_not(args):
alpha = exec_eval(args[0])
check_integer(alpha)
return ~alpha
def arit_and(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
return alpha & beta
def arit_or(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
return alpha | beta
def arit_xor(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
return alpha ^ beta
def arit_shiftright(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta >= 0:
return alpha >> beta
else:
return alpha << (- beta)
def arit_shiftleft(args):
alpha = exec_eval(args[0])
check_integer(alpha)
beta = exec_eval(args[1])
check_integer(beta)
if beta >= 0:
return alpha << beta
else:
return alpha >> (- beta)
def test_equal(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return equal_term(alpha, beta)
def test_notequal(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return not equal_term(alpha, beta)
def equal_term(first, second):
while True:
first = deref(first)
second = deref(second)
if not is_compound(first):
return atomic_equal(first, second)
if not is_compound(second):
return False
if len(first.args) != len(second.args):
return False
if first.functor != second.functor:
return False
first = first.args
second = second.args
i = 0
while i < len(first) - 1:
if not equal_term(first[i], second[i]):
return False
i += 1
first = first[i]
second = second[i]
def test_less(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return compare_term(alpha, beta) < 0
def test_greaterequal(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return compare_term(alpha, beta) >= 0
def test_greater(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return compare_term(alpha, beta) > 0
def test_lessequal(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
return compare_term(alpha, beta) <= 0
def test_compare(args):
alpha = exec_build(args[0])
beta = exec_build(args[1])
gamma = exec_build(args[2])
beta = compare_term(beta, gamma)
if beta < 0:
beta = "<"
elif beta == 0:
beta = "="
else:
beta = ">"
return unify(alpha, beta)
def compare_term(first, second):
while True:
first = deref(first)
second = deref(second)
i = compare_type(first)
k = i - compare_type(second)
if k != 0:
return k
if i == 0:
return ((first.flags & ~VAR_MASK_STATE) -
(second.flags & ~VAR_MASK_STATE))
elif i == 1:
return compare_atomic(first, second)
elif i == 2:
return compare_atomic(first, second)
elif i == 3:
return compare_atomic(order_value(first), order_value(second))
elif i == 4:
return compare_atomic(first, second)
elif i == 5:
k = len(first.args) - len(second.args)
if k != 0:
return k
k = compare_atomic(first.functor, second.functor)
if k != 0:
return k
first = first.args
second = second.args
i = 0
while i < len(first) - 1:
k = compare_term(first[i], second[i])
if k != 0:
return k
i += 1
first = first[i]
second = second[i]
else:
raise make_error(Compound(
"system_error", ["unknown_type"]))
def compare_type(first):
if is_variable(first):
return 0
elif is_compound(first):
return 5
elif is_atom(first):
return 4
elif is_integer(first):
return 2
elif is_float(first):
return 1
else:
return 3
def compare_atomic(first, second):
if first < second:
return -1
if first == second:
return 0
return 1
def order_value(first):
if first is False:
return 0
elif first is True:
return 1
elif first is None:
return -1
else:
raise make_error(Compound("resource_error", ["not_supported"]))
def test_atom_codes(args):
text = deref(exec_build(args[0]))
if is_variable(text):
res = deref(exec_build(args[1]))
res = atom_codes_pack(res)
return unify(text, res)
else:
check_atom(text)
text = atom_codes_unpack(text)
return exec_unify(args[1], text)
def atom_codes_pack(peek):
temp = peek
i = 0
while is_compound(temp) and temp.functor == "." \
and len(temp.args) == 2 and i < MAX_ARITY:
ch = deref(temp.args[0])
check_integer(ch)
if ch < 0 or ch > 0x10FFFF:
raise make_error(Compound("domain_error", ["code_point", ch]))
i += 1
temp = deref(temp.args[1])
check_nil(temp)
res = [NotImplemented] * i
temp = peek
i = 0
while is_compound(temp) and temp.functor == "." and len(temp.args) == 2:
ch = deref(temp.args[0])
res[i] = chr(ch)
i += 1
temp = deref(temp.args[1])
return ''.join(res)
def atom_codes_unpack(text):
back = None
res = None
i = 0
while i < len(text):
ch = ord(text[i])
ch = Compound(".", [ch, NotImplemented])
if back is not None:
back.args[1] = ch
else:
res = ch
back = ch
i += 1
if back is not None:
back.args[1] = "[]"
else:
res = "[]"
return res
def test_char_code(args):
text = deref(exec_build(args[0]))
if is_variable(text):
ch = deref(exec_build(args[1]))
check_integer(ch)
if ch < 0 or ch > 0x10FFFF:
raise make_error(Compound("domain_error", ["code_point", ch]))
ch = chr(ch)
return unify(text, ch)
else:
check_atom(text)
if len(text) != 1:
raise make_error(Compound("type_error", ["character", text]))
text = ord(text)
return exec_unify(args[1], text)
def test_atom_length(args):
text = deref(exec_build(args[0]))
check_atom(text)
return exec_unify(args[1], len(text))
def test_atom_split(args):
text = deref(exec_build(args[0]))
dele = deref(exec_build(args[1]))
check_atom(dele)
if is_variable(text):
res = deref(exec_build(args[2]))
val = atom_split_pack(dele, res)
return unify(text, val)
else:
check_atom(text)
text = atom_split_unpack(text, dele)
return exec_unify(args[2], text)
def atom_split_pack(dele, res):
peek = res
i = 0
while is_compound(peek) and peek.functor == "." \
and len(peek.args) == 2 and i < MAX_ARITY:
i += 1
peek = deref(peek.args[1])
check_nil(peek)
elems = [NotImplemented] * i
peek = res
i = 0
while is_compound(peek) and peek.functor == "." and len(peek.args) == 2:
val = deref(peek.args[0])
check_atom(val)
elems[i] = val
i += 1
peek = deref(peek.args[1])
return dele.join(elems)
def atom_split_unpack(text, dele):
res = "[]"
pos = len(text)
found = text.rfind(dele, 0, pos)
while found != -1:
val = text[found+len(dele):pos]
res = Compound('.', [val, res])
pos = found
found = text.rfind(dele, 0, pos)
val = text[0:pos]
res = Compound('.', [val, res])
return res
def test_atom_arg(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
text = deref(exec_build(args[1]))
check_atom(text)
if alpha < 0 or alpha >= len(text):
return False
return exec_unify(args[2], ord(text[alpha]))
def special_atom_concat(args):
first = deref(args[0])
second = deref(args[1])
third = deref(args[2])
if is_variable(second):
if is_variable(first):
check_atom(third)
return solve2_concat(args, None, 0, None)
else:
check_atom(first)
check_atom(third)
if not third.startswith(first):
return False
if not unify(second, third[len(first):]):
return False
elif is_variable(first):
check_atom(second)
check_atom(third)
if not third.endswith(second):
return False
if not unify(first, third[:len(third)-len(second)]):
return False
else:
check_atom(first)
check_atom(second)
if not unify(third, first+second):
return False
cont(call.args[1])
return True
def solve_concat(rope, at, choice):
goal = deref(call.args[0])
return solve2_concat(goal.args, rope, at, choice)
def solve2_concat(args, rope, at, choice):
text = deref(args[2])
mark = trail
while at <= len(text):
if unify(args[0], text[0:at]) and \
unify(args[1], text[at:]):
at += 1
if at <= len(text):
if choice is None:
choice = Choice(solve_concat, None, at, mark)
else:
choice.at = at
more(choice)
cont(call.args[1])
return True
unbind(mark)
at += 1
return False
def special_sys_atom_match(args):
text = deref(args[0])
check_atom(text)
part = deref(args[1])
check_atom(part)
alpha = deref(args[2])
if is_variable(alpha):
return solve2_match(args, None, 0, None)
else:
check_integer(alpha)
if alpha < 0 or alpha > len(text):
return False
if not text.startswith(part, alpha):
return False
cont(call.args[1])
return True
def solve_match(rope, at, choice):
goal = deref(call.args[0])
return solve2_match(goal.args, rope, at, choice)
def solve2_match(args, rope, at, choice):
text = deref(args[0])
part = deref(args[1])
mark = trail
while at + len(part) <= len(text):
at = text.find(part, at)
if at < 0:
return False
if unify(args[2], at):
at += 1
if at + len(part) <= len(text):
if choice is None:
choice = Choice(solve_match, None, at, mark)
else:
choice.at = at
more(choice)
cont(call.args[1])
return True
unbind(mark)
at += 1
return False
def special_sys_atom_part(args):
text = deref(args[0])
check_atom(text)
alpha = deref(args[1])
if is_variable(alpha):
beta = deref(args[2])
check_integer(beta)
if beta < 0 or beta > len(text):
return False
return solve2_part(args, 0, beta, None)
else:
check_integer(alpha)
beta = deref(args[2])
check_integer(beta)
if alpha < 0 or alpha > len(text):
return False
if beta < 0 or alpha+beta > len(text):
return False
if not unify(args[3], text[alpha:alpha+beta]):
return False
cont(call.args[1])
return True
def solve_part(rope, at, choice):
goal = deref(call.args[0])
return solve2_part(goal.args, rope, at, choice)
def solve2_part(args, alpha, beta, choice):
text = deref(args[0])
mark = trail
while beta <= len(text):
if unify(args[1], alpha) and \
unify(args[3], text[alpha:beta]):
alpha += 1
beta += 1
if beta <= len(text):
if choice is None:
choice = Choice(solve_part, alpha, beta, mark)
else:
choice.data = alpha
choice.at = beta
more(choice)
cont(call.args[1])
return True
unbind(mark)
alpha += 1
beta += 1
return False
def special_sys_last_atom_match(args):
text = deref(args[0])
check_atom(text)
part = deref(args[1])
check_atom(part)
alpha = deref(args[2])
if is_variable(alpha):
return solve2_last_match(args, None, len(text)-len(part), None)
else:
check_integer(alpha)
if alpha < 0 or alpha > len(text):
return False
if not text.startswith(part, alpha):
return False
cont(call.args[1])
return True
def solve_last_match(rope, at, choice):
goal = deref(call.args[0])
return solve2_last_match(goal.args, rope, at, choice)
def solve2_last_match(args, rope, at, choice):
text = deref(args[0])
part = deref(args[1])
mark = trail
while at >= 0:
at = text.rfind(part, 0, at+len(part))
if at < 0:
return False
if unify(args[2], at):
at -= 1
if at >= 0:
if choice is None:
choice = Choice(solve_last_match, None, at, mark)
else:
choice.at = at
more(choice)
cont(call.args[1])
return True
unbind(mark)
at -= 1
return False
def special_sys_last_atom_part(args):
text = deref(args[0])
check_atom(text)
alpha = deref(args[1])
if is_variable(alpha):
beta = deref(args[2])
check_integer(beta)
if beta < 0 or beta > len(text):
return False
return solve2_last_part(args, len(text)-beta, len(text), None)
else:
check_integer(alpha)
beta = deref(args[2])
check_integer(beta)
if alpha < 0 or alpha > len(text):
return False
if beta < 0 or alpha+beta > len(text):
return False
if not unify(args[3], text[alpha:alpha+beta]):
return False
cont(call.args[1])
return True
def solve_last_part(rope, at, choice):
goal = deref(call.args[0])
return solve2_last_part(goal.args, rope, at, choice)
def solve2_last_part(args, alpha, beta, choice):
text = deref(args[0])
mark = trail
while alpha >= 0:
if unify(args[1], alpha) and \
unify(args[3], text[alpha:beta]):
alpha -= 1
beta -= 1
if alpha >= 0:
if choice is None:
choice = Choice(solve_last_part, alpha, beta, mark)
else:
choice.data = alpha
choice.at = beta
more(choice)
cont(call.args[1])
return True
unbind(mark)
alpha -= 1
beta -= 1
return False
add("$EVAL", 2, make_check(test_eval))
add("-", 2, make_arithmetic(arit_neg))
add("+", 3, make_arithmetic(arit_add))
add("-", 3, make_arithmetic(arit_sub))
add("*", 3, make_arithmetic(arit_mul))
add("/", 3, make_arithmetic(arit_quot))
add("//", 3, make_arithmetic(arit_intquot))
add("rem", 3, make_arithmetic(arit_rem))
add("float", 2, make_arithmetic(arit_float))
add("^", 3, make_arithmetic(arit_intpow))
add("div", 3, make_arithmetic(arit_div))
add("mod", 3, make_arithmetic(arit_mod))
add("abs", 2, make_arithmetic(arit_abs))
add("sign", 2, make_arithmetic(arit_sign))
add("min", 3, make_arithmetic(arit_min))
add("max", 3, make_arithmetic(arit_max))
add("truncate", 2, make_arithmetic(arit_truncate))
add("floor", 2, make_arithmetic(arit_floor))
add("ceiling", 2, make_arithmetic(arit_ceiling))
add("round", 2, make_arithmetic(arit_round))
add("=:=", 2, make_check(test_numberequal))
add("=\\=", 2, make_check(test_numbernotequal))
add("<", 2, make_check(test_numberless))
add(">=", 2, make_check(test_numbergreaterequal))
add(">", 2, make_check(test_numbergreater))
add("=<", 2, make_check(test_numberlessequal))
add("sin", 2, make_arithmetic(arit_sin))
add("cos", 2, make_arithmetic(arit_cos))
add("tan", 2, make_arithmetic(arit_tan))
add("asin", 2, make_arithmetic(arit_asin))
add("acos", 2, make_arithmetic(arit_acos))
add("atan", 2, make_arithmetic(arit_atan))
add("pi", 1, make_arithmetic(arit_pi))
add("**", 3, make_arithmetic(arit_pow))
add("exp", 2, make_arithmetic(arit_exp))
add("log", 2, make_arithmetic(arit_log))
add("sqrt", 2, make_arithmetic(arit_sqrt))
add("e", 1, make_arithmetic(arit_e))
add("epsilon", 1, make_arithmetic(arit_epsilon))
add("atan2", 3, make_arithmetic(arit_atan2))
add("\\", 2, make_arithmetic(arit_not))
add("/\\", 3, make_arithmetic(arit_and))
add("\\/", 3, make_arithmetic(arit_or))
add("xor", 3, make_arithmetic(arit_xor))
add(">>", 3, make_arithmetic(arit_shiftright))
add("<<", 3, make_arithmetic(arit_shiftleft))
add("==", 2, make_check(test_equal))
add("\\==", 2, make_check(test_notequal))
add("@<", 2, make_check(test_less))
add("@>=", 2, make_check(test_greaterequal))
add("@>", 2, make_check(test_greater))
add("@=<", 2, make_check(test_lessequal))
add("compare", 3, make_check(test_compare))
add("atom_codes", 2, make_check(test_atom_codes))
add("char_code", 2, make_check(test_char_code))
add("atom_length", 2, make_check(test_atom_length))
add("atom_split", 3, make_check(test_atom_split))
add("atom_arg", 3, make_check(test_atom_arg))
add("atom_concat", 3, make_special(special_atom_concat))
add("sys_atom_match", 3, make_special(special_sys_atom_match))
add("sys_atom_part", 4, make_special(special_sys_atom_part))
add("sys_last_atom_match", 3, make_special(special_sys_last_atom_match))
add("sys_last_atom_part", 4, make_special(special_sys_last_atom_part))
import os
import time
import sys
import importlib
import asyncio
import stat
import urllib.request
import urllib.error
import email.utils
MAX_BUF = 4096
bootbase = ""
def set_bootbase(url):
global bootbase
bootbase = url
class Sink:
def __init__(self):
self.buf = ""
self.send = lambda fd, buf: None
self.last = -1
self.notify = lambda fd: None
self.release = lambda fd: None
self.data = NotImplemented
self.indent = 0
def test_current_output(args):
alpha = engine.text_output
return exec_unify(args[0], alpha)
def test_current_error(args):
alpha = engine.text_error
return exec_unify(args[0], alpha)
def test_set_output(args):
obj = deref(exec_build(args[0]))
check_sink(obj)
engine.text_output = obj
return True
def test_set_error(args):
obj = deref(exec_build(args[0]))
check_sink(obj)
engine.text_error = obj
return True
def check_sink(beta):
if not isinstance(beta, Sink):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["writer", beta]))
def test_put_code(args):
stream = deref(exec_build(args[0]))
check_sink(stream)
ch = deref(exec_build(args[1]))
check_integer(ch)
if ch < 0 or ch > 0x10FFFF:
raise make_error(Compound("domain_error", ["code_point", ch]))
put_code(stream, ch)
return True
def put_code(stream, ch):
stream.buf += chr(ch)
stream.last = ch
if len(stream.buf) >= MAX_BUF:
flush_buffer(stream)
def flush_buffer(stream):
if len(stream.buf) > 0:
stream.send(stream.data, stream.buf)
stream.buf = ""
def test_current_lastcode(args):
stream = deref(exec_build(args[0]))
check_sink(stream)
return exec_unify(args[1], stream.last)
def test_set_lastcode(args):
stream = deref(exec_build(args[0]))
check_sink(stream)
ch = deref(exec_build(args[1]))
check_integer(ch)
stream.last = ch
return True
def test_put_atom(args):
stream = deref(exec_build(args[0]))
check_sink(stream)
text = deref(exec_build(args[1]))
check_atom(text)
put_atom(stream, text)
return True
def put_atom(stream, text):
if len(text) > 0:
stream.buf += text
stream.last = last_code(text)
if len(stream.buf) >= MAX_BUF:
flush_buffer(stream)
def last_code(text):
return ord(text[len(text)-1])
MASK_SRC_SKIP = 0x00000001
MASK_SRC_AREAD = 0x00000002
class Source:
def __init__(self):
self.buf = ""
self.pos = 0
self.receive = lambda fd: ""
self.flags = 0
self.lineno = 0
self.release = lambda fd: None
self.data = NotImplemented
def illegal_state():
raise make_error(Compound("resource_error", ["illegal_state"]))
def test_current_input(args):
alpha = engine.text_input
return exec_unify(args[0], alpha)
def test_set_input(args):
obj = deref(exec_build(args[0]))
check_source(obj)
engine.text_input = obj
return True
def check_source(beta):
if not isinstance(beta, Source):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["reader", beta]))
def test_os_read_sync(args):
stream = deref(exec_build(args[0]))
stream.buf = stream.receive(stream.data)
stream.pos = 0
return True
def test_os_get_code(args):
stream = deref(exec_build(args[0]))
pos = stream.pos
buf = stream.buf
if pos < len(buf):
ch = ord(buf[pos])
pos += 1
if ch == 13 or (ch == 10 and (stream.flags & MASK_SRC_SKIP) == 0):
stream.lineno += 1
if ch == 13:
stream.flags |= MASK_SRC_SKIP
else:
stream.flags &= ~MASK_SRC_SKIP
stream.pos = pos
return exec_unify(args[1], ch)
else:
return False
def test_os_peek_code(args):
stream = deref(exec_build(args[0]))
pos = stream.pos
buf = stream.buf
if pos < len(buf):
ch = ord(buf[pos])
return exec_unify(args[1], ch)
else:
return False
def test_os_open_promise(args):
url = deref(exec_build(args[0]))
check_atom(url)
stream = Source()
if not exec_unify(args[1], stream):
return False
buf = ctx
if url.startswith("http:") or url.startswith("https:"):
prom = open_http_promise(buf, stream, url)
else:
prom = open_file_promise(buf, stream, url)
return exec_unify(args[2], lambda: prom)
async def open_http_promise(buf, stream, url):
try:
response = await asyncio.to_thread(urllib.request.urlopen, url)
except urllib.error.HTTPError as err:
register_signal(buf, map_http_result(err.code, url))
return
except urllib.error.URLError as err:
register_signal(buf, Compound("resource_error", ["url_exception"]))
return
stream.data = response
stream.receive = http_read_promise
stream.release = file_close_promise
stream.flags |= MASK_SRC_AREAD
async def open_file_promise(buf, stream, url):
try:
file = await asyncio.to_thread(open, url, encoding="utf8")
except OSError as err:
register_signal(buf, map_file_error(err, url))
return
stream.data = file
stream.receive = file_read_promise
stream.release = file_close_promise
stream.flags |= MASK_SRC_AREAD
def map_file_error(err, url):
errno = err.errno
if errno == 2:
return Compound("existence_error", ["source_sink", url])
else:
return Compound("resource_error", ["io_exception"])
def test_os_stream_flags(args):
obj = deref(exec_build(args[0]))
if isinstance(obj, Source):
flags = obj.flags
else:
check_sink(obj)
flags = 0
return exec_unify(args[1], flags)
def test_os_read_promise(args):
stream = deref(exec_build(args[0]))
buf = ctx
return exec_unify(args[1], lambda: stream.receive(buf, stream))
async def http_read_promise(buf, stream):
try:
res = await asyncio.to_thread(blocking_chunk, stream.data)
stream.buf = res
stream.pos = 0
except IOError as err:
register_signal(buf, map_stream_error(err))
def blocking_chunk(data):
return data.read().decode('utf-8')
async def file_read_promise(buf, stream):
try:
res = await asyncio.to_thread(blocking_read, stream.data)
stream.buf = res
stream.pos = 0
except IOError as err:
register_signal(buf, map_stream_error(err))
def blocking_read(data):
return data.read()
def map_stream_error(err):
return Compound("resource_error", ["io_error"])
def test_os_close_promise(args):
stream = deref(exec_build(args[0]))
buf = ctx
return exec_unify(args[1], lambda: stream.release(buf, stream))
async def file_close_promise(buf, stream):
try:
await asyncio.to_thread(blocking_close, stream.data)
except IOError as err:
register_signal(buf, map_stream_error(err))
def blocking_close(data):
return data.close()
def test_os_open_sync(args):
url = deref(exec_build(args[0]))
check_atom(url)
mode = deref(exec_build(args[1]))
check_atom(mode)
if "read" == mode:
raise make_error(Compound("resource_error",
["not_implemented"]))
elif "write" == mode:
stream = open_write(url, "w")
elif "append" == mode:
stream = open_write(url, "a")
else:
raise make_error(Compound("domain_error",
["io_mode", mode]))
return exec_unify(args[2], stream)
def open_write(url, mode):
try:
file = open(url, mode, encoding="utf8", newline='')
except OSError as err:
raise make_error(map_file_error(err, url))
dst = Sink()
dst.data = file
dst.send = file_write
dst.release = file_close
return dst
def file_write(data, buf):
try:
data.write(buf)
except IOError as err:
raise make_error(map_stream_error(err))
def file_close(data):
try:
data.close()
except IOError as err:
raise make_error(map_stream_error(err))
def test_flush_output(args):
stream = deref(exec_build(args[0]))
check_sink(stream)
stream_flush(stream)
return True
def stream_flush(stream):
flush_buffer(stream)
stream.notify(stream.data)
def test_os_close_sync(args):
stream = deref(exec_build(args[0]))
if isinstance(stream, Sink):
pass
else:
check_source(stream)
stream_close(stream)
return True
def stream_close(stream):
if isinstance(stream, Sink):
flush_buffer(stream)
stream.release(stream.data)
else:
stream.release(stream.data)
def test_os_prop_promise(args):
url = deref(exec_build(args[0]))
check_atom(url)
res = {}
if not exec_unify(args[1], res):
return False
buf = ctx
if url.startswith("http:") or url.startswith("https:"):
prom = prop_http_promise(buf, url, res)
else:
prom = prop_file_promise(buf, url, res)
return exec_unify(args[2], lambda: prom)
async def prop_http_promise(buf, url, res):
request = urllib.request.Request(url, method="HEAD")
try:
response = await asyncio.to_thread(urllib.request.urlopen, request)
await asyncio.to_thread(response.close)
except urllib.error.HTTPError as err:
register_signal(buf, map_http_result(err.code, url))
return
except urllib.error.URLError as err:
register_signal(buf, Compound("resource_error", ["url_exception"]))
return
val = response.headers.get("last-modified")
rpath = response.url
mtime = int(email.utils.mktime_tz(email.utils.parsedate_tz(val))*1000) \
if val is not None else -1
ftype = "regular"
res["last_modified"] = mtime
res["real_path"] = rpath
res["type"] = ftype
def map_http_result(res, url):
if res == 403: # Forbidden
return Compound("permission_error",
["open", "source_sink", url])
elif res == 404: # Not Found
return Compound("existence_error",
["source_sink", url])
elif res == 405: # Method Not Allowed
return Compound("resource_error",
["illegal_method"])
else:
return Compound("resource_error",
["io_exception"])
async def prop_file_promise(buf, url, res):
try:
rpath = await asyncio.to_thread(os.path.realpath, url)
stats = await asyncio.to_thread(os.lstat, rpath)
ftype = "regular" if stat.S_ISREG(stats.st_mode) else \
("directory" if stat.S_ISDIR(stats.st_mode) else "other")
except OSError as err:
register_signal(buf, map_file_error(err, url))
return
mtime = (stats.st_mtime_ns + 500000) // 1000000
res["last_modified"] = mtime
res["real_path"] = rpath
res["type"] = ftype
def test_set_file_property(args):
url = deref(exec_build(args[0]))
check_atom(url)
prop = deref(exec_build(args[1]))
if (is_compound(prop) and
prop.functor == "last_modified"
and len(prop.args) == 1):
val2 = deref(prop.args[0])
check_integer(val2)
if val2 < 0:
raise make_error(Compound("domain_error",
["not_less_than_zero", val2]))
try:
val = (os.lstat(url).st_mtime_ns + 500000) // 1000000
os.utime(url, (val/1000, val2/1000), follow_symlinks=False)
except OSError as err:
raise make_error(map_file_error(err, url))
else:
check_nonvar(prop)
prop = copy_term(prop)
raise make_error(Compound("domain_error", ["prolog_property", prop]))
return True
def test_ir_place_new(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
alpha = Place(alpha)
return exec_unify(args[1], Quote(alpha))
def test_ir_skeleton_new(args):
alpha = deref(exec_build(args[0]))
beta = deref(exec_build(args[1]))
beta = list_objects(beta)
unquote_objects(beta)
alpha = Skeleton(alpha, beta)
return exec_unify(args[2], Quote(alpha))
def test_ir_is_site(args):
cache = deref(exec_build(args[0]))
return is_cache(cache)
def test_ir_pred_site(args):
name = deref(exec_build(args[0]))
check_atom(name)
return exec_unify(args[1], Cache(name))
def test_ir_site_name(args):
cache = deref(exec_build(args[0]))
check_cache(cache)
return exec_unify(args[1], cache.name)
def check_cache(beta):
if not is_cache(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error",
["cache", beta]))
def test_ir_clause_new(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
beta = deref(exec_build(args[1]))
beta = list_objects(beta)
gamma = deref(exec_build(args[2]))
gamma = list_objects(gamma)
delta = deref(exec_build(args[3]))
check_integer(delta)
mue = deref(exec_build(args[4]))
if is_compound(mue) and mue.functor == "just" and len(mue.args) == 1:
mue = deref(mue.args[0])
else:
mue = NotImplemented
unquote_objects(beta)
unquote_objects(gamma)
return unify(args[5], Clause(alpha, beta, gamma, delta, mue))
def test_ir_clause_add(args):
functor = deref(exec_build(args[0]))
check_atom(functor)
arity = deref(exec_build(args[1]))
check_integer(arity)
gamma = deref(exec_build(args[2]))
flags = deref(exec_build(args[3]))
check_integer(flags)
add_clause(functor, arity, gamma, flags)
return True
def test_ir_goal_new(args):
alpha = deref(exec_build(args[0]))
check_integer(alpha)
beta = deref(exec_build(args[1]))
beta = list_objects(beta)
unquote_objects(beta)
return exec_unify(args[2], Goal(alpha, beta))
def special_ir_goal_run(args):
goal = deref(args[0])
check_goal(goal)
snap = snap_setup()
cont(melt_directive(goal))
return solve_run(snap, True, None)
def solve_run(snap, found, choice):
try:
found = solve(snap, found)
except Exception as err:
snap_cleanup(snap)
raise err from None
if found is False:
raise make_error(Compound("syntax_error", ["directive_failed"]))
if found is not True:
if redo is not snap:
if choice is None:
choice = Choice(solve_run, snap, False, trail)
else:
choice.mark = trail
choice.cont = call
choice.tail = redo
more(choice)
else:
cut(snap.tail)
return found
snap_cleanup(snap)
cont(call.args[1])
return True
MASK_FIND_MODIFY = 0x00000001
MASK_FIND_DYNAMIC = 0x00000002
MASK_FIND_REVERSE = 0x00000004
def special_kb_clause_ref(args):
head = deref(args[0])
flags = deref(args[1])
check_integer(flags)
peek = lookup_pred(head)
if peek is NotImplemented:
return False
if (flags & MASK_FIND_DYNAMIC) != 0:
if (peek.flags & MASK_PRED_DYNAMIC) == 0:
make_error_find(head, flags)
if not is_logical(peek.rope):
return False
if is_compound(head):
head = head.args
else:
head = VOID_ARGS
peek = defined_clauses(peek, head)
peek = snapshot_data(peek)
if (flags & MASK_FIND_REVERSE) == 0:
return solve2_ref(args, peek, 0, None)
else:
return solve2_ref_reverse(args, peek, len(peek), None)
def make_error_find(head, flags):
if (flags & MASK_FIND_MODIFY) != 0:
raise make_error(Compound("permission_error",
["modify", "static_procedure", make_indicator_term(head)]))
else:
raise make_error(Compound("permission_error",
["access", "private_procedure", make_indicator_term(head)]))
def solve_ref(rope, at, choice):
goal = deref(call.args[0])
return solve2_ref(goal.args, rope, at, choice)
def solve_ref_reverse(rope, at, choice):
goal = deref(call.args[0])
return solve2_ref_reverse(goal.args, rope, at, choice)
def solve2_ref(args, rope, at, choice):
mark = trail
while at < len(rope):
clause = rope[at]
at += 1
if unify(args[2], clause):
if at < len(rope):
if choice is None:
choice = Choice(solve_ref, rope, at, mark)
else:
choice.at = at
more(choice)
cont(call.args[1])
return True
unbind(mark)
return False
def solve2_ref_reverse(args, rope, at, choice):
mark = trail
while at > 0:
at -= 1
clause = rope[at]
if unify(args[2], clause):
if at > 0:
if choice is None:
choice = Choice(solve_ref_reverse, rope, at, mark)
else:
choice.at = at
more(choice)
cont(call.args[1])
return True
unbind(mark)
return False
def test_kb_pred_touch(args):
functor = deref(exec_build(args[0]))
check_atom(functor)
arity = deref(exec_build(args[1]))
check_integer(arity)
flags = deref(exec_build(args[2]))
check_integer(flags)
pred_touch(functor, arity, flags)
return True
def test_kb_clause_remove(args):
functor = deref(exec_build(args[0]))
check_atom(functor)
arity = deref(exec_build(args[1]))
check_integer(arity)
flags = deref(exec_build(args[2]))
check_integer(flags)
clause = deref(exec_build(args[3]))
check_clause(clause)
return remove_clause(functor, arity, clause, flags)
def check_clause(beta):
if not isinstance(beta, Clause):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["clause", beta]))
def test_kb_pred_destroy(args):
functor = deref(exec_build(args[0]))
check_atom(functor)
arity = deref(exec_build(args[1]))
check_integer(arity)
pred_destroy(functor, arity)
return True
def test_kb_make_defined(args):
alpha = deref(exec_build(args[0]))
alpha = list_objects(alpha)
return exec_unify(args[1], make_defined(alpha))
def test_kb_is_link(args):
peek = deref(exec_build(args[0]))
return is_provable(peek)
def test_kb_pred_link(args):
functor = deref(exec_build(args[0]))
check_atom(functor)
arity = deref(exec_build(args[1]))
check_integer(arity)
peek = pred_link(functor, arity)
if peek is NotImplemented:
return False
return exec_unify(args[2], peek)
def test_kb_link_flags(args):
peek = deref(exec_build(args[0]))
check_provable(peek)
return exec_unify(args[1], peek.flags)
def check_provable(beta):
if not is_provable(beta):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error",
["provable", beta]))
def test_kb_pred_list(args):
res = kb_pred_list()
return exec_unify(args[0], res)
def kb_pred_list():
back = None
res = None
for functor in kb:
temp = kb[functor]
i = 0
while i < len(temp):
peek = temp[i]
if peek is NotImplemented or peek.remover is not NotImplemented:
i += 1
continue
peek = Compound(".", [make_indicator(functor, i), NotImplemented])
if back is None:
res = peek
else:
back.args[1] = peek
back = peek
i += 1
if back is None:
res = "[]"
else:
back.args[1] = "[]"
return res
def test_kb_clause_creator(args):
clause = deref(exec_build(args[0]))
check_clause(clause)
return exec_unify(args[1], clause.creator)
def test_kb_clause_shard(args):
clause = deref(exec_build(args[0]))
check_clause(clause)
return exec_unify(args[1], clause.shard)
def special_kb_clause_head(args):
clause = deref(args[0])
check_clause(clause)
head = deref(args[1])
if clause.size != 0:
display = [NotImplemented] * clause.size
else:
display = None
if (is_compound(head) and
not exec_head(clause.head, display, head.args)):
return False
cont(call.args[1])
return True
def special_kb_clause_data(args):
clause = deref(args[0])
check_clause(clause)
head = deref(args[1])
if clause.size != 0:
display = [NotImplemented] * clause.size
else:
display = None
if (is_compound(head) and
not exec_head(clause.head, display, head.args)):
return False
peek = clause.cutvar
if peek != -1:
temp = Variable()
display[peek] = temp
temp = Compound("just", [temp])
else:
temp = "nothing"
if not unify(args[2], temp):
return False
temp = exec_body(clause.body, display)
if not unify(args[3], temp):
return False
cont(call.args[1])
return True
def test_dg_date_now(args):
return exec_unify(args[0], int(round(time.time()*1000)))
def test_dg_real_time(args):
return exec_unify(args[0], real_time())
def test_dg_gc_time(args):
return exec_unify(args[0], gc_time)
def test_dg_call_count(args):
return exec_unify(args[0], gc_enter)
def test_dg_gc_flags(args):
return exec_unify(args[0], gc_flags)
def test_dg_var_serno(args):
obj = deref(exec_build(args[0]))
check_var(obj)
return exec_unify(args[1], obj.flags & ~VAR_MASK_STATE)
def test_dg_clear_stage(args):
clear()
return True
def test_dg_get_stage(args):
return exec_unify(args[0], stage)
def test_dg_set_stage(args):
value = deref(exec_build(args[0]))
check_integer(value)
set_stage(value)
return True
def test_dg_get_partition(args):
return exec_unify(args[0], engine.partition)
def test_dg_set_partition(args):
value = deref(exec_build(args[0]))
check_atom(value)
set_partition(value)
return True
def test_os_stream_list(args):
stream = deref(exec_build(args[0]))
stream = os_stream_list(stream)
return exec_unify(args[1], stream)
def os_stream_list(stream):
if isinstance(stream, Sink):
res = "[]"
else:
check_source(stream)
res = "[]"
value = Compound("line_no", [stream.lineno])
res = Compound(".", [value, res])
return res
def test_os_get_workdir(args):
url = os.getcwd()+os.path.sep
return exec_unify(args[0], url)
def test_os_set_workdir(args):
url = deref(exec_build(args[0]))
check_atom(url)
try:
os.chdir(url)
except OSError as err:
raise make_error(map_file_error(err, url))
return True
def test_os_get_libpath(args):
return exec_unify(args[0], bootbase)
def test_os_get_natext(args):
return exec_unify(args[0], ".py")
def test_os_call_later(args):
goal = deref(exec_build(args[0]))
check_goal(goal)
delay = deref(exec_build(args[1]))
check_integer(delay)
buf = ctx
loop = asyncio.get_running_loop()
return exec_unify(args[2], loop.call_later(delay/1000.0, lambda: launch(goal, buf, VOID_ARGS)))
def check_goal(beta):
if not isinstance(beta, Goal):
check_nonvar(beta)
beta = copy_term(beta)
raise make_error(Compound("type_error", ["goal", beta]))
def test_os_call_cancel(args):
res = deref(exec_build(args[0]))
res.cancel()
return True
def test_os_task_current(args):
return exec_unify(args[0], ctx)
def test_os_task_abort(args):
buf = deref(exec_build(args[0]))
msg = exec_build(args[1])
msg = copy_term(msg)
register_signal(buf, msg)
invoke_interrupt(buf)
return True
def test_os_task_create(args):
goal = deref(exec_build(args[0]))
check_goal(goal)
buf = Context()
buf.engine.text_output = engine.text_output
buf.engine.text_error = engine.text_error
buf.engine.text_input = engine.text_input
loop = asyncio.get_running_loop()
loop.create_task(launch_async(goal, buf, VOID_ARGS))
return exec_unify(args[1], buf)
def test_os_host_info(args):
st = sys.version_info
res = [NotImplemented] * 3
i = 0
while i < len(res):
res[i] = st[i]
i += 1
value = Compound("python", res)
return exec_unify(args[0], value)
add("current_output", 1, make_check(test_current_output))
add("current_error", 1, make_check(test_current_error))
add("set_output", 1, make_check(test_set_output))
add("set_error", 1, make_check(test_set_error))
add("put_code", 2, make_check(test_put_code))
add("current_lastcode", 2, make_check(test_current_lastcode))
add("set_lastcode", 2, make_check(test_set_lastcode))
add("put_atom", 2, make_check(test_put_atom))
add("current_input", 1, make_check(test_current_input))
add("set_input", 1, make_check(test_set_input))
add("os_read_sync", 1, make_check(test_os_read_sync))
add("os_get_code", 2, make_check(test_os_get_code))
add("os_peek_code", 2, make_check(test_os_peek_code))
add("os_open_promise", 3, make_check(test_os_open_promise))
add("os_stream_flags", 2, make_check(test_os_stream_flags))
add("os_read_promise", 2, make_check(test_os_read_promise))
add("os_close_promise", 2, make_check(test_os_close_promise))
add("os_open_sync", 3, make_check(test_os_open_sync))
add("flush_output", 1, make_check(test_flush_output))
add("os_close_sync", 1, make_check(test_os_close_sync))
add("os_prop_promise", 3, make_check(test_os_prop_promise))
add("set_file_property", 2, make_check(test_set_file_property))
add("ir_place_new", 2, make_check(test_ir_place_new))
add("ir_skeleton_new", 3, make_check(test_ir_skeleton_new))
add("ir_is_site", 1, make_check(test_ir_is_site))
add("ir_pred_site", 2, make_check(test_ir_pred_site))
add("ir_site_name", 2, make_check(test_ir_site_name))
add("ir_clause_new", 6, make_check(test_ir_clause_new))
add("ir_clause_add", 4, make_check(test_ir_clause_add))
add("ir_goal_new", 3, make_check(test_ir_goal_new))
add("ir_goal_run", 1, make_special(special_ir_goal_run))
add("kb_clause_ref", 3, make_special(special_kb_clause_ref))
add("kb_pred_touch", 3, make_check(test_kb_pred_touch))
add("kb_clause_remove", 4, make_check(test_kb_clause_remove))
add("kb_pred_destroy", 2, make_check(test_kb_pred_destroy))
add("kb_make_defined", 2, make_check(test_kb_make_defined))
add("kb_is_link", 1, make_check(test_kb_is_link))
add("kb_pred_link", 3, make_check(test_kb_pred_link))
add("kb_link_flags", 2, make_check(test_kb_link_flags))
add("kb_pred_list", 1, make_check(test_kb_pred_list))
add("kb_clause_creator", 2, make_check(test_kb_clause_creator))
add("kb_clause_shard", 2, make_check(test_kb_clause_shard))
add("kb_clause_head", 2, make_special(special_kb_clause_head))
add("kb_clause_data", 4, make_special(special_kb_clause_data))
add("dg_date_now", 1, make_check(test_dg_date_now))
add("dg_real_time", 1, make_check(test_dg_real_time))
add("dg_gc_time", 1, make_check(test_dg_gc_time))
add("dg_call_count", 1, make_check(test_dg_call_count))
add("dg_gc_flags", 1, make_check(test_dg_gc_flags))
add("dg_var_serno", 2, make_check(test_dg_var_serno))
add("dg_clear_stage", 0, make_check(test_dg_clear_stage))
add("dg_get_stage", 1, make_check(test_dg_get_stage))
add("dg_set_stage", 1, make_check(test_dg_set_stage))
add("dg_get_partition", 1, make_check(test_dg_get_partition))
add("dg_set_partition", 1, make_check(test_dg_set_partition))
add("os_stream_list", 2, make_check(test_os_stream_list))
add("os_get_workdir", 1, make_check(test_os_get_workdir))
add("os_set_workdir", 1, make_check(test_os_set_workdir))
add("os_get_libpath", 1, make_check(test_os_get_libpath))
add("os_get_natext", 1, make_check(test_os_get_natext))
add("os_call_later", 3, make_check(test_os_call_later))
add("os_call_cancel", 1, make_check(test_os_call_cancel))
add("os_task_current", 1, make_check(test_os_task_current))
add("os_task_abort", 2, make_check(test_os_task_abort))
add("os_task_create", 2, make_check(test_os_task_create))
add("os_host_info", 1, make_check(test_os_host_info))
add("sys_trans_horn", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_trans_horn", 2, Clause(3, [Skeleton(":-", [Place(-3)]), Skeleton("tr_goal", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(-3), Place(-2), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(1), Place(2), Place(0)])], 0, ":-"))
add("sys_trans_horn", 2, Clause(5, [Skeleton(":-", [Place(-3), Place(-4)]), Skeleton("tr_clause", [Place(-5), Place(1), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_callable"), [Place(1)]), Skeleton(Cache("sys_trans_body"), [Place(2), "nothing", Place(3), Place(4), "[]"])], 0, ":-"))
add("sys_trans_horn", 2, Clause(1, [Place(-2), Skeleton("tr_clause", ["nothing", Place(0), "[]"])], [Skeleton(Cache("sys_check_callable"), [Place(0)])], -1, NotImplemented))
add("sys_trans_body", 5, Clause(4, [Place(-3), Place(-4), Place(2), Place(-4), Place(-5)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [Skeleton("call", [Place(1)]), Place(3)])])], 0, NotImplemented))
add("sys_trans_body", 5, Clause(3, ["true", Place(-3), Place(1), Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "true"))
add("sys_trans_body", 5, Clause(7, [Skeleton(",", [Place(-3), Place(-4)]), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(3), Place(-5), Place(5), Place(-7)]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(3), Place(4), Place(5), Place(6)])], 0, ","))
add("sys_trans_body", 5, Clause(7, [Skeleton(";", [Place(-3), Place(-4)]), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_trans_disj"), [Skeleton(";", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(-6)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("="), [Place(5), Skeleton(".", [Skeleton("$ALT", [Place(4)]), Place(6)])])], 0, ";"))
add("sys_trans_body", 5, Clause(7, [Skeleton("->", [Place(-3), Place(-4)]), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_trans_disj"), [Skeleton("->", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(-6)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("="), [Place(5), Skeleton(".", [Skeleton("$ALT", [Place(4)]), Place(6)])])], 0, "->"))
add("sys_trans_body", 5, Clause(5, ["!", Place(-3), Skeleton("just", [Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_trans_cut"), [Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Skeleton("$CUT", [Place(2)]), Place(4)])])], 0, "!"))
add("sys_trans_body", 5, Clause(3, [Place(-2), Place(-3), Place(1), Place(-3), Place(-4)], [Skeleton(Cache("sys_check_callable"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(0), Place(2)])])], -1, NotImplemented))
add("sys_trans_cut", 2, Clause(1, ["nothing", Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "nothing"))
add("sys_trans_cut", 2, Clause(1, [Skeleton("just", [Place(-2)]), Place(0)], [], -1, "just"))
add("sys_trans_disj", 5, Clause(5, [Place(-3), Place(-1), Place(-4), Place(-5), Skeleton(".", [Place(-6), "[]"])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alternative"), [Place(1), Place(2), Place(3), Place(4), Place(-1)])], 0, NotImplemented))
add("sys_trans_disj", 5, Clause(7, [Skeleton(";", [Place(-3), Place(-4)]), Place(-1), Place(-5), Place(-6), Skeleton(".", [Place(-7), Place(-8)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alternative"), [Place(1), Place(3), Place(-5), Place(5), Place(-7)]), Skeleton(Cache("sys_trans_disj"), [Place(2), Place(5), Place(3), Place(4), Place(6)])], 0, ";"))
add("sys_trans_disj", 5, Clause(2, ["fail", 1, Place(-3), Place(1), "[]"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "fail"))
add("sys_trans_disj", 5, Clause(4, [Place(-2), Place(-1), Place(-3), Place(-4), Skeleton(".", [Place(-5), "[]"])], [Skeleton(Cache("sys_trans_alternative"), [Place(0), Place(1), Place(2), Place(3), Place(-1)])], -1, NotImplemented))
add("sys_trans_alternative", 5, Clause(5, [Place(-3), Place(-4), Place(-5), Skeleton("$SEQ", ["nothing", Place(-6)]), 0], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(2), Place(3), Place(4), "[]"])], 0, NotImplemented))
add("sys_trans_alternative", 5, Clause(7, [Skeleton("->", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton("$SEQ", [Skeleton("just", [Place(-7)]), Place(-8)]), 1], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(-3), Place(-2), Skeleton(".", [Skeleton("$CUT", [Place(5)]), Place(-7)])]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(3), Place(4), Place(5), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(1), Place(6), Place(0)])], 0, "->"))
add("sys_trans_alternative", 5, Clause(4, [Place(-2), Place(-3), Place(-4), Skeleton("$SEQ", ["nothing", Place(-5)]), 0], [Skeleton(Cache("sys_trans_body"), [Place(0), Place(1), Place(2), Place(3), "[]"])], -1, NotImplemented))
add("sys_trans_mark", 3, Clause(2, [Skeleton("just", [Place(-3)]), Skeleton(".", [Skeleton("$MARK", [Place(1)]), Place(-3)]), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "just"))
add("sys_trans_mark", 3, Clause(1, ["nothing", Place(-2), Place(0)], [], -1, "nothing"))
add("sys_encode_horn", 3, Clause(4, [Skeleton("tr_goal", [Place(-3)]), Skeleton("ir_goal", [Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_ast_body"), [Place(1), Place(2), "[]", Place(3), "[]", Place(-1)])], 0, "tr_goal"))
add("sys_encode_horn", 3, Clause(8, [Skeleton("tr_clause", [Skeleton("just", [Place(-3)]), Place(-4), Place(-5)]), Skeleton("ir_clause", [Place(-6), Place(-7), 0, Place(-8)]), Place(-9)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(-1), Place(-2)])]), Skeleton(Cache("sys_ast_list"), [Place(0), Place(4), Skeleton(".", [Skeleton("v", [Place(1), 0, Place(-1)]), "[]"]), Place(-6)]), Skeleton(Cache("sys_ast_body"), [Place(3), Place(5), Skeleton(".", [Skeleton("-", [Place(2), Place(1)]), "[]"]), Place(7), Place(4), Place(-1)]), Skeleton(Cache("sys_idx_value"), [Place(3), Place(2), Place(7), Place(6)])], 0, "tr_clause"))
add("sys_encode_horn", 3, Clause(7, [Skeleton("tr_clause", ["nothing", Place(-2), Place(-3)]), Skeleton("ir_clause", [Place(-4), Place(-5), -1, Place(-6)]), Place(-7)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-1), Place(-8)])]), Skeleton(Cache("sys_ast_list"), [Place(6), Place(2), "[]", Place(-4)]), Skeleton(Cache("sys_ast_body"), [Place(1), Place(3), Skeleton(".", [Place(0), "[]"]), Place(5), Place(2), Place(-1)]), Skeleton(Cache("sys_idx_value"), [Place(1), Place(0), Place(5), Place(4)])], -1, "tr_clause"))
add("sys_encode_alternatives", 4, Clause(8, [Skeleton(".", [Skeleton("$SEQ", [Place(-3), Place(-4)]), Place(-5)]), Place(-6), Skeleton(".", [Place(-7), Place(-8)]), Place(-9)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_horn"), [Skeleton("tr_clause", [Place(1), Place(4), Place(2)]), Place(5), Place(7)]), Skeleton(Cache("sys_encode_alternatives"), [Place(3), Place(4), Place(6), Place(7)])], 0, "."))
add("sys_encode_alternatives", 4, Clause(0, ["[]", Place(-1), "[]", Place(-1)], [], -1, "[]"))
add("sys_ast_body", 6, Clause(8, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)]), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("sys_ast_goal"), [Place(0), Place(5), Place(2), Place(1), Place(4), Place(6), Place(-8)]), Skeleton(Cache("sys_ast_body"), [Place(1), Place(3), Skeleton(".", [Place(0), Place(4)]), Place(5), Place(6), Place(7)])], -1, "."))
add("sys_ast_body", 6, Clause(2, ["[]", "[]", Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
add("sys_ast_goal", 7, Clause(5, [Skeleton("call", [Place(-3)]), 1, Place(-4), Place(-1), Place(-1), Place(-5), Place(-6)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_term"), [Place(1), Place(2), Place(3), Place(4)])], 0, "call"))
add("sys_ast_goal", 7, Clause(7, [Skeleton("$ALT", [Place(-3)]), 1, Place(-4), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("term_variables"), [Skeleton("-", [Place(3), Place(4)]), Place(-6)]), Skeleton(Cache("term_variables"), [Place(1), Place(-5)]), Skeleton(Cache("eq_intersection"), [Place(3), Place(4), Place(-6)]), Skeleton(Cache("=.."), [Place(-5), Skeleton(".", ["", Place(4)])]), Skeleton(Cache("sys_encode_alternatives"), [Place(1), Place(3), Place(-3), 1]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_ast_invoke"), [Place(3), Place(2), Skeleton("link", [Place(1)]), Place(5), Place(6)])], 0, "$ALT"))
add("sys_ast_goal", 7, Clause(6, [Skeleton("is", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_term"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", ["$EVAL"]), Skeleton(".", [Place(2), Skeleton(".", [Place(1), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, "is"))
add("sys_ast_goal", 7, Clause(6, [Skeleton("=:=", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", ["=:="]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, "=:="))
add("sys_ast_goal", 7, Clause(6, [Skeleton("=\\=", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", ["=\\="]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, "=\\="))
add("sys_ast_goal", 7, Clause(6, [Skeleton("<", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", ["<"]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, "<"))
add("sys_ast_goal", 7, Clause(6, [Skeleton(">", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", [">"]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, ">"))
add("sys_ast_goal", 7, Clause(6, [Skeleton("=<", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", ["=<"]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, "=<"))
add("sys_ast_goal", 7, Clause(6, [Skeleton(">=", [Place(-3), Place(-4)]), 1, Place(-5), Place(-1), Place(-1), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_expr"), [Place(2), Place(-4), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Compound("site", [">="]), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, ">="))
add("sys_ast_goal", 7, Clause(6, [Place(-3), 1, Place(-4), Place(-1), Place(-1), Place(-5), Place(-6)], [Skeleton(Cache("functor"), [Place(1), Place(-7), Place(-1)]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_invoke"), [Place(1), Place(2), Skeleton("site", [Place(5)]), Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_goal", 7, Clause(4, [Place(-2), Place(-1), Place(-3), Place(-1), Place(-1), Place(-4), Place(-5)], [Skeleton(Cache("sys_ast_term"), [Place(0), Place(1), Place(2), Place(3)])], -1, NotImplemented))
add("sys_ast_invoke", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("functor"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_list"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Place(3), Place(1), Place(2)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, NotImplemented))
add("sys_ast_invoke", 5, Clause(2, [Place(-1), Skeleton("const", [Place(-2)]), Place(0), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_ast_args", 4, Clause(6, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("sys_ast_expr"), [Place(0), Place(2), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_args"), [Place(1), Place(3), Place(4), Place(5)])], -1, "."))
add("sys_ast_args", 4, Clause(2, ["[]", "[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
add("sys_ast_expr", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_var"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_expr", 4, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("functor"), [Place(1), Place(-7), Place(-1)]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_compute"), [Place(1), Place(2), Skeleton("site", [Place(5)]), Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_expr", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("functor"), [Place(1), Place(-2), Place(-1)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_args"), [Place(1), Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_const_functor"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_expr", 4, Clause(2, [Place(-2), Skeleton("const", [Place(0)]), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_ast_compute", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("functor"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_ast_args"), [Place(1), Place(-3), Place(4), Place(-6)]), Skeleton(Cache("sys_const_functor"), [Place(3), Place(1), Place(2)]), Skeleton(Cache("="), [Place(4), Place(5)])], 0, NotImplemented))
add("sys_ast_compute", 5, Clause(2, [Place(-1), Skeleton("const", [Place(-2)]), Place(0), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_ast_list", 4, Clause(6, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("sys_ast_term"), [Place(0), Place(2), Place(4), Place(-6)]), Skeleton(Cache("sys_ast_list"), [Place(1), Place(3), Place(4), Place(5)])], -1, "."))
add("sys_ast_list", 4, Clause(2, ["[]", "[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
add("sys_ast_term", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_var"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_term", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("functor"), [Place(1), Place(-2), Place(-1)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_ast_list"), [Place(1), Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_const_functor"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], 0, NotImplemented))
add("sys_ast_term", 4, Clause(2, [Place(-2), Skeleton("const", [Place(0)]), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_const_functor", 3, Clause(3, [Place(-3), Place(-4), Skeleton("const", [Skeleton("functor", [Place(1), Place(-3)])])], [Skeleton(Cache("sys_const_only"), [Place(2), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_const_functor", 3, Clause(2, [Place(-2), Place(-3), Skeleton("functor", [Place(0), Place(1)])], [], -1, NotImplemented))
add("sys_const_only", 2, Clause(2, [Skeleton(".", [Skeleton("const", [Place(-2)]), Place(-3)]), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("sys_const_only"), [Place(1), Place(0)])], -1, "."))
add("sys_const_only", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_ast_var", 4, Clause(9, [Place(-3), Skeleton("var", [Place(-4), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("sys_current_dcg"), [Place(-8), Place(4), Place(-6)]), Skeleton(Cache("select"), [Skeleton("v", [Place(-9), Place(2), Place(-10)]), Place(6), Place(-8)]), Skeleton(Cache("=="), [Place(7), Place(1)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("="), [Place(8), 0]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_set_dcg"), [Skeleton(".", [Skeleton("v", [Place(7), Place(2), Place(3)]), Place(6)]), Place(4), Place(5)])], 0, NotImplemented))
add("sys_ast_var", 4, Clause(6, [Place(-2), Skeleton("first_var", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_dcg"), [Place(-7), Place(3), Place(-5)]), Skeleton(Cache("sys_set_dcg"), [Skeleton(".", [Skeleton("v", [Place(0), Place(1), Place(2)]), Place(5)]), Place(3), Place(4)])], -1, NotImplemented))
add("sys_current_dcg", 3, Clause(1, [Place(-2), Place(0), Place(0)], [], -1, NotImplemented))
add("sys_set_dcg", 3, Clause(1, [Place(-2), Place(-1), Place(0)], [], -1, NotImplemented))
add("sys_idx_value", 4, Clause(4, [Place(-1), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("arg"), [1, Place(1), Place(-3)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_term"), [Place(1), Place(3)])], 0, NotImplemented))
add("sys_idx_value", 4, Clause(4, [Place(-3), Place(-4), Place(-1), Place(-5)], [Skeleton(Cache("arg"), [1, Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_arg"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_idx_value", 4, Clause(0, [Place(-1), Place(-1), Place(-1), "nothing"], [], -1, NotImplemented))
add("sys_idx_value_arg", 3, Clause(3, [Place(-1), Place(-3), Skeleton("just", [Place(-4)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(2), Place(-1)])], 0, NotImplemented))
add("sys_idx_value_arg", 3, Clause(6, [Skeleton(".", [Skeleton("=", [Place(-3), Place(-4)]), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("=="), [Place(4), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_arg"), [Place(3), Place(2), Place(5)])], 0, "."))
add("sys_idx_value_arg", 3, Clause(6, [Skeleton(".", [Skeleton("=", [Place(-3), Place(-4)]), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("=="), [Place(4), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_arg"), [Place(3), Place(1), Place(5)])], 0, "."))
add("sys_idx_value_arg", 3, Clause(4, [Skeleton(".", [Skeleton("=", [Place(-1), Place(-1)]), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_arg"), [Place(1), Place(2), Place(3)])], 0, "."))
add("sys_idx_value_arg", 3, Clause(0, [Place(-1), Place(-1), "nothing"], [], -1, NotImplemented))
add("sys_idx_value_term", 2, Clause(3, [Place(-3), Skeleton("just", [Place(-4)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(2), Place(-1)])], 0, NotImplemented))
add("sys_idx_value_term", 2, Clause(0, [Place(-1), "nothing"], [], -1, NotImplemented))
add("eq_contains", 2, Clause(3, [Skeleton(".", [Place(-3), Place(-1)]), Place(-4)], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("eq_contains", 2, Clause(2, [Skeleton(".", [Place(-1), Place(-2)]), Place(-3)], [Skeleton(Cache("eq_contains"), [Place(0), Place(1)])], -1, "."))
add("eq_intersection", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Skeleton(".", [Place(1), Place(-6)])], [Skeleton(Cache("eq_contains"), [Place(3), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("eq_intersection"), [Place(2), Place(3), Place(4)])], 0, "."))
add("eq_intersection", 3, Clause(4, [Skeleton(".", [Place(-1), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("eq_intersection"), [Place(1), Place(2), Place(3)])], 0, "."))
add("eq_intersection", 3, Clause(0, ["[]", Place(-1), "[]"], [], -1, "[]"))
add("sys_check_callable", 1, Clause(2, [Place(-3)], [Skeleton(Cache("callable"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_check_callable", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_check_callable", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["callable", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("open", 3, Clause(3, [Place(-3), "read", Place(-4)], [Compound(Cache("current_prolog_flag"), ["read_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_open_promise"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("$YIELD"), [Place(2)])], 0, NotImplemented))
add("open", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("os_open_sync"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("close", 1, Clause(3, [Place(-3)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(-4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_close_promise"), [Place(1), Place(-3)]), Skeleton(Cache("$YIELD"), [Place(1)])], 0, NotImplemented))
add("close", 1, Clause(1, [Place(-2)], [Skeleton(Cache("os_close_sync"), [Place(0)])], -1, NotImplemented))
add("stream_property", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("os_stream_list"), [Place(0), Place(-2)]), Skeleton(Cache("member"), [Place(1), Place(0)])], -1, NotImplemented))
add("term_variables", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("term_variables"), [Place(0), Place(1), "[]"])], -1, NotImplemented))
add("is", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Place(1), Place(0)])], -1, NotImplemented))
add("call", 1, Clause(1, [Place(-2)], [Place(0)], -1, NotImplemented))
add("true", 0, Clause(0, [], [], -1, NotImplemented))
add("!", 0, Clause(1, [], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add(",", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(-2), Place(-4), Place(-5)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(0), Place(-2), Place(3), "[]"]), Skeleton(Cache("$SEQ"), [Place(0), Place(2)])], -1, NotImplemented))
add(";", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trans_alternative"), [Place(0), "nothing", Place(-2), Place(-4), Place(-5)]), Skeleton(Cache("sys_trans_disj"), [Place(1), Place(3), Place(0), Place(-2), Place(-5)]), Skeleton(Cache("$SEQ"), [Place(0), Skeleton(".", [Skeleton("$ALT", [Skeleton(".", [Place(2), Place(3)])]), "[]"])])], -1, NotImplemented))
add("->", 2, Clause(5, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(-2), Place(-4), Skeleton(".", [Skeleton("$CUT", [Place(-5)]), Place(-6)])]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(-3), Place(4), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(0), Place(-2), Place(2)]), Skeleton(Cache("$SEQ"), [Place(1), Skeleton(".", [Skeleton("$ALT", [Skeleton(".", [Skeleton("$SEQ", [Skeleton("just", [Place(3)]), Place(0)]), "[]"])]), "[]"])])], -1, NotImplemented))
add("\\=", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("\\=", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
add("\\+", 1, Clause(2, [Place(-3)], [Place(1), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("\\+", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("once", 1, Clause(2, [Place(-3)], [Place(1), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("repeat", 0, Clause(0, [], [], -1, NotImplemented))
add("repeat", 0, Clause(0, [], [Cache("repeat")], -1, NotImplemented))
add("catch", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_trap"), [Place(0), Place(-2), Skeleton("sys_error_handler", [Place(0), Place(1), Place(2)])])], -1, NotImplemented))
add("sys_error_handler", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("sys_chain_head"), [Place(0), Skeleton("error", [Skeleton("system_error", [Place(-1)]), Place(-1)])]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_error_handler", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_chain_head"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Place(3)], 0, NotImplemented))
add("sys_error_handler", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_head", 2, Clause(3, [Skeleton("cause", [Place(-3), Place(-1)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "cause"))
add("sys_chain_head", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("throw", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_fill_stack", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_fill_stack", 1, Clause(2, [Skeleton("error", [Place(-1), Place(-3)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fetch_stack"), [Place(1)])], 0, "error"))
add("sys_fill_stack", 1, Clause(2, [Skeleton("warning", [Place(-1), Place(-3)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fetch_stack"), [Place(1)])], 0, "warning"))
add("sys_fill_stack", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("sys_fetch_stack", 1, Clause(4, [Place(-2)], [Skeleton(Cache("os_task_current"), [Place(-3)]), Skeleton(Cache("findall"), [Skeleton("sys_including", [Place(-4), Place(-5)]), Skeleton("sys_including", [Place(2), Place(1), Place(3)]), Place(0)])], -1, NotImplemented))
add("ignore", 1, Clause(2, [Place(-3)], [Place(1), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("ignore", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("chain", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trap"), [Place(0), Place(-2), Skeleton("sys_chain_error", [Place(0), Place(1)])]), Place(1)], -1, NotImplemented))
add("sys_chain_error", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trap"), [Place(1), Place(-3), Skeleton("sys_chain_raise", [Place(0), Place(1)])]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_error", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_raise", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_chain_concat"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("sys_raise"), [Place(1)])], -1, NotImplemented))
add("sys_chain_concat", 3, Clause(4, [Skeleton("cause", [Place(-3), Place(-4)]), Place(-5), Skeleton("cause", [Place(1), Place(-3)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_chain_concat"), [Place(2), Place(3), Place(1)])], 0, "cause"))
add("sys_chain_concat", 3, Clause(2, [Place(-2), Place(-3), Skeleton("cause", [Place(0), Place(1)])], [], -1, NotImplemented))
add("abort", 0, Clause(0, [], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("system_error", ["user_abort"]), Place(-1)])])], -1, NotImplemented))
add("once_cleanup", 2, Clause(3, [Place(-3), Place(-4)], [Compound(Cache("current_prolog_flag"), ["async_mode", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("shield"), [Skeleton("sys_once_cleanup", [Skeleton("unshield", [Place(1)]), Place(2)])])], 0, NotImplemented))
add("once_cleanup", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_once_cleanup"), [Place(0), Place(1)])], -1, NotImplemented))
add("setup_once_cleanup", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Compound(Cache("current_prolog_flag"), ["async_mode", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("shield"), [Skeleton("sys_setup_once_cleanup", [Place(1), Skeleton("unshield", [Place(2)]), Place(3)])])], 0, NotImplemented))
add("setup_once_cleanup", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_setup_once_cleanup"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_setup_once_cleanup", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Place(0), Skeleton(Cache("sys_once_cleanup"), [Place(1), Place(2)])], -1, NotImplemented))
add("sys_once_cleanup", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("chain"), [Place(1), Skeleton("ignore", [Place(2)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_once_cleanup", 2, Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("ignore"), [Place(0)]), Cache("fail")], -1, NotImplemented))
add("sys_print_error", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_error"), [Place(-3)]), Skeleton(Cache("sys_print_error"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_print_error", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), ["exception_unknown", Place(2)]), Skeleton(Cache("writeq"), [Place(2), Place(1)]), Skeleton(Cache("nl"), [Place(2)])], 0, NotImplemented))
add("sys_print_error", 2, Clause(4, [Skeleton("cause", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_error"), [Place(1), Place(3)]), Skeleton(Cache("sys_print_error"), [Place(2), Place(3)])], 0, "cause"))
add("sys_print_error", 2, Clause(4, [Skeleton("error", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), ["exception_error", Place(3)]), Skeleton(Cache("sys_print_message"), [Place(1), Place(3)]), Skeleton(Cache("nl"), [Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0, "error"))
add("sys_print_error", 2, Clause(4, [Skeleton("warning", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), ["exception_warning", Place(3)]), Skeleton(Cache("sys_print_message"), [Place(1), Place(3)]), Skeleton(Cache("nl"), [Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0, "warning"))
add("sys_print_error", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_print_message"), ["exception_unknown", Place(1)]), Skeleton(Cache("writeq"), [Place(1), Place(0)]), Skeleton(Cache("nl"), [Place(1)])], -1, NotImplemented))
add("sys_print_trace", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), ["exception_context", Place(2)]), Skeleton(Cache("writeq"), [Place(2), Place(1)]), Skeleton(Cache("nl"), [Place(2)])], 0, NotImplemented))
add("sys_print_trace", 2, Clause(4, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_frame"), [Place(1), Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0, "."))
add("sys_print_trace", 2, Clause(1, ["[]", Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_print_trace", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_print_message"), ["exception_context", Place(1)]), Skeleton(Cache("writeq"), [Place(1), Place(0)]), Skeleton(Cache("nl"), [Place(1)])], -1, NotImplemented))
add("sys_print_frame", 2, Clause(4, [Skeleton("sys_including", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("file_base_name"), [Place(1), Place(-3)]), Skeleton(Cache("stream_property"), [Place(2), Skeleton("line_no", [Place(-4)])]), Skeleton(Cache("sys_print_message"), [Skeleton("file_line", [Place(1), Place(2)]), Place(3)]), Skeleton(Cache("nl"), [Place(3)])], 0, "sys_including"))
add("sys_print_frame", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_print_message"), [Place(0), Place(1)]), Skeleton(Cache("nl"), [Place(1)])], -1, NotImplemented))
add("sys_print_message", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_error"), [Place(-3)]), Skeleton(Cache("sys_print_message"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_print_message", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_prolog_flag"), ["sys_locale", Place(-4)]), Skeleton(Cache("sys_print_message"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_print_message", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), ["exception_template", Place(2), Place(3)]), Skeleton(Cache("writeq"), [Place(2), Place(1)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-3), Place(-6)])]), Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("get_string"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_inter_polate"), [Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(7, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-3), Skeleton(".", [Place(-6), Place(-7)])])]), Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("atom"), [Place(4)]), Skeleton(Cache("atom_split"), [Place(-8), ".", Skeleton(".", [Place(1), Skeleton(".", [Place(4), "[]"])])]), Skeleton(Cache("get_string"), [Place(6), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_inter_polate"), [Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(8, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-3), Skeleton(".", [Place(-6), Skeleton(".", [Place(-7), Place(-8)])])])]), Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("atom"), [Place(4)]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("atom_split"), [Place(-9), ".", Skeleton(".", [Place(1), Skeleton(".", [Place(4), Skeleton(".", [Place(5), "[]"])])])]), Skeleton(Cache("get_string"), [Place(7), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_inter_polate"), [Place(2), Place(3), Place(6)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_print_message"), ["exception_template", Place(1), Place(2)]), Skeleton(Cache("writeq"), [Place(1), Place(0)])], -1, NotImplemented))
add("sys_inter_polate", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("atom_split"), [Place(1), "~", Skeleton(".", [Place(-3), Place(-5)])]), Skeleton(Cache("put_atom"), [Place(0), Place(1)]), Skeleton(Cache("sys_zipper_output"), [Place(2), Place(3), Place(0)])], -1, NotImplemented))
add("sys_zipper_output", 3, Clause(6, [Skeleton(".", [Place(-3), Place(-4)]), Skeleton(".", ["", Skeleton(".", [Place(-5), Place(-6)])]), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("write"), [Place(5), Place(1)]), Skeleton(Cache("put_atom"), [Place(5), Place(3)]), Skeleton(Cache("sys_zipper_output"), [Place(2), Place(4), Place(5)])], 0, "."))
add("sys_zipper_output", 3, Clause(5, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)]), Place(-6)], [Skeleton(Cache("writeq"), [Place(4), Place(0)]), Skeleton(Cache("put_atom"), [Place(4), Place(2)]), Skeleton(Cache("sys_zipper_output"), [Place(1), Place(3), Place(4)])], -1, "."))
add("sys_zipper_output", 3, Clause(0, ["[]", "[]", Place(-1)], [], -1, "[]"))
add("get_string", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_prolog_flag"), ["sys_locale", Place(-4)]), Skeleton(Cache("get_string"), [Place(0), Place(2), Place(1)])], -1, NotImplemented))
add("get_string", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_locale_ancestor"), [Place(2), Place(-4)]), Skeleton(Cache("strings"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, NotImplemented))
add("sys_locale_ancestor", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_locale_ancestor", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("last_sub_atom"), [Place(0), Place(-4), Place(-1), Place(-1), "_"]), Skeleton(Cache("sub_atom"), [Place(0), 0, Place(2), Place(-1), Place(1)])], -1, NotImplemented))
add("sys_locale_ancestor", 2, Clause(1, [Place(-2), ""], [Skeleton(Cache("\\=="), [Place(0), ""])], -1, NotImplemented))
add("sys_check_atom", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_check_atom", 1, Clause(2, [Place(-3)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_check_atom", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["atom", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_check_integer", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_check_integer", 1, Clause(2, [Place(-3)], [Skeleton(Cache("integer"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_check_integer", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["integer", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("call_later", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Skeleton("sys_call_print", [Place(0)])]), Place(-2)]), Skeleton(Cache("os_call_later"), [Place(0), Place(1), Place(-1)])], -1, NotImplemented))
add("sys_frost_horn", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(-2)]), Skeleton(Cache("sys_encode_horn"), [Place(0), Place(-2), 0]), Skeleton(Cache("sys_host_make"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_call_print", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_trap"), [Place(0), Place(-2), Skeleton("sys_print_error", [Place(0)])])], -1, NotImplemented))
add("create_task", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Skeleton("sys_call_print", [Place(0)])]), Place(-2)]), Skeleton(Cache("os_task_create"), [Place(0), Place(-1)])], -1, NotImplemented))
add("sleep", 1, Clause(1, [Place(-2)], [Skeleton(Cache("os_sleep_promise"), [Place(0), Place(-2)]), Skeleton(Cache("$YIELD"), [Place(0)])], -1, NotImplemented))
add("time_out", 2, Clause(3, [Place(-3), Place(-4)], [Compound(Cache("current_prolog_flag"), ["allow_yield", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_task_current"), [Place(-2)]), Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Skeleton("sys_timeout", [Place(0)])]), Place(-2)]), Skeleton(Cache("setup_once_cleanup"), [Skeleton("os_call_later", [Place(0), Place(2), Place(-4)]), Place(1), Skeleton("os_call_cancel", [Place(2)])])], 0, NotImplemented))
add("time_out", 2, Clause(0, [Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("system_error", ["illegal_yield"]), Place(-1)])])], -1, NotImplemented))
add("sys_timeout", 1, Clause(1, [Place(-2)], [Skeleton(Cache("os_task_abort"), [Place(0), Compound("system_error", ["timelimit_exceeded"])])], -1, NotImplemented))
add("member", 2, Clause(3, [Place(-2), Skeleton(".", [Place(-3), Place(-4)])], [Skeleton(Cache("sys_member"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
add("sys_member", 3, Clause(1, [Place(-1), Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_member", 3, Clause(3, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-1)], [Skeleton(Cache("sys_member"), [Place(1), Place(2), Place(0)])], -1, "."))
add("select", 3, Clause(4, [Place(-2), Skeleton(".", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("sys_select"), [Place(2), Place(0), Place(1), Place(3)])], -1, NotImplemented))
add("sys_select", 4, Clause(2, [Place(-2), Place(-3), Place(1), Place(0)], [], -1, NotImplemented))
add("sys_select", 4, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5), Skeleton(".", [Place(3), Place(-5)])], [Skeleton(Cache("sys_select"), [Place(1), Place(2), Place(0), Place(3)])], -1, "."))
add("findall", 3, Clause(5, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(-5), Skeleton(".", ["-", Place(-1)])]), Skeleton(Cache("="), [Place(-6), Skeleton("v", [Place(-1)])]), Skeleton(Cache("change_arg"), [1, Place(4), Place(3)]), Skeleton(Cache("sys_findall"), [Place(4), Place(0), Place(1)]), Skeleton(Cache("arg"), [2, Place(3), Place(2)])], -1, NotImplemented))
add("sys_findall", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Place(2), Skeleton(Cache("copy_term"), [Skeleton(".", [Place(1), Place(-1)]), Place(-3)]), Skeleton(Cache("arg"), [1, Place(0), Place(-4)]), Skeleton(Cache("change_arg"), [2, Place(2), Place(1)]), Skeleton(Cache("change_arg"), [1, Place(0), Place(1)]), Cache("fail")], -1, NotImplemented))
add("sys_findall", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("arg"), [1, Place(0), Place(-2)]), Skeleton(Cache("change_arg"), [2, Place(0), "[]"])], -1, NotImplemented))
add("list_to_set", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_list_to_set"), [Place(0), "[]", Place(1)])], -1, NotImplemented))
add("sys_list_to_set", 3, Clause(0, ["[]", Place(-1), "[]"], [], -1, "[]"))
add("sys_list_to_set", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("member"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_list_to_set"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_list_to_set", 3, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Place(0), Place(-5)])], [Skeleton(Cache("sys_list_to_set"), [Place(1), Skeleton(".", [Place(0), Place(2)]), Place(3)])], -1, "."))
add("reverse", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_reverse"), [Place(0), "[]", Place(1)])], -1, NotImplemented))
add("sys_reverse", 3, Clause(1, ["[]", Place(-2), Place(0)], [], -1, "[]"))
add("sys_reverse", 3, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_reverse"), [Place(1), Skeleton(".", [Place(0), Place(2)]), Place(3)])], -1, "."))
add("append", 3, Clause(1, ["[]", Place(-2), Place(0)], [], -1, "[]"))
add("append", 3, Clause(3, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("append"), [Place(1), Place(2), Place(0)])], -1, "."))
add("length", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_length"), [Place(1), 0, Place(2)])], 0, NotImplemented))
add("length", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_check_integer"), [Place(1)]), Skeleton(Cache(">="), [Place(1), 0]), Skeleton(Cache("sys_length"), [Place(1), Place(0)])], -1, NotImplemented))
add("sys_length", 3, Clause(1, ["[]", Place(-2), Place(0)], [], -1, "[]"))
add("sys_length", 3, Clause(3, [Skeleton(".", [Place(-1), Place(-2)]), Place(-3), Place(-4)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(1), 1]), Place(-3)]), Skeleton(Cache("sys_length"), [Place(0), Place(1), Place(2)])], -1, "."))
add("sys_length", 2, Clause(2, [0, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "[]"])], 0, 0))
add("sys_length", 2, Clause(2, [Place(-2), Skeleton(".", [Place(-1), Place(-3)])], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), 1]), Place(-2)]), Skeleton(Cache("sys_length"), [Place(0), Place(1)])], -1, NotImplemented))
add("number_codes", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("ground"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(-2), Place(2)]), Skeleton(Cache("atom_number"), [Place(0), Place(1)])], 0, NotImplemented))
add("number_codes", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("atom_number"), [Place(-4), Place(0)]), Skeleton(Cache("atom_codes"), [Place(2), Place(1)])], -1, NotImplemented))
add("between", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_integer"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("=<"), [Place(1), Place(2)]), Skeleton(Cache("sys_between"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("between", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_check_integer"), [Place(0)]), Skeleton(Cache("sys_check_integer"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("=<"), [Place(0), Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_between", 3, Clause(2, [Place(-3), Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_between", 3, Clause(1, [Place(-2), Place(-1), Place(0)], [], -1, NotImplemented))
add("sys_between", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(0), 1]), Place(-2)]), Skeleton(Cache("sys_between"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_lastpred", 3, 1])]))
add("sys_update_last", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("os_task_current"), [Place(-4)]), Skeleton(Cache("retractall"), [Skeleton("sys_lastpred", [Place(2), Place(-1), Place(-1)])]), Skeleton(Cache("assertz"), [Skeleton("sys_lastpred", [Place(2), Place(0), Place(1)])])], -1, NotImplemented))
add("sys_style_static", 1, Clause(2, [Place(-3)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_style_static", 1, Clause(1, [Skeleton(":-", [Place(-1)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, ":-"))
add("sys_style_static", 1, Clause(2, [Skeleton(":-", [Place(-3), Place(-1)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_style_head"), [Place(1)])], 0, ":-"))
add("sys_style_static", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_style_head"), [Place(0)])], -1, NotImplemented))
add("sys_style_head", 1, Clause(2, [Place(-3)], [Skeleton(Cache("callable"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(-3), Place(-2)]), Skeleton(Cache("sys_style_indicator"), [Place(1), Place(0)])], 0, NotImplemented))
add("sys_style_head", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("sys_style_indicator", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("os_task_current"), [Place(-5)]), Skeleton(Cache("sys_lastpred"), [Place(3), Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_style_indicator", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("dg_get_partition"), [Place(-5)]), Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_discontiguous", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(3, [Place(-2), Place(-3), Place(-1)], [Skeleton(Cache("="), [Place(-4), Skeleton("warning", [Skeleton("syntax_error", ["discontiguous_pred", Skeleton("/", [Place(0), Place(1)])]), Place(-1)])]), Skeleton(Cache("sys_fill_stack"), [Place(2)]), Skeleton(Cache("sys_print_error"), [Place(2)])], -1, NotImplemented)]), [Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_update_last"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_style_indicator", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_usage_predicate"), [Place(0), Place(1)]), Skeleton(Cache("sys_update_last"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_usage_predicate", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("dg_get_partition"), [Place(-4)]), Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("\\+"), [Skeleton("sys_predprop", [Place(1), Place(2), Skeleton("sys_multifile", [Place(3)])])]), Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(-6)])]), Skeleton(Cache("\\=="), [Place(3), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["redefine", "procedure", Skeleton("/", [Place(1), Place(2)])]), Place(-1)])])], 0, NotImplemented), Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented)]), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_usage", [Place(2)])])])], -1, NotImplemented))
add("discontiguous", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("discontiguous", 1, Clause(3, [Skeleton("/", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("dg_get_partition"), [Place(-2)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(1), Place(2), Skeleton("sys_discontiguous", [Place(0)])])])], 0, "/"))
add("discontiguous", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("multifile", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("multifile", 1, Clause(3, [Skeleton("/", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("sys_multifile_safe"), [Place(1), Place(2)])], 0, "/"))
add("multifile", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_multifile_safe", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("dg_get_partition"), [Place(-4)]), Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(-6)])]), Skeleton(Cache("\\=="), [Place(3), Place(4)]), Skeleton(Cache("\\+"), [Skeleton("sys_predprop", [Place(1), Place(2), Skeleton("sys_multifile", [Place(4)])])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["promote", "multifile", Skeleton("/", [Place(1), Place(2)])]), Place(-1)])])], 0, NotImplemented), Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented)]), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_multifile", [Place(2)])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_source", 3, 1])]))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_srcprop", 2, 1])]))
add("current_source", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_source"), [Place(0), Place(-1), Place(-1)])], -1, NotImplemented))
add("source_property", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_srcprop"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_emulated", 2, 1])]))
add("sys_emulated", 2, Clause(0, ["dialect", "dogelog"], [], -1, "dialect"))
add("sys_emulated", 2, Clause(0, ["emulator_url", ""], [], -1, "emulator_url"))
add("sys_emulated", 2, Clause(0, ["argv", "[]"], [], -1, "argv"))
add("sys_emulated", 2, Clause(0, ["sys_locale", "en_GB"], [], -1, "sys_locale"))
add("set_prolog_flag", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_set"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("set_prolog_flag", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_prolog_flag_set", 2, Clause(1, ["double_quotes", Place(-2)], [Skeleton(Cache("sys_check_atom"), [Place(0)]), Skeleton(Cache("sys_check_codes"), [Place(0)])], -1, "double_quotes"))
add("sys_prolog_flag_set", 2, Clause(1, ["base_url", Place(-2)], [Skeleton(Cache("os_set_workdir"), [Place(0)])], -1, "base_url"))
add("sys_prolog_flag_set", 2, Clause(1, ["stage", Place(-2)], [Skeleton(Cache("dg_set_stage"), [Place(0)])], -1, "stage"))
add("sys_prolog_flag_set", 2, Clause(1, ["partition", Place(-2)], [Skeleton(Cache("dg_set_partition"), [Place(0)])], -1, "partition"))
add("sys_prolog_flag_set", 2, Clause(1, ["dialect", Place(-2)], [Skeleton(Cache("sys_check_atom"), [Place(0)]), Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["dialect", Place(-1)])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["dialect", Place(0)])])], -1, "dialect"))
add("sys_prolog_flag_set", 2, Clause(1, ["emulator_url", Place(-2)], [Skeleton(Cache("sys_check_atom"), [Place(0)]), Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["emulator_url", Place(-1)])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["emulator_url", Place(0)])])], -1, "emulator_url"))
add("sys_prolog_flag_set", 2, Clause(1, ["argv", Place(-2)], [Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["argv", Place(-1)])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["argv", Place(0)])])], -1, "argv"))
add("sys_prolog_flag_set", 2, Clause(1, ["sys_locale", Place(-2)], [Skeleton(Cache("sys_check_atom"), [Place(0)]), Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["sys_locale", Place(-1)])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["sys_locale", Place(0)])])], -1, "sys_locale"))
add("sys_check_codes", 1, Clause(1, ["codes"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "codes"))
add("sys_check_codes", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["flag_value", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("current_prolog_flag", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prolog_flag_get"), [Place(1), Place(2)])], 0, NotImplemented))
add("current_prolog_flag", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_get"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(1)])], 0, NotImplemented))
add("current_prolog_flag", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_prolog_flag_get", 2, Clause(0, ["max_code", 1114111], [], -1, "max_code"))
add("sys_prolog_flag_get", 2, Clause(1, ["dialect", Place(-2)], [Skeleton(Cache("sys_emulated"), ["dialect", Place(0)])], -1, "dialect"))
add("sys_prolog_flag_get", 2, Clause(1, ["emulator_url", Place(-2)], [Skeleton(Cache("sys_emulated"), ["emulator_url", Place(0)])], -1, "emulator_url"))
add("sys_prolog_flag_get", 2, Clause(1, ["argv", Place(-2)], [Skeleton(Cache("sys_emulated"), ["argv", Place(0)])], -1, "argv"))
add("sys_prolog_flag_get", 2, Clause(1, ["sys_locale", Place(-2)], [Skeleton(Cache("sys_emulated"), ["sys_locale", Place(0)])], -1, "sys_locale"))
add("sys_prolog_flag_get", 2, Clause(0, ["single_quotes", "atom"], [], -1, "single_quotes"))
add("sys_prolog_flag_get", 2, Clause(0, ["double_quotes", "codes"], [], -1, "double_quotes"))
add("sys_prolog_flag_get", 2, Clause(0, ["back_quotes", "variable"], [], -1, "back_quotes"))
add("sys_prolog_flag_get", 2, Clause(0, ["version", 10200], [], -1, "version"))
add("sys_prolog_flag_get", 2, Clause(0, ["version_data", Compound("dogelog", [1, 2, 0, Compound(".", [Compound("date", [1713912157538]), "[]"])])], [], -1, "version_data"))
add("sys_prolog_flag_get", 2, Clause(0, ["iso", "false"], [], -1, "iso"))
add("sys_prolog_flag_get", 2, Clause(0, ["max_arity", 2147483647], [], -1, "max_arity"))
add("sys_prolog_flag_get", 2, Clause(1, ["stage", Place(-2)], [Skeleton(Cache("dg_get_stage"), [Place(0)])], -1, "stage"))
add("sys_prolog_flag_get", 2, Clause(1, ["partition", Place(-2)], [Skeleton(Cache("dg_get_partition"), [Place(0)])], -1, "partition"))
add("sys_prolog_flag_get", 2, Clause(2, ["async_mode", Place(-2)], [Skeleton(Cache("dg_gc_flags"), [Place(-3)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 1, Place(0)])], -1, "async_mode"))
add("sys_prolog_flag_get", 2, Clause(2, ["allow_yield", Place(-2)], [Skeleton(Cache("dg_gc_flags"), [Place(-3)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 8, Place(0)])], -1, "allow_yield"))
add("sys_prolog_flag_get", 2, Clause(1, ["base_url", Place(-2)], [Skeleton(Cache("os_get_workdir"), [Place(0)])], -1, "base_url"))
add("sys_prolog_flag_get", 2, Clause(1, ["system_url", Place(-2)], [Skeleton(Cache("os_get_libpath"), [Place(0)])], -1, "system_url"))
add("sys_prolog_flag_get", 2, Clause(1, ["foreign_ext", Place(-2)], [Skeleton(Cache("os_get_natext"), [Place(0)])], -1, "foreign_ext"))
add("sys_prolog_flag_get", 2, Clause(1, ["host_info", Place(-2)], [Skeleton(Cache("os_host_info"), [Place(0)])], -1, "host_info"))
add("sys_prolog_flag_get", 2, Clause(2, ["import_async", Place(-2)], [Skeleton(Cache("dg_gc_flags"), [Place(-3)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 16, Place(0)])], -1, "import_async"))
add("sys_prolog_flag_get", 2, Clause(2, ["prop_async", Place(-2)], [Skeleton(Cache("dg_gc_flags"), [Place(-3)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 32, Place(0)])], -1, "prop_async"))
add("sys_prolog_flag_get", 2, Clause(2, ["read_async", Place(-2)], [Skeleton(Cache("dg_gc_flags"), [Place(-3)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 64, Place(0)])], -1, "read_async"))
add("sys_prolog_flag_decode", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(1), Place(2)]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), "on"])], 0, NotImplemented))
add("sys_prolog_flag_decode", 3, Clause(0, [Place(-1), Place(-1), "off"], [], -1, NotImplemented))
add("statistics", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_stat_get"), [Place(1), Place(2)])], 0, NotImplemented))
add("statistics", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_stat_get"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(1)])], 0, NotImplemented))
add("statistics", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_stat_get", 2, Clause(1, ["gctime", Place(-2)], [Skeleton(Cache("dg_gc_time"), [Place(0)])], -1, "gctime"))
add("sys_stat_get", 2, Clause(1, ["calls", Place(-2)], [Skeleton(Cache("dg_call_count"), [Place(0)])], -1, "calls"))
add("sys_stat_get", 2, Clause(1, ["time", Place(-2)], [Skeleton(Cache("dg_real_time"), [Place(0)])], -1, "time"))
add("sys_stat_get", 2, Clause(1, ["wall", Place(-2)], [Skeleton(Cache("dg_date_now"), [Place(0)])], -1, "wall"))
add("statistics", 0, Clause(3, [], [Skeleton(Cache("statistics"), [Place(-2), Place(-3)]), Skeleton(Cache("current_output"), [Place(-4)]), Skeleton(Cache("sys_convert_stat"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("sys_print_message"), [Skeleton("statistics", [Place(0), Place(1)]), Place(2)]), Cache("nl"), Cache("fail")], -1, NotImplemented))
add("statistics", 0, Clause(0, [], [], -1, NotImplemented))
add("sys_convert_stat", 3, Clause(3, ["wall", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("get_string"), ["format.datetime", Place(-2)]), Skeleton(Cache("sys_time_atom"), [Place(0), Place(1), Place(2)])], 0, "wall"))
add("sys_convert_stat", 3, Clause(1, [Place(-1), Place(-2), Place(0)], [], -1, NotImplemented))
add("time", 1, Clause(2, [Place(-2)], [Skeleton(Cache("="), [Place(-3), Skeleton("v", [Place(-1), Place(-1), Place(-1)])]), Skeleton(Cache("try_call_finally"), [Skeleton("sys_time_set", [Place(1)]), Place(0), Skeleton("sys_time_show", [Place(1)])])], -1, NotImplemented))
add("sys_time_set", 1, Clause(4, [Place(-2)], [Skeleton(Cache("statistics"), ["time", Place(-3)]), Skeleton(Cache("statistics"), ["gctime", Place(-4)]), Skeleton(Cache("statistics"), ["calls", Place(-5)]), Skeleton(Cache("change_arg"), [1, Place(0), Place(1)]), Skeleton(Cache("change_arg"), [2, Place(0), Place(2)]), Skeleton(Cache("change_arg"), [3, Place(0), Place(3)])], -1, NotImplemented))
add("sys_time_show", 1, Clause(7, [Place(-2)], [Skeleton(Cache("arg"), [1, Place(0), Place(-3)]), Skeleton(Cache("arg"), [2, Place(0), Place(-4)]), Skeleton(Cache("arg"), [3, Place(0), Place(-2)]), Skeleton(Cache("statistics"), ["time", Place(-5)]), Skeleton(Cache("statistics"), ["gctime", Place(-6)]), Skeleton(Cache("statistics"), ["calls", Place(-7)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(3), Place(1)]), Place(-3)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(4), Place(2)]), Place(-4)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(5), Place(0)]), Place(-2)]), Skeleton(make_defined([Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=\\="), [Place(1), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("truncate"), [Skeleton(Cache("/"), [Skeleton(Cache("*"), [Place(3), 1000]), Place(1)])]), Place(2)])], 0, NotImplemented), Clause(1, [Place(-1), Place(-2), Place(-1)], [Skeleton(Cache("="), [Place(0), 0])], -1, NotImplemented)]), [Place(1), Place(-7), Place(0)]), Skeleton(Cache("statistics"), ["wall", Place(-2)]), Skeleton(Cache("current_output"), [Place(-6)]), Skeleton(Cache("member"), [Skeleton("-", [Place(-5), Place(-8)]), Skeleton(".", [Skeleton("-", ["time", Place(1)]), Skeleton(".", [Skeleton("-", ["gctime", Place(2)]), Skeleton(".", [Skeleton("-", ["lips", Place(5)]), Skeleton(".", [Skeleton("-", ["wall", Place(0)]), "[]"])])])])]), Skeleton(Cache("sys_convert_stat"), [Place(3), Place(6), Place(-8)]), Skeleton(Cache("sys_print_message"), [Skeleton("time", [Place(3), Place(6)]), Place(4)]), Cache("fail")], -1, NotImplemented))
add("sys_time_show", 1, Clause(0, [Place(-1)], [Cache("nl")], -1, NotImplemented))
add("try_call_finally", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(make_defined([Clause(1, [Place(-2), Place(-1)], [Place(0)], -1, NotImplemented), Clause(1, [Place(-1), Place(-2)], [Place(0), Cache("fail")], -1, NotImplemented)]), [Place(1), Place(3)]), Skeleton(Cache("$MARK"), [Place(-6)]), Skeleton(Cache("sys_trap"), [Place(2), Place(-4), Skeleton(",", [Place(3), Skeleton("sys_raise", [Place(2)])])]), Skeleton(Cache("$MARK"), [Place(-4)]), Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-1)], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$CUT"), [Place(3)]), Place(4)], 0, NotImplemented), Clause(1, [Place(-1), Place(-1), Place(-1), Place(-2), Place(-1)], [Place(0)], -1, NotImplemented), Clause(1, [Place(-1), Place(-1), Place(-1), Place(-1), Place(-2)], [Place(0), Cache("fail")], -1, NotImplemented)]), [Place(4), Place(2), Place(0), Place(3), Place(1)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(3)]), Place(4)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(5), Place(3)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("sys_atom_match"), [Place(1), Place(5), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("=<"), [0, Place(4)]), Skeleton(Cache("=<"), [Place(4), Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(-6)]), Skeleton(Cache("between"), [0, Place(4), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(4), Place(2)]), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(3)]), Place(2)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(3)]), Place(4)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(2)]), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(5), Place(3)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)]), Skeleton(Cache("sys_atom_match"), [Place(1), Place(5), Place(2)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(-2), Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("atom_length"), [Place(4), Place(2)]), Skeleton(Cache("atom_length"), [Place(0), Place(-7)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(5), Place(3)]), Place(2)]), Place(1)]), Skeleton(Cache("sys_atom_match"), [Place(0), Place(4), Place(1)])], -1, NotImplemented))
add("last_sub_atom", 5, Clause(7, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(-8)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(6)]), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(-8)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(6)]), Place(3)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(3)]), Place(4)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(5), Place(3)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("sys_last_atom_match"), [Place(1), Place(5), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("=<"), [0, Place(4)]), Skeleton(Cache("=<"), [Place(4), Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(-6)]), Skeleton(Cache("between"), [0, Place(4), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(4), Place(0)]), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(4), Place(2)]), Place(3)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(3)]), Place(2)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(7, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(-2)]), Skeleton(Cache("between"), [0, Place(0), Place(-8)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(6)]), Place(3)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0), Place(3)]), Place(4)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(4)]), Place(2)]), Place(3)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(5), Place(3)]), Skeleton(Cache("atom_length"), [Place(1), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0), Place(2)]), Place(3)]), Place(4)]), Skeleton(Cache("sys_last_atom_match"), [Place(1), Place(5), Place(2)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(-2), Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("atom_length"), [Place(4), Place(2)]), Skeleton(Cache("atom_length"), [Place(0), Place(-7)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(5), Place(3)]), Place(2)]), Place(1)]), Skeleton(Cache("sys_last_atom_match"), [Place(0), Place(4), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_op", 5, 1])]))
add("sys_op", 5, Clause(0, [":-", "fx", 1200, 12, "system"], [], -1, ":-"))
add("sys_op", 5, Clause(0, [":-", "xfx", 1200, 12, "system"], [], -1, ":-"))
add("sys_op", 5, Clause(0, ["?-", "fx", 1200, 12, "system"], [], -1, "?-"))
add("sys_op", 5, Clause(0, ["-->", "xfx", 1200, 12, "system"], [], -1, "-->"))
add("sys_op", 5, Clause(0, ["dynamic", "fx", 1150, 12, "system"], [], -1, "dynamic"))
add("sys_op", 5, Clause(0, ["discontiguous", "fx", 1150, 12, "system"], [], -1, "discontiguous"))
add("sys_op", 5, Clause(0, ["multifile", "fx", 1150, 12, "system"], [], -1, "multifile"))
add("sys_op", 5, Clause(0, ["initialization", "fx", 1150, 12, "system"], [], -1, "initialization"))
add("sys_op", 5, Clause(0, [";", "xfy", 1100, 10, "system"], [], -1, ";"))
add("sys_op", 5, Clause(0, ["->", "xfy", 1050, 8, "system"], [], -1, "->"))
add("sys_op", 5, Clause(0, [",", "xfy", 1000, 6, "system"], [], -1, ","))
add("sys_op", 5, Clause(0, ["\\+", "fy", 900, 0, "system"], [], -1, "\\+"))
add("sys_op", 5, Clause(0, ["is", "xfx", 700, 0, "system"], [], -1, "is"))
add("sys_op", 5, Clause(0, ["=", "xfx", 700, 0, "system"], [], -1, "="))
add("sys_op", 5, Clause(0, ["\\=", "xfx", 700, 0, "system"], [], -1, "\\="))
add("sys_op", 5, Clause(0, ["=..", "xfx", 700, 0, "system"], [], -1, "=.."))
add("sys_op", 5, Clause(0, ["<", "xfx", 700, 0, "system"], [], -1, "<"))
add("sys_op", 5, Clause(0, ["=<", "xfx", 700, 0, "system"], [], -1, "=<"))
add("sys_op", 5, Clause(0, ["=\\=", "xfx", 700, 0, "system"], [], -1, "=\\="))
add("sys_op", 5, Clause(0, [">=", "xfx", 700, 0, "system"], [], -1, ">="))
add("sys_op", 5, Clause(0, [">", "xfx", 700, 0, "system"], [], -1, ">"))
add("sys_op", 5, Clause(0, ["=:=", "xfx", 700, 0, "system"], [], -1, "=:="))
add("sys_op", 5, Clause(0, ["@<", "xfx", 700, 0, "system"], [], -1, "@<"))
add("sys_op", 5, Clause(0, ["@=<", "xfx", 700, 0, "system"], [], -1, "@=<"))
add("sys_op", 5, Clause(0, ["\\==", "xfx", 700, 0, "system"], [], -1, "\\=="))
add("sys_op", 5, Clause(0, ["@>=", "xfx", 700, 0, "system"], [], -1, "@>="))
add("sys_op", 5, Clause(0, ["@>", "xfx", 700, 0, "system"], [], -1, "@>"))
add("sys_op", 5, Clause(0, ["==", "xfx", 700, 0, "system"], [], -1, "=="))
add("sys_op", 5, Clause(0, [":", "xfy", 600, 3, "system"], [], -1, ":"))
add("sys_op", 5, Clause(0, ["+", "yfx", 500, 3, "system"], [], -1, "+"))
add("sys_op", 5, Clause(0, ["-", "yfx", 500, 3, "system"], [], -1, "-"))
add("sys_op", 5, Clause(0, ["/\\", "yfx", 500, 3, "system"], [], -1, "/\\"))
add("sys_op", 5, Clause(0, ["\\/", "yfx", 500, 3, "system"], [], -1, "\\/"))
add("sys_op", 5, Clause(0, ["*", "yfx", 400, 3, "system"], [], -1, "*"))
add("sys_op", 5, Clause(0, ["/", "yfx", 400, 3, "system"], [], -1, "/"))
add("sys_op", 5, Clause(0, ["//", "yfx", 400, 3, "system"], [], -1, "//"))
add("sys_op", 5, Clause(0, ["rem", "yfx", 400, 3, "system"], [], -1, "rem"))
add("sys_op", 5, Clause(0, ["div", "yfx", 400, 3, "system"], [], -1, "div"))
add("sys_op", 5, Clause(0, ["mod", "yfx", 400, 3, "system"], [], -1, "mod"))
add("sys_op", 5, Clause(0, ["xor", "yfx", 400, 3, "system"], [], -1, "xor"))
add("sys_op", 5, Clause(0, [">>", "yfx", 400, 3, "system"], [], -1, ">>"))
add("sys_op", 5, Clause(0, ["<<", "yfx", 400, 3, "system"], [], -1, "<<"))
add("sys_op", 5, Clause(0, ["-", "fy", 200, 1, "system"], [], -1, "-"))
add("sys_op", 5, Clause(0, ["\\", "fy", 200, 1, "system"], [], -1, "\\"))
add("sys_op", 5, Clause(0, ["**", "xfx", 200, 3, "system"], [], -1, "**"))
add("sys_op", 5, Clause(0, ["^", "xfy", 200, 3, "system"], [], -1, "^"))
add("current_op", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_op"), [Place(2), Place(1), Place(0), Place(-1), Place(-1)])], -1, NotImplemented))
add("op", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_check_integer"), [Place(0)]), Skeleton(Cache("sys_check_priority"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_atom"), [Place(2)]), Skeleton(Cache("sys_op_retract"), [Place(2), Place(1)]), Skeleton(Cache("sys_op_assert"), [Place(2), Place(1), Place(0)])], -1, NotImplemented))
add("sys_check_priority", 1, Clause(1, [Place(-2)], [Skeleton(Cache("<"), [Place(0), 0]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["not_less_than_zero", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_check_priority", 1, Clause(1, [Place(-2)], [Skeleton(Cache(">"), [Place(0), 1200]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_priority", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_check_priority", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("sys_op_retract", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_is_prefix"), [Place(2), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(-2)], [Skeleton(Cache("sys_op"), [Place(0), Place(-3), Place(-4), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_prefix"), [Place(1), Place(-1)]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), Place(-1), Place(-1)])]), Cache("fail")], -1, NotImplemented), Clause(0, [Place(-1)], [], -1, NotImplemented)]), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_is_postfix"), [Place(2), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(-2)], [Skeleton(Cache("sys_op"), [Place(0), Place(-3), Place(-4), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_postfix"), [Place(1), Place(-1)]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), Place(-1), Place(-1)])]), Cache("fail")], -1, NotImplemented), Clause(0, [Place(-1)], [], -1, NotImplemented)]), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_is_infix"), [Place(2), Place(-1), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(-2)], [Skeleton(Cache("sys_op"), [Place(0), Place(-3), Place(-4), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_infix"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), Place(-1), Place(-1)])]), Cache("fail")], -1, NotImplemented), Clause(0, [Place(-1)], [], -1, NotImplemented)]), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_specifier", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_op_assert", 3, Clause(1, [Place(-1), Place(-1), 0], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_assert", 3, Clause(2, [Place(-2), Place(-3), Place(-1)], [Skeleton(Cache("sys_is_infix"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("sys_op"), [Place(0), Place(-3), Place(-1), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_postfix"), [Place(1), Place(-1)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["create", "operator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_op_assert", 3, Clause(2, [Place(-2), Place(-3), Place(-1)], [Skeleton(Cache("sys_is_postfix"), [Place(1), Place(-1)]), Skeleton(Cache("sys_op"), [Place(0), Place(-3), Place(-1), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_infix"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["create", "operator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_op_assert", 3, Clause(5, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_op_space"), [Place(1), Place(2), Place(-5)]), Skeleton(Cache("sys_op_format"), [Place(1), Place(2), Place(-6)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(3), Place(4)]), Place(-6)]), Skeleton(Cache("dg_get_partition"), [Place(-5)]), Skeleton(Cache("assertz"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), Place(4), Place(3)])])], -1, NotImplemented))
add("sys_op_space", 3, Clause(2, [Place(-1), Place(-3), 0], [Skeleton(Cache(">"), [Place(1), 699]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(2, [Place(-3), Place(-1), 1], [Skeleton(Cache("sys_is_prefix"), [Place(1), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(2, [Place(-3), Place(-1), 2], [Skeleton(Cache("sys_is_postfix"), [Place(1), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(0, [Place(-1), Place(-1), 3], [], -1, NotImplemented))
add("sys_op_format", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_is_infix"), [Place(1), Place(-1), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_op_format2"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_op_format", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_is_prefix"), [Place(1), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_op_format3"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_op_format", 3, Clause(0, [Place(-1), Place(-1), 0], [], -1, NotImplemented))
add("sys_op_format2", 2, Clause(2, [Place(-3), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(2, [Place(-3), 8], [Skeleton(Cache(">"), [Place(1), 1049]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(2, [Place(-3), 4], [Skeleton(Cache(">"), [Place(1), 949]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(0, [Place(-1), 0], [], -1, NotImplemented))
add("sys_op_format3", 2, Clause(2, [Place(-3), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format3", 2, Clause(0, [Place(-1), 0], [], -1, NotImplemented))
add("term_conversion", 2, Clause(2, [Place(-3), Place(-1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("term_conversion", 2, Clause(2, [Skeleton("-->", [Place(-3), Place(-1)]), Place(-1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "-->"))
add("term_conversion", 2, Clause(7, [Skeleton("-->", [Skeleton(",", [Place(-3), Place(-4)]), Place(-5)]), Skeleton(":-", [Place(-6), Skeleton(",", [Place(-7), Place(-8)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(-3), Place(-2), Place(4)]), Skeleton(Cache("sys_phrase_expansion"), [Place(3), Place(1), Place(-3), Place(5)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), Place(0), Place(1), Place(6)])], 0, "-->"))
add("term_conversion", 2, Clause(5, [Skeleton("-->", [Place(-3), Place(-4)]), Skeleton(":-", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(-3), Place(-2), Place(3)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), Place(1), Place(0), Place(4)])], 0, "-->"))
add("sys_phrase_expansion", 4, Clause(2, [Place(-3), Place(-1), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("sys_phrase_expansion", 4, Clause(7, [Skeleton(",", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton(",", [Place(-7), Place(-8)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(3), Place(-5), Place(5)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), Place(3), Place(4), Place(6)])], 0, ","))
add("sys_phrase_expansion", 4, Clause(7, [Skeleton(";", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton(";", [Place(-7), Place(-8)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), Place(3), Place(4), Place(6)])], 0, ";"))
add("sys_phrase_expansion", 4, Clause(7, [Skeleton("->", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton("->", [Place(-7), Place(-8)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(3), Place(-5), Place(5)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), Place(3), Place(4), Place(6)])], 0, "->"))
add("sys_phrase_expansion", 4, Clause(3, ["[]", Place(-3), Place(-4), Skeleton("=", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_phrase_expansion", 4, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton("=", [Place(3), Skeleton(".", [Place(1), Place(-3)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_list_expansion"), [Place(2), Place(4), Place(1)])], 0, "."))
add("sys_phrase_expansion", 4, Clause(3, ["!", Place(-3), Place(-4), Skeleton(",", ["!", Skeleton("=", [Place(1), Place(2)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "!"))
add("sys_phrase_expansion", 4, Clause(4, [Skeleton("{}", [Place(-3)]), Place(-4), Place(-5), Skeleton(",", [Place(1), Skeleton("=", [Place(2), Place(3)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "{}"))
add("sys_phrase_expansion", 4, Clause(5, [Skeleton("\\+", [Place(-3)]), Place(-4), Place(-5), Skeleton(",", [Skeleton("\\+", [Place(-6)]), Skeleton("=", [Place(2), Place(3)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), Place(2), Place(-1), Place(4)])], 0, "\\+"))
add("sys_phrase_expansion", 4, Clause(5, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("callable"), [Place(0)]), Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-2), Place(-6)])]), Skeleton(Cache("append"), [Place(4), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])]), Place(-4)]), Skeleton(Cache("=.."), [Place(3), Skeleton(".", [Place(0), Place(2)])])], -1, NotImplemented))
add("sys_list_expansion", 3, Clause(2, [Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("sys_list_expansion", 3, Clause(1, ["[]", Place(-2), Place(0)], [], -1, "[]"))
add("sys_list_expansion", 3, Clause(3, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("sys_list_expansion"), [Place(1), Place(2), Place(0)])], -1, "."))
add("absolute_file_name", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_prolog_flag"), ["base_url", Place(-4)]), Skeleton(Cache("sys_file_combine"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
add("sys_file_combine", 3, Clause(3, [Place(-1), Place(-3), Place(-4)], [Skeleton(Cache("is_absolute_file_name"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_file_combine", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("file_directory_name"), [Place(0), Place(-2)]), Skeleton(Cache("atom_concat"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("is_absolute_file_name", 1, Clause(4, [Place(-2)], [Skeleton(Cache("atom_length"), [Place(0), Place(-3)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("sub_atom"), [Place(1), Place(2), Place(-1), Place(-1), "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(0), Place(-4), Place(1)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("sub_atom"), [Place(1), Place(2), Place(-1), Place(-1), "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(0), Place(-5), Place(1)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("min"), [Place(2), Place(3)]), Place(-5)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("=="), [Place(1), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("<"), [Place(1), Place(2)])], 0, NotImplemented), Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("sub_atom"), [Place(2), Place(-4), Place(-1), Place(-1), ":"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("<"), [Place(2), Place(1)])], 0, NotImplemented)]), [Place(3), Place(1), Place(0)])], -1, NotImplemented))
add("file_directory_name", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(make_defined([Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(2), Place(-1), Place(-1), "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("="), [Place(0), -1])], -1, NotImplemented)]), [Place(0), Place(-4)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(2), Place(-1), Place(-1), "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("="), [Place(0), -1])], -1, NotImplemented)]), [Place(0), Place(-5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("max"), [Place(2), Place(3)]), Place(-5)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(3), 1]), Place(-5)]), Skeleton(Cache("sub_atom"), [Place(0), 0, Place(3), Place(-1), Place(1)])], -1, NotImplemented))
add("file_base_name", 2, Clause(5, [Place(-2), Place(-3)], [Skeleton(Cache("atom_length"), [Place(0), Place(-4)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(-1), Place(-1), Place(2), "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(0), Place(-5), Place(2)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(-1), Place(-1), Place(2), "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(0), Place(-6), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("min"), [Place(3), Place(4)]), Place(-6)]), Skeleton(Cache("sub_atom"), [Place(0), Place(-1), Place(4), 0, Place(1)])], -1, NotImplemented))
add("strings", 3, Clause(0, ["exception_unknown", "de", "Unbekannte Ausnahme: "], [], -1, "exception_unknown"))
add("strings", 3, Clause(0, ["exception_error", "de", "Fehler: "], [], -1, "exception_error"))
add("strings", 3, Clause(0, ["exception_warning", "de", "Warnung: "], [], -1, "exception_warning"))
add("strings", 3, Clause(0, ["exception_context", "de", "\tUnbekannter Kontext: "], [], -1, "exception_context"))
add("strings", 3, Clause(0, ["exception_template", "de", "Unbekannte Vorlage: "], [], -1, "exception_template"))
add("strings", 3, Clause(0, ["file_line", "de", "\t~ auf ~"], [], -1, "file_line"))
add("strings", 3, Clause(0, ["format.date", "de", "%d.%m.%Y"], [], -1, "format.date"))
add("strings", 3, Clause(0, ["format.datetime", "de", "%d.%m.%Y %H:%M"], [], -1, "format.datetime"))
add("strings", 3, Clause(0, ["time.time", "de", "% Zeit ~ ms"], [], -1, "time.time"))
add("strings", 3, Clause(0, ["time.gctime", "de", ", GC ~ ms"], [], -1, "time.gctime"))
add("strings", 3, Clause(0, ["time.lips", "de", ", Lips ~"], [], -1, "time.lips"))
add("strings", 3, Clause(0, ["time.wall", "de", ", Uhr ~~"], [], -1, "time.wall"))
add("strings", 3, Clause(0, ["statistics.gctime", "de", "GC Zeit\t\t~ ms"], [], -1, "statistics.gctime"))
add("strings", 3, Clause(0, ["statistics.calls", "de", "Aufrufe\t\t~"], [], -1, "statistics.calls"))
add("strings", 3, Clause(0, ["statistics.time", "de", "Betriebszeit\t~ ms"], [], -1, "statistics.time"))
add("strings", 3, Clause(0, ["statistics.wall", "de", "Uhrzeit\t\t~~"], [], -1, "statistics.wall"))
add("strings", 3, Clause(0, ["exception_unknown", "", "Unknown exception: "], [], -1, "exception_unknown"))
add("strings", 3, Clause(0, ["exception_error", "", "Error: "], [], -1, "exception_error"))
add("strings", 3, Clause(0, ["exception_warning", "", "Warning: "], [], -1, "exception_warning"))
add("strings", 3, Clause(0, ["exception_context", "", "\tUnknown context: "], [], -1, "exception_context"))
add("strings", 3, Clause(0, ["exception_template", "", "Unknown template: "], [], -1, "exception_template"))
add("strings", 3, Clause(0, ["file_line", "", "\t~ at ~"], [], -1, "file_line"))
add("strings", 3, Clause(0, ["format.date", "", "%d/%m/%Y"], [], -1, "format.date"))
add("strings", 3, Clause(0, ["format.datetime", "", "%d/%m/%Y %H:%M"], [], -1, "format.datetime"))
add("strings", 3, Clause(0, ["time.time", "", "% Time ~ ms"], [], -1, "time.time"))
add("strings", 3, Clause(0, ["time.gctime", "", ", GC ~ ms"], [], -1, "time.gctime"))
add("strings", 3, Clause(0, ["time.lips", "", ", Lips ~"], [], -1, "time.lips"))
add("strings", 3, Clause(0, ["time.wall", "", ", Wall ~~"], [], -1, "time.wall"))
add("strings", 3, Clause(0, ["statistics.gctime", "", "GC time\t\t~ ms"], [], -1, "statistics.gctime"))
add("strings", 3, Clause(0, ["statistics.calls", "", "Calls\t\t~"], [], -1, "statistics.calls"))
add("strings", 3, Clause(0, ["statistics.time", "", "Realtime\t~ ms"], [], -1, "statistics.time"))
add("strings", 3, Clause(0, ["statistics.wall", "", "Walltime\t~~"], [], -1, "statistics.wall"))
add("strings", 3, Clause(0, ["instantiation_error", "de", "Argument sollte keine Variable sein."], [], -1, "instantiation_error"))
add("strings", 3, Clause(0, ["syntax_error.directive_failed", "de", "Direktive fehlgeschlagen."], [], -1, "syntax_error.directive_failed"))
add("strings", 3, Clause(0, ["existence_error.body", "de", "Prädikat ~ fehlt Implementation."], [], -1, "existence_error.body"))
add("strings", 3, Clause(0, ["existence_error.procedure", "de", "Prädikat ~ undefiniert oder unerreichbar."], [], -1, "existence_error.procedure"))
add("strings", 3, Clause(0, ["permission_error.modify.static_procedure", "de", "Kann Prädikat ~ nicht aktualisieren."], [], -1, "permission_error.modify.static_procedure"))
add("strings", 3, Clause(0, ["permission_error.coerce.procedure", "de", "Kann Prädikat ~ nicht zu anderen Delegiertentyp zwingen."], [], -1, "permission_error.coerce.procedure"))
add("strings", 3, Clause(0, ["permission_error.access.private_procedure", "de", "Kann auf Prädikat ~ nicht zugreifen."], [], -1, "permission_error.access.private_procedure"))
add("strings", 3, Clause(0, ["permission_error.redefine.procedure", "de", "Kann Prädikat ~ nicht umdefinieren, nicht als Mehrdateien markiert."], [], -1, "permission_error.redefine.procedure"))
add("strings", 3, Clause(0, ["permission_error.promote.multifile", "de", "Kann Funktion ~ nicht zu Mehrdateien heben."], [], -1, "permission_error.promote.multifile"))
add("strings", 3, Clause(0, ["permission_error.create.operator", "de", "Kann Operator ~ nicht erstellen."], [], -1, "permission_error.create.operator"))
add("strings", 3, Clause(0, ["resource_error.illegal_method", "de", "Methode nicht zugelassen."], [], -1, "resource_error.illegal_method"))
add("strings", 3, Clause(0, ["system_error.timelimit_exceeded", "de", "Ausführung abgebrochen da Zeitfrist abgelaufen."], [], -1, "system_error.timelimit_exceeded"))
add("strings", 3, Clause(0, ["system_error.user_abort", "de", "Ausführung auf Benutzerwunsch abgebrochen."], [], -1, "system_error.user_abort"))
add("strings", 3, Clause(0, ["system_error.stack_overflow", "de", "Ausführung wegen Stapelüberlauf abgebrochen."], [], -1, "system_error.stack_overflow"))
add("strings", 3, Clause(0, ["instantiation_error", "", "Argument should not be a variable."], [], -1, "instantiation_error"))
add("strings", 3, Clause(0, ["syntax_error.directive_failed", "", "Directive failed."], [], -1, "syntax_error.directive_failed"))
add("strings", 3, Clause(0, ["existence_error.body", "", "Predicate ~ implementation missing."], [], -1, "existence_error.body"))
add("strings", 3, Clause(0, ["existence_error.procedure", "", "Undefined or inaccesible predicate ~."], [], -1, "existence_error.procedure"))
add("strings", 3, Clause(0, ["permission_error.modify.static_procedure", "", "Can\'t modify predicate ~."], [], -1, "permission_error.modify.static_procedure"))
add("strings", 3, Clause(0, ["permission_error.coerce.procedure", "", "Can\'t coerce predicate ~ into other delegate type."], [], -1, "permission_error.coerce.procedure"))
add("strings", 3, Clause(0, ["permission_error.access.private_procedure", "", "Can\'t access predicate ~."], [], -1, "permission_error.access.private_procedure"))
add("strings", 3, Clause(0, ["permission_error.redefine.procedure", "", "Can\'t redefine predicate ~, not marked multfile."], [], -1, "permission_error.redefine.procedure"))
add("strings", 3, Clause(0, ["permission_error.promote.multifile", "", "Can\'t promote predicate ~ to multi-file."], [], -1, "permission_error.promote.multifile"))
add("strings", 3, Clause(0, ["permission_error.create.operator", "", "Can\'t create the operator ~."], [], -1, "permission_error.create.operator"))
add("strings", 3, Clause(0, ["resource_error.illegal_method", "", "Method not allowed."], [], -1, "resource_error.illegal_method"))
add("strings", 3, Clause(0, ["system_error.timelimit_exceeded", "", "Execution aborted since time limit exceeded."], [], -1, "system_error.timelimit_exceeded"))
add("strings", 3, Clause(0, ["system_error.user_abort", "", "Execution aborted on user request."], [], -1, "system_error.user_abort"))
add("strings", 3, Clause(0, ["system_error.stack_overflow", "", "Execution aborted because of stack overflow."], [], -1, "system_error.stack_overflow"))
add("dynamic", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("dynamic", 1, Clause(3, [Skeleton("/", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("sys_style_indicator"), [Place(1), Place(2)]), Skeleton(Cache("kb_pred_touch"), [Place(1), Place(2), 1])], 0, "/"))
add("dynamic", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("asserta", 1, Clause(2, [Place(-2)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(-2)]), Skeleton(Cache("sys_encode_horn"), [Place(0), Place(-3), 0]), Skeleton(Cache("sys_host_make"), [Place(1), Place(-3)]), Skeleton(Cache("sys_host_asserta"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_host_asserta", 2, Clause(3, [Skeleton("tr_clause", [Place(-1), Place(-3), Place(-1)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(-3), Place(-2)]), Skeleton(Cache("ir_clause_add"), [Place(1), Place(0), Place(2), 2])], 0, "tr_clause"))
add("sys_host_asserta", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["tr_clause", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("assertz", 1, Clause(2, [Place(-2)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(-2)]), Skeleton(Cache("sys_encode_horn"), [Place(0), Place(-3), 0]), Skeleton(Cache("sys_host_make"), [Place(1), Place(-3)]), Skeleton(Cache("sys_host_assertz"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_host_assertz", 2, Clause(3, [Skeleton("tr_clause", [Place(-1), Place(-3), Place(-1)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(-3), Place(-2)]), Skeleton(Cache("ir_clause_add"), [Place(1), Place(0), Place(2), 3])], 0, "tr_clause"))
add("sys_host_assertz", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["tr_clause", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("clause", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("sys_check_callable"), [Place(0)]), Skeleton(Cache("kb_clause_ref"), [Place(0), 2, Place(-4)]), Skeleton(Cache("kb_clause_data"), [Place(2), Place(0), Place(-2), Place(-4)]), Skeleton(Cache("sys_decode_body"), [Place(2), Place(-4)]), Skeleton(Cache("sys_untrans_body"), [Place(2), Place(0), Place(-2)]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("retract", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("retract", 1, Clause(6, [Skeleton(":-", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_callable"), [Place(1)]), Skeleton(Cache("functor"), [Place(1), Place(-2), Place(-5)]), Skeleton(Cache("kb_clause_ref"), [Place(1), 3, Place(-6)]), Skeleton(Cache("kb_clause_data"), [Place(4), Place(1), Place(-3), Place(-7)]), Skeleton(Cache("sys_decode_body"), [Place(5), Place(-7)]), Skeleton(Cache("sys_untrans_body"), [Place(5), Place(1), Place(-3)]), Skeleton(Cache("="), [Place(1), Place(2)]), Skeleton(Cache("kb_clause_remove"), [Place(0), Place(3), 0, Place(4)])], 0, ":-"))
add("retract", 1, Clause(4, [Place(-2)], [Skeleton(Cache("sys_check_callable"), [Place(0)]), Skeleton(Cache("functor"), [Place(0), Place(-3), Place(-4)]), Skeleton(Cache("kb_clause_ref"), [Place(0), 3, Place(-5)]), Skeleton(Cache("kb_clause_data"), [Place(3), Place(0), Place(-1), Place(-2)]), Skeleton(Cache("="), [Place(0), "[]"]), Skeleton(Cache("kb_clause_remove"), [Place(1), Place(2), 0, Place(3)])], -1, NotImplemented))
add("retractall", 1, Clause(4, [Place(-2)], [Skeleton(Cache("sys_check_callable"), [Place(0)]), Skeleton(Cache("functor"), [Place(0), Place(-3), Place(-4)]), Skeleton(Cache("kb_clause_ref"), [Place(0), 7, Place(-5)]), Skeleton(Cache("kb_clause_head"), [Place(3), Place(0)]), Skeleton(Cache("kb_clause_remove"), [Place(1), Place(2), 1, Place(3)]), Cache("fail")], -1, NotImplemented))
add("retractall", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("abolish", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("abolish", 1, Clause(3, [Skeleton("/", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("sys_abolish"), [Place(1), Place(2)])], 0, "/"))
add("abolish", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_abolish", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("kb_pred_link"), [Place(0), Place(1), Place(-4)]), Skeleton(Cache("kb_link_flags"), [Place(2), Place(-4)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["modify", "static_procedure", Skeleton("/", [Place(0), Place(1)])]), Place(-1)])])], -1, NotImplemented))
add("sys_abolish", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(0), Place(1), Place(-1)])]), Skeleton(Cache("kb_pred_destroy"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_predprop", 3, 1])]))
add("current_predicate", 1, Clause(2, [Place(-3)], [Skeleton(Cache("\\+"), [Skeleton("ground", [Place(1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("kb_pred_list"), [Place(-2)]), Skeleton(Cache("member"), [Place(1), Place(0)])], 0, NotImplemented))
add("current_predicate", 1, Clause(3, [Skeleton("/", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), Place(-1)])], 0, "/"))
add("current_predicate", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("predicate_property", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("\\+"), [Skeleton("ground", [Place(1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_predprop_pattern"), [Place(1), Place(2)])], 0, NotImplemented))
add("predicate_property", 2, Clause(4, [Skeleton("/", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("sys_predprop_get"), [Place(1), Place(2), Place(3)])], 0, "/"))
add("predicate_property", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_predprop_pattern", 2, Clause(3, [Skeleton("/", [Place(-2), Place(-3)]), Place(-4)], [Skeleton(Cache("current_predicate"), [Skeleton("/", [Place(0), Place(1)])]), Skeleton(Cache("sys_predprop_get"), [Place(0), Place(1), Place(2)])], -1, "/"))
add("sys_predprop_get", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("kb_pred_link"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("kb_link_flags"), [Place(1), Place(-3)]), Skeleton(Cache("sys_predprop_flag"), [Place(1), Place(2)])], -1, NotImplemented))
add("sys_predprop_get", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_predprop_flag", 2, Clause(1, [Place(-2), "dynamic"], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(0), 1]), 0])], -1, NotImplemented))
add("sys_predprop_flag", 2, Clause(1, [Place(-2), "static"], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(0), 1]), 0])], -1, NotImplemented))
add("sys_host_make", 2, Clause(7, [Skeleton("ir_clause", [Place(-2), Place(-3), Place(-4), Place(-5)]), Place(-6)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(2), 1]), Place(-7)]), Skeleton(Cache("sys_host_list"), [Place(0), Place(-2), Skeleton("v", [Place(5), "[]"]), Skeleton("v", [Place(-7), Place(-8)])]), Skeleton(Cache("sys_host_list"), [Place(1), Place(-3), Skeleton("v", [Place(5), Place(6)]), Skeleton("v", [Place(-8), Place(-1)])]), Skeleton(Cache("ir_clause_new"), [Place(6), Place(0), Place(1), Place(2), Place(3), Place(4)])], -1, "ir_clause"))
add("sys_host_make", 2, Clause(3, [Skeleton("ir_goal", [Place(-2)]), Place(-3)], [Skeleton(Cache("sys_host_list"), [Place(0), Place(-2), Compound("v", [0, "[]"]), Skeleton("v", [Place(-4), Place(-1)])]), Skeleton(Cache("ir_goal_new"), [Place(2), Place(0), Place(1)])], -1, "ir_goal"))
add("sys_host_list", 4, Clause(6, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("sys_host_instr"), [Place(0), Place(2), Place(4), Place(-6)]), Skeleton(Cache("sys_host_list"), [Place(1), Place(3), Place(4), Place(5)])], -1, "."))
add("sys_host_list", 4, Clause(2, ["[]", "[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
add("sys_host_instr", 4, Clause(5, [Skeleton("first_var", [Place(-1), Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("ir_place_new"), [-1, Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], 0, "first_var"))
add("sys_host_instr", 4, Clause(4, [Skeleton("first_var", [Place(-2), Place(-1)]), Place(-3), Place(-4), Place(-5)], [Skeleton(make_defined([Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_host_current_recycle"), [Skeleton(".", [Place(1), Place(-3)]), Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_set_recycle"), [Place(1), Place(2), Place(3)])], 0, NotImplemented), Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_host_current_max"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(0), 1]), Place(-2)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_host_set_max"), [Place(0), Place(1), Place(2)])], -1, NotImplemented)]), [Place(0), Place(2), Place(-4)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(0)]), 2]), Place(-2)]), Skeleton(Cache("ir_place_new"), [Place(0), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "first_var"))
add("sys_host_instr", 4, Clause(5, [Skeleton("var", [Place(-2), Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_current_recycle"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_host_set_recycle"), [Skeleton(".", [Place(3), Place(0)]), Place(2), Place(4)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-2), Place(-1), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(1), Place(3), Place(0), Place(-5)]), Skeleton(Cache("ir_place_new"), [Place(0), Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], -1, "var"))
add("sys_host_instr", 4, Clause(5, [Skeleton("functor", [Place(-2), Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("sys_host_const"), [Place(0), Place(-2)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_host_list"), [Place(1), Place(-3), Place(3), Place(-5)]), Skeleton(Cache("ir_skeleton_new"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], -1, "functor"))
add("sys_host_instr", 4, Clause(4, [Skeleton("const", [Place(-2)]), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_host_const"), [Place(0), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "const"))
add("sys_host_current_max", 3, Clause(2, [Place(-2), Skeleton("v", [Place(0), Place(-3)]), Skeleton("v", [Place(0), Place(1)])], [], -1, NotImplemented))
add("sys_host_set_max", 3, Clause(2, [Place(-2), Skeleton("v", [Place(-1), Place(-3)]), Skeleton("v", [Place(0), Place(1)])], [], -1, NotImplemented))
add("sys_host_current_recycle", 3, Clause(2, [Place(-2), Skeleton("v", [Place(-3), Place(0)]), Skeleton("v", [Place(1), Place(0)])], [], -1, NotImplemented))
add("sys_host_set_recycle", 3, Clause(2, [Place(-2), Skeleton("v", [Place(-3), Place(-1)]), Skeleton("v", [Place(1), Place(0)])], [], -1, NotImplemented))
add("sys_host_alternatives", 2, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)])], [Skeleton(Cache("sys_host_make"), [Place(0), Place(2)]), Skeleton(Cache("sys_host_alternatives"), [Place(1), Place(3)])], -1, "."))
add("sys_host_alternatives", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_host_const", 2, Clause(4, [Skeleton("functor", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_const"), [Place(1), Place(-3)]), Skeleton(Cache("sys_host_args"), [Place(2), Place(-4)]), Skeleton(Cache("=.."), [Place(3), Skeleton(".", [Place(1), Place(2)])])], 0, "functor"))
add("sys_host_const", 2, Clause(3, [Skeleton("link", [Place(-3)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_alternatives"), [Place(1), Place(-3)]), Skeleton(Cache("kb_make_defined"), [Place(1), Place(2)])], 0, "link"))
add("sys_host_const", 2, Clause(3, [Skeleton("site", [Place(-3)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_pred_site"), [Place(1), Place(2)])], 0, "site"))
add("sys_host_const", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_host_args", 2, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)])], [Skeleton(Cache("sys_host_const"), [Place(0), Place(2)]), Skeleton(Cache("sys_host_args"), [Place(1), Place(3)])], -1, "."))
add("sys_host_args", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_decode_body", 2, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)])], [Skeleton(Cache("sys_decode_callable"), [Place(0), Place(-2)]), Skeleton(Cache("sys_decode_goal"), [Place(0), Place(2)]), Skeleton(Cache("sys_decode_body"), [Place(1), Place(3)])], -1, "."))
add("sys_decode_body", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_decode_callable", 2, Clause(2, [Place(-3), Place(1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_decode_callable", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("functor"), [Place(1), Place(-5), Place(-1)]), Skeleton(Cache("ir_is_site"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(3), Place(-5)]), Skeleton(Cache("sys_decode_site"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_decode_callable", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_decode_site", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(3), Place(1)])])], 0, NotImplemented))
add("sys_decode_site", 3, Clause(1, [Place(-1), Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_decode_goal", 2, Clause(2, [Place(-3), Skeleton("call", [Place(1)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_decode_goal", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("functor"), [Place(1), Place(-5), Place(-1)]), Skeleton(Cache("kb_is_link"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_link"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_decode_goal", 2, Clause(3, [Skeleton("$EVAL", [Place(-3), Place(-4)]), Skeleton("is", [Place(2), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(2)])], 0, "$EVAL"))
add("sys_decode_goal", 2, Clause(5, [Skeleton("=:=", [Place(-3), Place(-4)]), Skeleton("=:=", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, "=:="))
add("sys_decode_goal", 2, Clause(5, [Skeleton("=\\=", [Place(-3), Place(-4)]), Skeleton("=\\=", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, "=\\="))
add("sys_decode_goal", 2, Clause(5, [Skeleton("<", [Place(-3), Place(-4)]), Skeleton("<", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, "<"))
add("sys_decode_goal", 2, Clause(5, [Skeleton(">", [Place(-3), Place(-4)]), Skeleton(">", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, ">"))
add("sys_decode_goal", 2, Clause(5, [Skeleton("=<", [Place(-3), Place(-4)]), Skeleton("=<", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, "=<"))
add("sys_decode_goal", 2, Clause(5, [Skeleton(">=", [Place(-3), Place(-4)]), Skeleton(">=", [Place(-5), Place(-6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(4)])], 0, ">="))
add("sys_decode_goal", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_decode_link", 2, Clause(3, [Place(-2), Skeleton("$ALT", [Place(-3)])], [Skeleton(Cache("findall"), [Place(-4), Skeleton("kb_clause_ref", [Place(0), 0, Place(2)]), Place(-4)]), Skeleton(Cache("sys_decode_alternatives"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
add("sys_decode_alternatives", 3, Clause(6, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Skeleton("$SEQ", [Place(-5), Place(-6)]), Place(-7)])], [Skeleton(Cache("kb_clause_data"), [Place(0), Place(2), Place(3), Place(-5)]), Skeleton(Cache("sys_decode_body"), [Place(3), Place(4)]), Skeleton(Cache("sys_decode_alternatives"), [Place(1), Place(2), Place(5)])], -1, "."))
add("sys_decode_alternatives", 3, Clause(0, ["[]", Place(-1), "[]"], [], -1, "[]"))
add("sys_decode_expr", 2, Clause(2, [Place(-3), Place(1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_decode_expr", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("functor"), [Place(1), Place(-5), Place(-1)]), Skeleton(Cache("ir_is_site"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(3), Place(-5)]), Skeleton(Cache("sys_decode_compute"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_decode_expr", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-3), Place(-2)])]), Skeleton(Cache("sys_decode_args"), [Place(0), Place(-2)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(1), Place(0)])])], 0, NotImplemented))
add("sys_decode_expr", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_decode_compute", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-1), Place(-3)])]), Skeleton(Cache("sys_decode_args"), [Place(1), Place(-3)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(3), Place(1)])])], 0, NotImplemented))
add("sys_decode_compute", 3, Clause(1, [Place(-1), Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_decode_args", 2, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton(".", [Place(-4), Place(-5)])], [Skeleton(Cache("sys_decode_expr"), [Place(0), Place(2)]), Skeleton(Cache("sys_decode_args"), [Place(1), Place(3)])], -1, "."))
add("sys_decode_args", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_untrans_body", 3, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_untrans_rest"), [Place(1), Place(0), Place(2), Place(3)])], -1, "."))
add("sys_untrans_body", 3, Clause(0, ["[]", Place(-1), "true"], [], -1, "[]"))
add("sys_untrans_rest", 4, Clause(6, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5), Skeleton(",", [Place(-6), Place(-7)])], [Skeleton(Cache("sys_untrans_goal"), [Place(2), Place(3), Place(4)]), Skeleton(Cache("sys_untrans_rest"), [Place(1), Place(0), Place(3), Place(5)])], -1, "."))
add("sys_untrans_rest", 4, Clause(3, ["[]", Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_untrans_goal"), [Place(0), Place(1), Place(2)])], -1, "[]"))
add("sys_untrans_goal", 3, Clause(4, [Skeleton("$ALT", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_untrans_alternatives"), [Place(1), Place(2), Place(3)])], 0, "$ALT"))
add("sys_untrans_goal", 3, Clause(3, [Skeleton("$CUT", [Place(-3)]), Skeleton("just", [Place(-4)]), "!"], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "$CUT"))
add("sys_untrans_goal", 3, Clause(1, [Place(-2), Place(-1), Place(0)], [], -1, NotImplemented))
add("sys_untrans_alternatives", 3, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_untrans_more"), [Place(1), Place(0), Place(2), Place(3)])], -1, "."))
add("sys_untrans_alternatives", 3, Clause(0, ["[]", Place(-1), "fail"], [], -1, "[]"))
add("sys_untrans_more", 4, Clause(7, [Skeleton(".", [Place(-2), Place(-3)]), Skeleton("$SEQ", [Place(-4), Place(-5)]), Place(-6), Skeleton(";", [Place(-7), Place(-8)])], [Skeleton(Cache("sys_untrans_alternative"), [Place(2), Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_untrans_more"), [Place(1), Place(0), Place(4), Place(6)])], -1, "."))
add("sys_untrans_more", 4, Clause(4, ["[]", Skeleton("$SEQ", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_untrans_alternative"), [Place(0), Place(1), Place(2), Place(3)])], -1, "[]"))
add("sys_untrans_alternative", 4, Clause(6, [Skeleton("just", [Place(-2)]), Place(-3), Place(-4), Skeleton("->", [Place(-5), Place(-6)])], [Skeleton(Cache("sys_untrans_split"), [Place(1), Place(0), Place(-2), Place(-3)]), Skeleton(Cache("sys_trans_mark"), [Place(-7), Place(0), Place(-2)]), Skeleton(Cache("sys_untrans_body"), [Place(0), Place(5), Place(3)]), Skeleton(Cache("sys_untrans_body"), [Place(1), Place(2), Place(4)])], -1, "just"))
add("sys_untrans_alternative", 4, Clause(3, ["nothing", Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_untrans_body"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("sys_untrans_ambiguity"), [Place(1), Place(2)])], -1, "nothing"))
add("sys_untrans_split", 4, Clause(4, [Skeleton(".", [Skeleton("$CUT", [Place(-3)]), Place(-4)]), Place(-5), "[]", Place(2)], [Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("sys_untrans_split", 4, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Place(0), Place(-2)]), Place(-5)], [Skeleton(Cache("sys_untrans_split"), [Place(1), Place(2), Place(0), Place(3)])], -1, "."))
add("sys_untrans_ambiguity", 2, Clause(3, [Skeleton("->", [Place(-3), Place(-4)]), Skeleton(";", [Skeleton("->", [Place(1), Place(2)]), "fail"])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "->"))
add("sys_untrans_ambiguity", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
run(Goal(1, [Skeleton(Cache("sys_get_locale"), [Place(-2)]), Skeleton(Cache("set_prolog_flag"), ["sys_locale", Place(0)])]))
run(Goal(1, [Skeleton(Cache("sys_get_args"), [Place(-2)]), Skeleton(Cache("set_prolog_flag"), ["argv", Place(0)])]))
add("include", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_file_relative"), [Place(0), Place(-2)]), Skeleton(Cache("file_property"), [Place(0), Skeleton("real_path", [Place(-2)])]), Skeleton(Cache("sys_include_file"), [Place(0)])], -1, NotImplemented))
add("sys_include_file", 1, Clause(1, ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_input"), [Place(-2)]), Skeleton(Cache("sys_include_stream"), ["user", Place(0)])], 0, "user"))
add("sys_include_file", 1, Clause(3, [Place(-3)], [Skeleton(Cache("current_prolog_flag"), ["foreign_ext", Place(-4)]), Skeleton(Cache("sub_atom"), [Place(1), Place(-1), Place(-1), 0, Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_include_native"), [Place(1), Place(-3)]), Skeleton(Cache("ir_object_current"), [Place(1), "module", Place(-3)]), Skeleton(Cache("os_invoke_main"), [Place(1)])], 0, NotImplemented))
add("sys_include_file", 1, Clause(2, [Place(-2)], [Skeleton(Cache("setup_once_cleanup"), [Skeleton("open", [Place(0), "read", Place(-3)]), Skeleton("sys_include_stream", [Place(0), Place(1)]), Skeleton("close", [Place(1)])])], -1, NotImplemented))
add("sys_include_native", 2, Clause(3, [Place(-3), Place(-4)], [Compound(Cache("current_prolog_flag"), ["import_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_import_promise"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("$YIELD"), [Place(2)])], 0, NotImplemented))
add("sys_include_native", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("os_import_sync"), [Place(0), Place(1)])], -1, NotImplemented))
add(".", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("member"), [Place(-4), Skeleton(".", [Place(0), Place(1)])]), Skeleton(Cache("ensure_loaded"), [Place(2)]), Cache("fail")], -1, NotImplemented))
add(".", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
add("ensure_loaded", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("ensure_loaded", 1, Clause(1, ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Compound(Cache("sys_include_file"), ["user"])], 0, "user"))
add("ensure_loaded", 1, Clause(2, [Place(-2)], [Skeleton(Cache("sys_file_relative"), [Place(0), Place(-2)]), Skeleton(Cache("dg_get_partition"), [Place(-3)]), Skeleton(make_defined([Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_srcprop"), [Place(1), Skeleton("sys_link", [Place(2)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("assertz"), [Skeleton("sys_srcprop", [Place(0), Skeleton("sys_link", [Place(1)])])])], -1, NotImplemented)]), [Place(1), Place(0)]), Skeleton(Cache("sys_ensure_file"), [Place(0)])], -1, NotImplemented))
add("sys_ensure_file", 1, Clause(2, [Place(-2)], [Skeleton(Cache("sys_prop_map"), [Place(0), Place(-2)]), Skeleton(Cache("ir_object_current"), [Place(0), "real_path", Place(-3)]), Skeleton(Cache("ir_object_current"), [Place(0), "last_modified", Place(-2)]), Skeleton(Cache("sys_check_file"), [Place(1), Place(0)])], -1, NotImplemented))
add("make", 0, Clause(0, [], [Cache("sys_make_unmark"), Compound(Cache("sys_replay_file"), ["user"]), Cache("sys_make_reclaim")], -1, NotImplemented))
add("sys_make_unmark", 0, Clause(2, [], [Skeleton(Cache("retract"), [Skeleton("sys_source", [Place(-2), Place(-3), 1])]), Skeleton(Cache("assertz"), [Skeleton("sys_source", [Place(0), Place(1), 0])]), Cache("fail")], -1, NotImplemented))
add("sys_make_unmark", 0, Clause(0, [], [], -1, NotImplemented))
add("sys_make_reclaim", 0, Clause(1, [], [Skeleton(Cache("retract"), [Skeleton("sys_source", [Place(-2), Place(-1), 0])]), Skeleton(Cache("sys_clear_file"), [Place(0)]), Cache("fail")], -1, NotImplemented))
add("sys_make_reclaim", 0, Clause(0, [], [], -1, NotImplemented))
add("sys_check_file", 2, Clause(5, [Place(-3), Place(-4)], [Skeleton(Cache("shield"), [Skeleton("sys_check_file2", [Place(1), Place(2), Place(-5), Place(-6)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_file3"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_check_file", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("sys_load_file"), [Place(0)])], -1, NotImplemented))
add("sys_check_file2", 4, Clause(4, [Place(-3), Place(-1), Place(-4), Place(-5)], [Skeleton(Cache("sys_source"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_check_file2", 4, Clause(2, [Place(-2), Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("assertz"), [Skeleton("sys_source", [Place(0), Place(1), 1])]), Cache("fail")], -1, NotImplemented))
add("sys_check_file3", 4, Clause(1, [Place(-1), Place(-1), Place(-1), 1], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_check_file3", 4, Clause(3, [Place(-3), Place(-4), Place(2), Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("shield"), [Skeleton(",", [Skeleton("retractall", [Skeleton("sys_source", [Place(1), Place(-1), Place(-1)])]), Skeleton("assertz", [Skeleton("sys_source", [Place(1), Place(2), 1])])])]), Skeleton(Cache("sys_replay_file"), [Place(1)])], 0, NotImplemented))
add("sys_check_file3", 4, Clause(2, [Place(-2), Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("shield"), [Skeleton(",", [Skeleton("retractall", [Skeleton("sys_source", [Place(0), Place(-1), Place(-1)])]), Skeleton("assertz", [Skeleton("sys_source", [Place(0), Place(1), 1])])])]), Skeleton(Cache("sys_clear_file"), [Place(0)]), Skeleton(Cache("sys_load_file"), [Place(0)])], -1, NotImplemented))
add("sys_load_file", 1, Clause(2, [Place(-2)], [Skeleton(Cache("setup_once_cleanup"), [Skeleton("sys_loading_begin", [Place(0), Place(-3)]), Skeleton("sys_include_file", [Place(0)]), Skeleton("sys_loading_end", [Place(1)])])], -1, NotImplemented))
add("sys_loading_begin", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("dg_get_partition"), [Place(1)]), Skeleton(Cache("dg_set_partition"), [Place(0)])], -1, NotImplemented))
add("sys_loading_end", 1, Clause(2, [Place(-2)], [Skeleton(Cache("dg_get_partition"), [Place(-3)]), Skeleton(Cache("dg_set_partition"), [Place(0)]), Skeleton(Cache("os_task_current"), [Place(-2)]), Skeleton(Cache("retractall"), [Skeleton("sys_lastpred", [Place(0), Place(-1), Place(-1)])]), Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(-1), Place(-1), Skeleton("sys_discontiguous", [Place(1)])])])], -1, NotImplemented))
add("sys_clear_file", 1, Clause(3, [Place(-2)], [Skeleton(Cache("retractall"), [Skeleton("sys_op", [Place(-1), Place(-1), Place(-1), Place(-1), Place(0)])]), Skeleton(Cache("retractall"), [Skeleton("sys_srcprop", [Place(0), Place(-1)])]), Skeleton(Cache("sys_predprop"), [Place(-3), Place(-4), Skeleton("sys_usage", [Place(0)])]), Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(-6)])]), Skeleton(Cache("\\=="), [Place(3), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_clear_file3"), [Place(1), Place(2), Place(3)])], 0, NotImplemented), Clause(2, [Place(-2), Place(-3), Place(-1)], [Skeleton(Cache("sys_clear_file2"), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(1), Place(2), Place(0)]), Cache("fail")], -1, NotImplemented))
add("sys_clear_file", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("sys_clear_file2", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(0), Place(1), Place(-1)])]), Skeleton(Cache("kb_pred_destroy"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_clear_file3", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_usage", [Place(2)])])]), Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_multifile", [Place(2)])])]), Skeleton(Cache("functor"), [Place(-5), Place(0), Place(1)]), Skeleton(Cache("kb_clause_ref"), [Place(3), 4, Place(-5)]), Skeleton(Cache("kb_clause_shard"), [Place(3), Place(2)]), Skeleton(Cache("kb_clause_remove"), [Place(0), Place(1), 1, Place(3)]), Cache("fail")], -1, NotImplemented))
add("sys_clear_file3", 3, Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
add("sys_replay_file", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_srcprop"), [Place(0), Skeleton("sys_link", [Place(-2)])]), Skeleton(Cache("sys_replay_file2"), [Place(0)]), Cache("fail")], -1, NotImplemented))
add("sys_replay_file", 1, Clause(0, [Place(-1)], [], -1, NotImplemented))
add("sys_replay_file2", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_trap"), [Skeleton("sys_ensure_file", [Place(0)]), Place(-2), Skeleton(";", [Skeleton(",", [Skeleton("sys_chain_head", [Place(0), Skeleton("error", [Skeleton("system_error", [Place(-1)]), Place(-1)])]), Skeleton("sys_raise", [Place(0)])]), Skeleton("sys_print_error", [Place(0)])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("kb_pred_touch"), ["sys_including", 3, 1])]))
add("sys_include_stream", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("os_task_current"), [Place(-4)]), Skeleton(Cache("setup_once_cleanup"), [Skeleton("asserta", [Skeleton("sys_including", [Place(0), Place(2), Place(1)])]), Skeleton("sys_include_lines", [Place(1)]), Skeleton("once", [Skeleton("retract", [Skeleton("sys_including", [Place(0), Place(2), Place(1)])])])])], -1, NotImplemented))
add("sys_include_lines", 1, Clause(2, [Place(-3)], [Cache("repeat"), Skeleton(Cache("sys_trap"), [Skeleton("sys_next_term", [Place(1)]), Place(-3), Skeleton(";", [Skeleton(",", [Skeleton("sys_chain_head", [Place(1), Skeleton("error", [Skeleton("system_error", [Place(-1)]), Place(-1)])]), Skeleton("sys_raise", [Place(1)])]), Skeleton(",", [Skeleton("sys_print_error", [Place(1)]), "fail"])])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_next_term", 1, Clause(3, [Place(-2)], [Skeleton(Cache("read_term"), [Place(0), Place(-2), Skeleton(".", [Skeleton("variable_names", [Place(-3)]), Skeleton(".", [Skeleton("singletons", [Place(-4)]), "[]"])])]), Skeleton(make_defined([Clause(2, [Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("=="), [Place(1), "end_of_file"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_expand_include"), [Place(0), Place(1), Place(2), Place(-4)]), Skeleton(Cache("sys_style_static"), [Place(2)]), Skeleton(Cache("sys_handle_static"), [Place(2)]), Cache("fail")], -1, NotImplemented)]), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_handle_static", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(-2)]), Skeleton(Cache("sys_assertz_static"), [Place(0)])], -1, NotImplemented))
add("sys_assertz_static", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_assertz_static", 1, Clause(4, [Place(-3)], [Skeleton(Cache("="), [Place(1), Skeleton("tr_clause", [Place(-1), Place(-4), Place(-1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(2), Place(-4), Place(-2)]), Skeleton(Cache("sys_pred_type"), [Place(2), Place(0), Place(-5)]), Skeleton(Cache("sys_encode_horn"), [Place(1), Place(-3), Place(3)]), Skeleton(Cache("sys_host_make"), [Place(1), Place(-3)]), Skeleton(Cache("ir_clause_add"), [Place(2), Place(0), Place(1), 1])], 0, "tr_clause"))
add("sys_assertz_static", 1, Clause(2, [Place(-3)], [Skeleton(Cache("="), [Place(1), Skeleton("tr_goal", [Place(-1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_horn"), [Place(1), Place(-3), 1]), Skeleton(Cache("sys_host_make"), [Place(1), Place(-3)]), Skeleton(Cache("ir_goal_run"), [Place(1)])], 0, "tr_goal"))
add("sys_assertz_static", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["tr_clause_or_goal", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_pred_type", 3, Clause(3, [Place(-3), Place(-4), 0], [Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("kb_link_flags"), [Place(2), Place(-4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_pred_type", 3, Clause(0, [Place(-1), Place(-1), 1], [], -1, NotImplemented))
add("sys_file_relative", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_file_relative", 2, Clause(3, [Skeleton("library", [Place(-3)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_liblet"), [Place(1), ".p", Place(2)])], 0, "library"))
add("sys_file_relative", 2, Clause(3, [Skeleton("foreign", [Place(-3)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_prolog_flag"), ["foreign_ext", Place(-2)]), Skeleton(Cache("sys_file_liblet"), [Place(1), Place(0), Place(2)])], 0, "foreign"))
add("sys_file_relative", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("sys_file_including"), [Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_combine"), [Place(3), Place(1), Place(2)])], 0, NotImplemented))
add("sys_file_relative", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("absolute_file_name"), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_file_liblet", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_file_struct"), [Place(0), Place(-2)]), Skeleton(Cache("atom_split"), [Place(-5), "", Skeleton(".", ["liblet/", Skeleton(".", [Place(0), Skeleton(".", [Place(1), "[]"])])])]), Skeleton(Cache("current_prolog_flag"), ["system_url", Place(-3)]), Skeleton(Cache("sys_file_combine"), [Place(1), Place(3), Place(2)])], -1, NotImplemented))
add("sys_file_including", 1, Clause(3, [Place(-3)], [Skeleton(Cache("os_task_current"), [Place(-4)]), Skeleton(Cache("sys_including"), [Place(1), Place(2), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("\\=="), [Place(1), "user"])], 0, NotImplemented))
add("sys_file_struct", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_file_struct", 2, Clause(4, [Skeleton("/", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_struct"), [Place(1), Place(-3)]), Skeleton(Cache("atom_split"), [Place(3), "", Skeleton(".", [Place(1), Skeleton(".", ["/", Skeleton(".", [Place(2), "[]"])])])])], 0, "/"))
add("sys_file_struct", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_file_struct", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["atom", Place(0)]), Place(-1)])])], -1, NotImplemented))
add("sys_expand_include", 4, Clause(1, [Place(-2), Place(-1), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_expand_include", 4, Clause(4, [Skeleton("?-", [Place(-3)]), Place(-4), Place(-1), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Skeleton(":-", [Skeleton("sys_query_unattended", [Place(1), Place(2)])])])], 0, "?-"))
add("sys_expand_include", 4, Clause(3, [Place(-2), Place(-1), Place(-3), Place(-4)], [Skeleton(Cache("sys_singleton_check"), [Place(1)]), Skeleton(Cache("expand_term"), [Place(0), Place(2)])], -1, NotImplemented))
add("expand_term", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("term_conversion"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("expand_term", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
add("sys_query_unattended", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("$MARK"), [Place(-5)]), Place(1), Skeleton(Cache("$MARK"), [Place(-3)]), Skeleton(Cache("sys_answer_show"), [Place(2)]), Skeleton(make_defined([Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$CUT"), [Place(3)]), Cache("sys_listing_period")], 0, NotImplemented), Clause(0, [Place(-1), Place(-1), Place(-1)], [Compound(Cache("put_atom"), [";"]), Cache("nl"), Cache("fail")], -1, NotImplemented)]), [Place(3), Place(1), Place(0)])], 0, NotImplemented))
add("sys_query_unattended", 2, Clause(0, [Place(-1), Place(-1)], [Compound(Cache("put_atom"), ["fail"]), Cache("sys_listing_period")], -1, NotImplemented))
add("sys_singleton_check", 1, Clause(2, [Skeleton(".", [Place(-2), Place(-3)])], [Skeleton(Cache("sys_assoc_keys"), [Skeleton(".", [Place(0), Place(1)]), Place(-3)]), Skeleton(Cache("="), [Place(-2), Skeleton("warning", [Skeleton("syntax_error", ["singleton_var", Place(1)]), Place(-1)])]), Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("sys_print_error"), [Place(0)])], -1, "."))
add("sys_singleton_check", 1, Clause(0, ["[]"], [], -1, "[]"))
add("sys_assoc_keys", 2, Clause(2, [Skeleton(".", [Skeleton("=", [Place(-2), Place(-1)]), Place(-3)]), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("sys_assoc_keys"), [Place(1), Place(0)])], -1, "."))
add("sys_assoc_keys", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("strings", 3, Clause(0, ["syntax_error.discontiguous_pred", "de", "Unterbrochenes Prädikat ~, entsprechend deklarieren."], [], -1, "syntax_error.discontiguous_pred"))
add("strings", 3, Clause(0, ["syntax_error.discontiguous_pred", "", "Discontiguous predicate ~, declare accordingly."], [], -1, "syntax_error.discontiguous_pred"))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["term_conversion", 2])]))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_horn", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_body", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_cut", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_disj", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_alternative", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_trans_mark", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_encode_horn", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_encode_alternatives", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_body", 6])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_goal", 7])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_invoke", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_args", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_expr", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_compute", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_list", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_term", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_const_functor", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_const_only", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ast_var", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_dcg", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_set_dcg", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_idx_value", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_idx_value_arg", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_idx_value_term", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["eq_contains", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["eq_intersection", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_callable", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["open", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["close", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["stream_property", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["term_variables", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["is", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["call", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["true", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["!", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), [",", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), [";", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["->", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["\\=", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["\\+", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["once", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["repeat", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["catch", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_error_handler", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_chain_head", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["throw", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_fill_stack", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_fetch_stack", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["ignore", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["chain", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_chain_error", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_chain_raise", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_chain_concat", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["abort", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["once_cleanup", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["setup_once_cleanup", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_setup_once_cleanup", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_once_cleanup", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_error", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_error", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_trace", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_frame", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_message", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_message", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_print_message", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_inter_polate", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_zipper_output", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_string", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_string", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_locale_ancestor", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_atom", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_integer", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["call_later", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_frost_horn", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_call_print", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["create_task", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sleep", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["time_out", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_timeout", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["member", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_member", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["select", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_select", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["findall", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_findall", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["list_to_set", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_list_to_set", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["reverse", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_reverse", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["append", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["length", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_length", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_length", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["number_codes", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["between", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_between", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_lastpred", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_update_last", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_style_static", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_style_head", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_style_indicator", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_usage_predicate", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["discontiguous", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["multifile", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_multifile_safe", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_source", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_srcprop", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["current_source", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["source_property", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_emulated", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["set_prolog_flag", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_prolog_flag_set", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_codes", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["current_prolog_flag", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_prolog_flag_get", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_prolog_flag_decode", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["statistics", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_stat_get", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["statistics", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_stat", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["time", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_time_set", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_time_show", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["try_call_finally", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sub_atom", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["last_sub_atom", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op", 5])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["current_op", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["op", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_priority", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_retract", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_assert", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_space", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_format", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_format2", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_op_format3", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["term_conversion", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_phrase_expansion", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_list_expansion", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["absolute_file_name", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_file_combine", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["is_absolute_file_name", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["file_directory_name", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["file_base_name", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["dynamic", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["asserta", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_asserta", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["assertz", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_assertz", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["clause", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["retract", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["retractall", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["abolish", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_abolish", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_predprop", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["current_predicate", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["predicate_property", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_predprop_pattern", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_predprop_get", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_predprop_flag", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_make", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_list", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_instr", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_current_max", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_set_max", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_current_recycle", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_set_recycle", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_alternatives", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_const", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_host_args", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_body", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_callable", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_site", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_goal", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_link", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_alternatives", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_expr", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_compute", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_decode_args", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_body", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_rest", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_goal", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_alternatives", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_more", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_alternative", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_split", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_untrans_ambiguity", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["include", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_include_file", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_include_native", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), [".", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["ensure_loaded", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ensure_file", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["make", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_make_unmark", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_make_reclaim", 0])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_file", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_file2", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_check_file3", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_load_file", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_loading_begin", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_loading_end", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_clear_file", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_clear_file2", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_clear_file3", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_replay_file", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_replay_file2", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_including", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_include_stream", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_include_lines", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_next_term", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_handle_static", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_assertz_static", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_pred_type", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_file_relative", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_file_liblet", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_file_including", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_file_struct", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_expand_include", 4])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["expand_term", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_query_unattended", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_singleton_check", 1])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_assoc_keys", 2])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["nl", 0])]))
add("nl", 0, Clause(1, [], [Skeleton(Cache("current_output"), [Place(-2)]), Skeleton(Cache("put_code"), [Place(0), 10]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["nl", 1])]))
add("nl", 1, Clause(1, [Place(-2)], [Skeleton(Cache("put_code"), [Place(0), 10]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["flush_output", 0])]))
add("flush_output", 0, Clause(1, [], [Skeleton(Cache("current_output"), [Place(-2)]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["put_code", 1])]))
add("put_code", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("put_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_code", 1])]))
add("get_code", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_input"), [Place(-3)]), Skeleton(Cache("get_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_code", 2])]))
add("get_code", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("os_get_code"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("get_code", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_read_buffer"), [Place(1)]), Skeleton(Cache("os_get_code"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("get_code", 2, Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("="), [-1, Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["peek_code", 1])]))
add("peek_code", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_input"), [Place(-3)]), Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["peek_code", 2])]))
add("peek_code", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("os_peek_code"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("peek_code", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_read_buffer"), [Place(1)]), Skeleton(Cache("os_peek_code"), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("peek_code", 2, Clause(1, [Place(-1), Place(-2)], [Skeleton(Cache("="), [-1, Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_buffer", 1])]))
add("sys_read_buffer", 1, Clause(3, [Place(-3)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(-4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_read_promise"), [Place(1), Place(-3)]), Skeleton(Cache("$YIELD"), [Place(1)])], 0, NotImplemented))
add("sys_read_buffer", 1, Clause(1, [Place(-2)], [Skeleton(Cache("os_read_sync"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_atom", 2])]))
add("get_atom", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_input"), [Place(-4)]), Skeleton(Cache("get_atom"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_atom", 3])]))
add("get_atom", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("get_compress"), [Place(0), Place(-5)]), Skeleton(Cache("sys_get_atom"), [Place(3), Place(1), Place(0), Place(-2)]), Skeleton(Cache("atom_codes"), [Place(2), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_atom", 4])]))
add("sys_get_atom", 4, Clause(2, [-1, Place(-1), Place(-1), Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), ["[]", Place(1)])], 0, -1))
add("sys_get_atom", 4, Clause(3, [Place(-3), Place(1), Place(-1), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Skeleton(".", [Place(1), "[]"]), Place(2)])], 0, NotImplemented))
add("sys_get_atom", 4, Clause(4, [Place(-2), Place(-3), Place(-4), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("get_compress"), [Place(2), Place(-5)]), Skeleton(Cache("sys_get_atom"), [Place(3), Place(1), Place(2), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["get_compress", 2])]))
add("get_compress", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("os_stream_flags"), [Place(0), Place(-4)]), Skeleton(Cache("get_code"), [Place(0), Place(-5)]), Skeleton(Cache("sys_get_compress"), [Place(3), Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_compress", 4])]))
add("sys_get_compress", 4, Clause(2, [13, Place(-1), Place(-1), Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [10, Place(1)])], 0, 13))
add("sys_get_compress", 4, Clause(4, [10, Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(1), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("get_compress"), [Place(2), Place(3)])], 0, 10))
add("sys_get_compress", 4, Clause(1, [Place(-2), Place(-1), Place(-1), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["put_atom", 1])]))
add("put_atom", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("put_atom"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write", 1])]))
add("write", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("sys_write_term"), [Place(1), Place(0), "[]"])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write", 2])]))
add("write", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_write_term"), [Place(0), Place(1), "[]"])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["writeq", 1])]))
add("writeq", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("sys_write_term"), [Place(1), Place(0), Compound(".", [Compound("numbervars", ["true"]), Compound(".", [Compound("quoted", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["writeq", 2])]))
add("writeq", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_write_term"), [Place(0), Place(1), Compound(".", [Compound("numbervars", ["true"]), Compound(".", [Compound("quoted", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write_canonical", 1])]))
add("write_canonical", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("sys_write_term"), [Place(1), Place(0), Compound(".", [Compound("quoted", ["true"]), Compound(".", [Compound("ignore_ops", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write_canonical", 2])]))
add("write_canonical", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_write_term"), [Place(0), Place(1), Compound(".", [Compound("quoted", ["true"]), Compound(".", [Compound("ignore_ops", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write_term", 2])]))
add("write_term", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_output"), [Place(-4)]), Skeleton(Cache("sys_write_term"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["write_term", 3])]))
add("write_term", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_write_term"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["read", 1])]))
add("read", 1, Clause(3, [Place(-2)], [Skeleton(Cache("current_input"), [Place(-3)]), Skeleton(Cache("get_code"), [Place(1), Place(-4)]), Skeleton(Cache("sys_read_term"), [Place(2), Place(1), "[]", Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["read", 2])]))
add("read", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("get_code"), [Place(0), Place(-4)]), Skeleton(Cache("sys_read_term"), [Place(2), Place(0), "[]", Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["read_term", 2])]))
add("read_term", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("current_input"), [Place(-4)]), Skeleton(Cache("get_code"), [Place(2), Place(-5)]), Skeleton(Cache("sys_read_term"), [Place(3), Place(2), Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["read_term", 3])]))
add("read_term", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("get_code"), [Place(0), Place(-5)]), Skeleton(Cache("sys_read_term"), [Place(3), Place(0), Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["file_property", 2])]))
add("file_property", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prop_map"), [Place(1), Place(-3)]), Skeleton(Cache("member"), [Place(-2), Compound(".", ["last_modified", Compound(".", ["real_path", Compound(".", ["type", "[]"])])])]), Skeleton(Cache("ir_object_current"), [Place(1), Place(0), Place(-3)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(0), Skeleton(".", [Place(1), "[]"])])])], 0, NotImplemented))
add("file_property", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(-3), Skeleton(".", [Place(-4), "[]"])])]), Skeleton(Cache("sys_prop_map"), [Place(0), Place(-2)]), Skeleton(Cache("ir_object_current"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_prop_map", 2])]))
add("sys_prop_map", 2, Clause(3, [Place(-3), Place(-4)], [Compound(Cache("current_prolog_flag"), ["prop_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_prop_promise"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("$YIELD"), [Place(2)])], 0, NotImplemented))
add("sys_prop_map", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("os_prop_sync"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["strings", 3])]))
add("strings", 3, Clause(0, ["evaluation_error.float_overflow", "de", "Die Funktion überschreitet hier den Gleitpunktzahlbereich."], [], -1, "evaluation_error.float_overflow"))
add("strings", 3, Clause(0, ["evaluation_error.undefined", "de", "Die Funktion ist hier undefiniert."], [], -1, "evaluation_error.undefined"))
add("strings", 3, Clause(0, ["evaluation_error.zero_divisor", "de", "Nulldivision."], [], -1, "evaluation_error.zero_divisor"))
add("strings", 3, Clause(0, ["representation_error.int", "de", "Unerlaubte Int-Ganzzahl (nicht zwischen - 2^31 und 2^31-1)."], [], -1, "representation_error.int"))
add("strings", 3, Clause(0, ["domain_error.prolog_flag", "de", "Argument sollte ein Flag sein, gefunden ~."], [], -1, "domain_error.prolog_flag"))
add("strings", 3, Clause(0, ["domain_error.flag_value", "de", "Argument sollte ein Flagwert sein, gefunden ~."], [], -1, "domain_error.flag_value"))
add("strings", 3, Clause(0, ["domain_error.not_less_than_zero", "de", "Argument sollte positiv oder 0 sein, gefunden ~."], [], -1, "domain_error.not_less_than_zero"))
add("strings", 3, Clause(0, ["domain_error.operator_priority", "de", "Argument sollte ein Operatorlevel sein (kleiner oder gleich 1200), gefunden ~."], [], -1, "domain_error.operator_priority"))
add("strings", 3, Clause(0, ["domain_error.operator_specifier", "de", "Argument sollte ein Operatormode sein (fx, fy, xfx, yfx, xfy, xf, yf), gefunden ~."], [], -1, "domain_error.operator_specifier"))
add("strings", 3, Clause(0, ["type_error.atom", "de", "Argument sollte Atom sein, gefunden ~."], [], -1, "type_error.atom"))
add("strings", 3, Clause(0, ["type_error.number", "de", "Argument sollte Zahl sein, gefunden ~."], [], -1, "type_error.number"))
add("strings", 3, Clause(0, ["type_error.integer", "de", "Argument sollte Ganzzahl sein, gefunden ~."], [], -1, "type_error.integer"))
add("strings", 3, Clause(0, ["type_error.callable", "de", "Argument sollte aufrufbar sein (Atom oder Verbund), gefunden ~."], [], -1, "type_error.callable"))
add("strings", 3, Clause(0, ["type_error.atomic", "de", "Argument sollte atomar sein, gefunden ~."], [], -1, "type_error.atomic"))
add("strings", 3, Clause(0, ["type_error.list", "de", "Argument sollte Liste sein ([] oder [_|_]), gefunden ~."], [], -1, "type_error.list"))
add("strings", 3, Clause(0, ["type_error.evaluable", "de", "Argument sollte berechenbaren Funktor haben, gefunden ~."], [], -1, "type_error.evaluable"))
add("strings", 3, Clause(0, ["type_error.character", "de", "Argument sollte Zeichen sein, gefunden ~."], [], -1, "type_error.character"))
add("strings", 3, Clause(0, ["type_error.pair", "de", "Argument sollte Paar sein (_-_), gefunden ~."], [], -1, "type_error.pair"))
add("strings", 3, Clause(0, ["type_error.predicate_indicator", "de", "Argument sollte Prädikatspezifikation sein ( _/_), gefunden ~."], [], -1, "type_error.predicate_indicator"))
add("strings", 3, Clause(0, ["evaluation_error.float_overflow", "", "The function overflows the float range here."], [], -1, "evaluation_error.float_overflow"))
add("strings", 3, Clause(0, ["evaluation_error.undefined", "", "The function is undefined here."], [], -1, "evaluation_error.undefined"))
add("strings", 3, Clause(0, ["evaluation_error.zero_divisor", "", "Division by zero."], [], -1, "evaluation_error.zero_divisor"))
add("strings", 3, Clause(0, ["representation_error.int", "", "Illegal int integer (not between - 2^31 and 2^31-1)."], [], -1, "representation_error.int"))
add("strings", 3, Clause(0, ["domain_error.prolog_flag", "", "Argument should be a flag, found ~."], [], -1, "domain_error.prolog_flag"))
add("strings", 3, Clause(0, ["domain_error.flag_value", "", "Argument should be a flag value, found ~."], [], -1, "domain_error.flag_value"))
add("strings", 3, Clause(0, ["domain_error.not_less_than_zero", "", "Argument should be positive or 0, found ~."], [], -1, "domain_error.not_less_than_zero"))
add("strings", 3, Clause(0, ["domain_error.operator_priority", "", "Argument should be an operator level (less or equal 1200), found ~."], [], -1, "domain_error.operator_priority"))
add("strings", 3, Clause(0, ["domain_error.operator_specifier", "", "Argument should be an operator mode (fx, fy, xfx, yfx, xfy, xf, yf), found ~."], [], -1, "domain_error.operator_specifier"))
add("strings", 3, Clause(0, ["type_error.atom", "", "Argument should be an atom, found ~."], [], -1, "type_error.atom"))
add("strings", 3, Clause(0, ["type_error.number", "", "Argument should be a number, found ~."], [], -1, "type_error.number"))
add("strings", 3, Clause(0, ["type_error.integer", "", "Argument should be an integer, found ~."], [], -1, "type_error.integer"))
add("strings", 3, Clause(0, ["type_error.callable", "", "Argument should be callable (atom or compound), found ~."], [], -1, "type_error.callable"))
add("strings", 3, Clause(0, ["type_error.atomic", "", "Argument should be an atomic, found ~."], [], -1, "type_error.atomic"))
add("strings", 3, Clause(0, ["type_error.list", "", "Argument should be a list ([] or [_|_]), found ~."], [], -1, "type_error.list"))
add("strings", 3, Clause(0, ["type_error.evaluable", "", "Argument should have evaluable functor, found ~."], [], -1, "type_error.evaluable"))
add("strings", 3, Clause(0, ["type_error.character", "", "Argument should be a character, found ~."], [], -1, "type_error.character"))
add("strings", 3, Clause(0, ["type_error.pair", "", "Argument should be a pair (_-_), found ~."], [], -1, "type_error.pair"))
add("strings", 3, Clause(0, ["type_error.predicate_indicator", "", "Argument should be a predicate specification (_/_), found ~."], [], -1, "type_error.predicate_indicator"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_code_class", 2])]))
add("sys_code_class", 2, Clause(2, [44, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 44))
add("sys_code_class", 2, Clause(2, [40, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 40))
add("sys_code_class", 2, Clause(2, [41, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 41))
add("sys_code_class", 2, Clause(2, [124, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 124))
add("sys_code_class", 2, Clause(2, [91, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 91))
add("sys_code_class", 2, Clause(2, [93, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 93))
add("sys_code_class", 2, Clause(2, [123, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 123))
add("sys_code_class", 2, Clause(2, [125, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 125))
add("sys_code_class", 2, Clause(2, [59, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 59))
add("sys_code_class", 2, Clause(2, [33, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 33))
add("sys_code_class", 2, Clause(2, [39, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 39))
add("sys_code_class", 2, Clause(2, [96, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 96))
add("sys_code_class", 2, Clause(2, [34, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 34))
add("sys_code_class", 2, Clause(2, [37, Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 37))
add("sys_code_class", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("code_type"), [Place(0), Place(-2)]), Skeleton(Cache("sys_type_class"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_type_class", 2])]))
add("sys_type_class", 2, Clause(0, [0, "is_invalid"], [], -1, 0))
add("sys_type_class", 2, Clause(0, [1, "is_upper"], [], -1, 1))
add("sys_type_class", 2, Clause(0, [2, "is_ident"], [], -1, 2))
add("sys_type_class", 2, Clause(0, [3, "is_upper"], [], -1, 3))
add("sys_type_class", 2, Clause(0, [4, "is_ident"], [], -1, 4))
add("sys_type_class", 2, Clause(0, [5, "is_ident"], [], -1, 5))
add("sys_type_class", 2, Clause(0, [6, "is_ident"], [], -1, 6))
add("sys_type_class", 2, Clause(0, [7, "is_ident"], [], -1, 7))
add("sys_type_class", 2, Clause(0, [8, "is_ident"], [], -1, 8))
add("sys_type_class", 2, Clause(0, [9, "is_digit"], [], -1, 9))
add("sys_type_class", 2, Clause(0, [10, "is_ident"], [], -1, 10))
add("sys_type_class", 2, Clause(0, [11, "is_ident"], [], -1, 11))
add("sys_type_class", 2, Clause(0, [12, "is_blank"], [], -1, 12))
add("sys_type_class", 2, Clause(0, [13, "is_blank"], [], -1, 13))
add("sys_type_class", 2, Clause(0, [14, "is_blank"], [], -1, 14))
add("sys_type_class", 2, Clause(0, [15, "is_cntrl"], [], -1, 15))
add("sys_type_class", 2, Clause(0, [16, "is_cntrl"], [], -1, 16))
add("sys_type_class", 2, Clause(0, [18, "is_invalid"], [], -1, 18))
add("sys_type_class", 2, Clause(0, [19, "is_invalid"], [], -1, 19))
add("sys_type_class", 2, Clause(0, [20, "is_graphic"], [], -1, 20))
add("sys_type_class", 2, Clause(0, [21, "is_solo"], [], -1, 21))
add("sys_type_class", 2, Clause(0, [22, "is_solo"], [], -1, 22))
add("sys_type_class", 2, Clause(0, [23, "is_score"], [], -1, 23))
add("sys_type_class", 2, Clause(0, [24, "is_graphic"], [], -1, 24))
add("sys_type_class", 2, Clause(0, [25, "is_graphic"], [], -1, 25))
add("sys_type_class", 2, Clause(0, [26, "is_graphic"], [], -1, 26))
add("sys_type_class", 2, Clause(0, [27, "is_graphic"], [], -1, 27))
add("sys_type_class", 2, Clause(0, [28, "is_graphic"], [], -1, 28))
add("sys_type_class", 2, Clause(0, [29, "is_solo"], [], -1, 29))
add("sys_type_class", 2, Clause(0, [30, "is_solo"], [], -1, 30))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_name_class", 1])]))
add("sys_name_class", 1, Clause(0, ["is_ident"], [], -1, "is_ident"))
add("sys_name_class", 1, Clause(0, ["is_upper"], [], -1, "is_upper"))
add("sys_name_class", 1, Clause(0, ["is_score"], [], -1, "is_score"))
add("sys_name_class", 1, Clause(0, ["is_digit"], [], -1, "is_digit"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_white_class", 1])]))
add("sys_white_class", 1, Clause(0, ["is_blank"], [], -1, "is_blank"))
add("sys_white_class", 1, Clause(0, ["is_cntrl"], [], -1, "is_cntrl"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_token", 3])]))
add("sys_get_token", 3, Clause(5, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [Place(-5), Place(1), Place(-3)]), Skeleton(Cache("sys_code_class"), [Place(3), Place(-6)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_get_class"), [Place(4), Place(3), Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_class", 5])]))
add("sys_get_class", 5, Clause(5, ["is_ident", Place(-2), Skeleton("atom", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_name"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("atom_codes"), [Place(1), Skeleton(".", [Place(0), Place(4)])]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "is_ident"))
add("sys_get_class", 5, Clause(5, ["is_upper", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_name"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_make_variable"), [Skeleton(".", [Place(0), Place(4)]), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "is_upper"))
add("sys_get_class", 5, Clause(5, ["is_score", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_name"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_make_variable"), [Skeleton(".", [Place(0), Place(4)]), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "is_score"))
add("sys_get_class", 5, Clause(4, ["is_digit", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_get_number"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_digit"))
add("sys_get_class", 5, Clause(4, ["is_punct", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("char_code"), [Place(1), Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "is_punct"))
add("sys_get_class", 5, Clause(4, ["is_graphic", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_block_or_symbol"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_graphic"))
add("sys_get_class", 5, Clause(4, ["is_solo", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_get_line_or_solo"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_solo"))
add("sys_get_class", 5, Clause(4, ["is_invalid", Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_get_eof_or_error"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_invalid"))
add("sys_get_class", 5, Clause(3, ["is_blank", Place(-1), Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(-3)]), Skeleton(Cache("sys_get_token"), [Place(0), Place(1), Place(2)])], -1, "is_blank"))
add("sys_get_class", 5, Clause(3, ["is_cntrl", Place(-1), Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(-3)]), Skeleton(Cache("sys_get_token"), [Place(0), Place(1), Place(2)])], -1, "is_cntrl"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_eof_or_error", 4])]))
add("sys_get_eof_or_error", 4, Clause(3, [-1, "end_of_file", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_get_eof_or_error", 4, Clause(2, [Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["illegal_unicode"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_name", 3])]))
add("sys_get_name", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), Place(-3)]), Skeleton(Cache("sys_name_class"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_name"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_name", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_make_variable", 2])]))
add("sys_make_variable", 2, Clause(2, [Skeleton(".", [Place(-3), "[]"]), "anon"], [Skeleton(Cache("sys_code_class"), [Place(1), "is_score"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("sys_make_variable", 2, Clause(2, [Place(-2), Skeleton("var", [Place(-3)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_number", 4])]))
add("sys_get_number", 4, Clause(4, [48, Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_current_code"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_get_special"), [Place(0), Place(1), Place(2), Place(3)])], 0, 48))
add("sys_get_number", 4, Clause(3, [Place(-2), Skeleton("decimal", [Skeleton(".", [Place(0), Place(-2)])]), Place(-3), Place(-4)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(-3)]), Skeleton(Cache("sys_get_decimal"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_special", 4])]))
add("sys_get_special", 4, Clause(4, [120, Skeleton("radix", [Place(-3), 16]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 16, Place(2), Place(3)])], 0, 120))
add("sys_get_special", 4, Clause(4, [111, Skeleton("radix", [Place(-3), 8]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 8, Place(2), Place(3)])], 0, 111))
add("sys_get_special", 4, Clause(4, [98, Skeleton("radix", [Place(-3), 2]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 2, Place(2), Place(3)])], 0, 98))
add("sys_get_special", 4, Clause(4, [114, Skeleton("reference", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_name"), [Place(1), Place(2), Place(3)])], 0, 114))
add("sys_get_special", 4, Clause(4, [102, Skeleton("decimal", [Skeleton(".", [48, Skeleton(".", [102, Place(-3)])])]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_tolerant"), [Place(1), Place(2), Place(3)])], 0, 102))
add("sys_get_special", 4, Clause(4, [100, Skeleton("decimal", [Skeleton(".", [48, Skeleton(".", [100, Place(-3)])])]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_tolerant"), [Place(1), Place(2), Place(3)])], 0, 100))
add("sys_get_special", 4, Clause(4, [39, Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_current_code"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_get_code"), [Place(0), Place(1), Place(2), Place(3)])], 0, 39))
add("sys_get_special", 4, Clause(3, [Place(-1), Skeleton("decimal", [Skeleton(".", [48, Place(-2)])]), Place(-3), Place(-4)], [Skeleton(Cache("sys_get_decimal"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_code", 4])]))
add("sys_get_code", 4, Clause(4, [39, Skeleton("code", [Skeleton(".", [39, Place(-3)])]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_double"), [Place(1), Place(2), Place(3)])], 0, 39))
add("sys_get_code", 4, Clause(4, [92, Skeleton("code", [Skeleton(".", [92, Place(-3)])]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_current_code"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_get_escape"), [Place(0), Place(1), "[]", Place(2), Place(3)])], 0, 92))
add("sys_get_code", 4, Clause(3, [Place(-2), Skeleton("code", [Skeleton(".", [Place(0), "[]"])]), Place(-3), Place(-4)], [Skeleton(Cache("sys_get_char"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_double", 3])]))
add("sys_get_double", 3, Clause(3, [Compound(".", [39, "[]"]), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [39, Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], 0, "."))
add("sys_get_double", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_tolerant", 3])]))
add("sys_get_tolerant", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_tolerant"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_tolerant", 3, Clause(5, [Skeleton(".", [46, Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_code"), [46, Place(2), Place(-4)]), Skeleton(Cache("sys_at_code"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_code_class"), [Place(4), "is_digit"]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_fraction"), [Place(1), Place(2), Place(3)])], 0, "."))
add("sys_get_tolerant", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_is_expo"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_at_code"), [Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_is_sign_digit"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_exponent"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_tolerant", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_decimal", 3])]))
add("sys_get_decimal", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_decimal"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_decimal", 3, Clause(5, [Skeleton(".", [46, Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_code"), [46, Place(2), Place(-4)]), Skeleton(Cache("sys_at_code"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_code_class"), [Place(4), "is_digit"]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_fraction"), [Place(1), Place(2), Place(3)])], 0, "."))
add("sys_get_decimal", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_fraction", 3])]))
add("sys_get_fraction", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_fraction"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_fraction", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_is_expo"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_at_code"), [Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_is_sign_digit"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_exponent"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_fraction", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_exponent", 3])]))
add("sys_get_exponent", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_is_sign"), [Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_rest"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_exponent", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_get_rest"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_rest", 3])]))
add("sys_get_rest", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_rest"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_rest", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_expo", 1])]))
add("sys_is_expo", 1, Clause(0, [69], [], -1, 69))
add("sys_is_expo", 1, Clause(0, [101], [], -1, 101))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_sign_digit", 1])]))
add("sys_is_sign_digit", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_is_sign"), [Place(0)])], -1, NotImplemented))
add("sys_is_sign_digit", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_code_class"), [Place(0), "is_digit"])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_sign", 1])]))
add("sys_is_sign", 1, Clause(0, [45], [], -1, 45))
add("sys_is_sign", 1, Clause(0, [43], [], -1, 43))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_block_or_symbol", 4])]))
add("sys_get_block_or_symbol", 4, Clause(4, [47, Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_code"), [42, Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_skip_block"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_token"), [Place(1), Place(2), Place(3)])], 0, 47))
add("sys_get_block_or_symbol", 4, Clause(6, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_get_symbol"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_current_code"), [Place(-7), Place(2), Place(-4)]), Skeleton(Cache("sys_make_period"), [Place(5), Skeleton(".", [Place(0), Place(4)]), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_symbol", 3])]))
add("sys_get_symbol", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_graphic"]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_symbol"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_get_symbol", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_skip_block", 2])]))
add("sys_skip_block", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [42, Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_code"), [Place(1), Place(-3)]), Skeleton(Cache("sys_skip_end"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_skip_block", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_current_code"), [-1, Place(0), Place(-2)]), Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["end_of_file_in_block_comment"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_skip_block", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(-2)]), Skeleton(Cache("sys_skip_block"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_skip_end", 2])]))
add("sys_skip_end", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [47, Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_skip_end", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_skip_block"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_make_period", 3])]))
add("sys_make_period", 3, Clause(1, [37, Compound(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0, 37))
add("sys_make_period", 3, Clause(1, [-1, Compound(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0, -1))
add("sys_make_period", 3, Clause(2, [Place(-3), Compound(".", [46, "[]"]), "."], [Skeleton(Cache("sys_code_class"), [Place(1), Place(-3)]), Skeleton(Cache("sys_white_class"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_make_period", 3, Clause(2, [Place(-1), Place(-2), Skeleton("atom", [Place(-3)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_line_or_solo", 4])]))
add("sys_get_line_or_solo", 4, Clause(4, [39, Skeleton("single", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_quote"), [Place(1), 39, Place(2), Place(3)])], 0, 39))
add("sys_get_line_or_solo", 4, Clause(4, [96, Skeleton("back", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_quote"), [Place(1), 96, Place(2), Place(3)])], 0, 96))
add("sys_get_line_or_solo", 4, Clause(4, [34, Skeleton("codes", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_get_quote"), [Place(1), 34, Place(2), Place(3)])], 0, 34))
add("sys_get_line_or_solo", 4, Clause(4, [37, Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("sys_current_code"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_skip_line"), [Place(0), Place(2), Place(-4)]), Skeleton(Cache("sys_get_token"), [Place(1), Place(2), Place(3)])], 0, 37))
add("sys_get_line_or_solo", 4, Clause(4, [Place(-2), Skeleton("atom", [Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(-4)]), Skeleton(Cache("char_code"), [Place(1), Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_skip_line", 3])]))
add("sys_skip_line", 3, Clause(3, [10, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 10))
add("sys_skip_line", 3, Clause(3, [13, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 13))
add("sys_skip_line", 3, Clause(3, [-1, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_skip_line", 3, Clause(3, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(-2)]), Skeleton(Cache("sys_current_code"), [Place(-4), Place(0), Place(-2)]), Skeleton(Cache("sys_skip_line"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_quote", 4])]))
add("sys_get_quote", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(2), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_more"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_get_quote", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [92, Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_cont"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_get_quote", 4, Clause(5, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(0), Place(3), Place(-5)]), Skeleton(Cache("sys_get_char"), [Place(0), Place(3), Place(-5)]), Skeleton(Cache("sys_get_quote"), [Place(1), Place(2), Place(3), Place(4)])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_more", 4])]))
add("sys_get_more", 4, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(1), Place(-5), Place(-6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_quote"), [Place(2), Place(1), Place(3), Place(4)])], 0, "."))
add("sys_get_more", 4, Clause(2, ["[]", Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_char", 3])]))
add("sys_get_char", 3, Clause(2, [10, Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["end_of_line_as_character"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, 10))
add("sys_get_char", 3, Clause(2, [13, Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["end_of_line_as_character"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, 13))
add("sys_get_char", 3, Clause(2, [-1, Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["unbalanced_quoted"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, -1))
add("sys_get_char", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_cont", 4])]))
add("sys_get_cont", 4, Clause(5, [Skeleton(".", [92, Place(-2)]), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_code"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_get_escape"), [Place(4), Place(0), Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_get_quote"), [Place(0), Place(1), Place(2), Place(3)])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_escape", 5])]))
add("sys_get_escape", 5, Clause(5, [13, Skeleton(".", [13, Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_skip"), [Place(1), Place(2), Place(3), Place(4)])], 0, 13))
add("sys_get_escape", 5, Clause(2, [-1, Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["illegal_escape"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, -1))
add("sys_get_escape", 5, Clause(5, [120, Skeleton(".", [120, Place(-3)]), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(-5)]), Skeleton(Cache("sys_get_radix"), [Place(1), Place(-3), 16, Place(3), Place(-5)]), Skeleton(Cache("sys_get_backslash"), [Place(1), Place(2), Place(3), Place(4)])], 0, 120))
add("sys_get_escape", 5, Clause(6, [Place(-3), Skeleton(".", [Place(1), Place(-4)]), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("sys_is_radix"), [Place(1), 8]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_next_code"), [Place(4), Place(-6)]), Skeleton(Cache("sys_get_radix"), [Place(2), Place(-4), 8, Place(4), Place(-6)]), Skeleton(Cache("sys_get_backslash"), [Place(2), Place(3), Place(4), Place(5)])], 0, NotImplemented))
add("sys_get_escape", 5, Clause(2, [Place(-2), Skeleton(".", [Place(0), Place(-2)]), Place(0), Place(-2), Place(-3)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_skip", 4])]))
add("sys_get_skip", 4, Clause(3, [Skeleton(".", [10, Place(-3)]), Place(1), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [10, Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], 0, "."))
add("sys_get_skip", 4, Clause(2, [Place(-2), Place(0), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_backslash", 4])]))
add("sys_get_backslash", 4, Clause(3, [Skeleton(".", [92, Place(-3)]), Place(1), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_code"), [92, Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], 0, "."))
add("sys_get_backslash", 4, Clause(2, [Place(-2), Place(0), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_get_radix", 5])]))
add("sys_get_radix", 5, Clause(7, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(5), Place(-7)]), Skeleton(Cache("sys_is_radix"), [Place(1), Place(4)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(-7)]), Skeleton(Cache("sys_get_radix"), [Place(2), Place(3), Place(4), Place(5), Place(6)])], 0, "."))
add("sys_get_radix", 5, Clause(2, [Place(-2), Place(0), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_radix", 2])]))
add("sys_is_radix", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("code_numeric"), [Place(0), Place(-2)]), Skeleton(Cache("=<"), [0, Place(0)]), Skeleton(Cache("<"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_meta", 1])]))
add("sys_is_meta", 1, Clause(0, [39], [], -1, 39))
add("sys_is_meta", 1, Clause(0, [96], [], -1, 96))
add("sys_is_meta", 1, Clause(0, [34], [], -1, 34))
add("sys_is_meta", 1, Clause(0, [92], [], -1, 92))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_escape", 2])]))
add("sys_is_escape", 2, Clause(0, [110, 10], [], -1, 110))
add("sys_is_escape", 2, Clause(0, [116, 9], [], -1, 116))
add("sys_is_escape", 2, Clause(0, [98, 8], [], -1, 98))
add("sys_is_escape", 2, Clause(0, [102, 12], [], -1, 102))
add("sys_is_escape", 2, Clause(0, [114, 13], [], -1, 114))
add("sys_is_escape", 2, Clause(0, [97, 7], [], -1, 97))
add("sys_is_escape", 2, Clause(0, [118, 11], [], -1, 118))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_code", 3])]))
add("sys_current_code", 3, Clause(2, [Place(-2), Skeleton("-", [Place(-3), Place(0)]), Skeleton("-", [Place(1), Place(0)])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_next_code", 2])]))
add("sys_next_code", 2, Clause(2, [Skeleton("-", [Place(-2), Place(-1)]), Skeleton("-", [Place(0), Place(-3)])], [Skeleton(Cache("get_code"), [Place(0), Place(1)])], -1, "-"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_at_code", 3])]))
add("sys_at_code", 3, Clause(3, [Place(-2), Skeleton("-", [Place(-3), Place(-4)]), Skeleton("-", [Place(1), Place(2)])], [Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_sync_throw", 3])]))
add("sys_sync_throw", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_sync_tokens"), [Place(1), Place(-3)]), Skeleton(Cache("sys_raise"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_sync_raise", 3])]))
add("sys_sync_raise", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_sync_tokens"), [Place(1), Place(-3)]), Skeleton(Cache("sys_raise"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_sync_tokens", 2])]))
add("sys_sync_tokens", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_current_token"), [".", Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_sync_tokens", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_current_token"), ["end_of_file", Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_sync_tokens", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("sys_sync_token"), [Place(0), Place(-2)]), Skeleton(Cache("sys_sync_tokens"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_sync_token", 2])]))
add("sys_sync_token", 2, Clause(5, [Skeleton("t", [Place(-1), Place(-2), Skeleton("r", [Place(-3), Place(-4)]), Place(-5)]), Skeleton("t", [Place(-6), Place(0), Skeleton("r", [Place(1), Place(-2)]), Place(3)])], [Skeleton(Cache("sys_get_token"), [Place(4), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [Place(-1), Place(0)])])], -1, "t"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_code", 2])]))
add("sys_safe_code", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("current_lastcode"), [Place(0), Place(-4)]), Skeleton(Cache("sys_safe_space"), [Place(0), Place(2), Place(1)]), Skeleton(Cache("put_code"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_atom", 2])]))
add("sys_safe_atom", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("atom_arg"), [0, Place(2), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_lastcode"), [Place(1), Place(-2)]), Skeleton(Cache("sys_safe_space"), [Place(1), Place(0), Place(3)]), Skeleton(Cache("put_atom"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_safe_atom", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_space", 3])]))
add("sys_safe_space", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_code_class"), [Place(2), Place(-6)]), Skeleton(Cache("sys_name_class"), [Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_name"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_safe_space", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_code_class"), [Place(2), "is_graphic"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_symbol"), [Place(1), Place(3)])], 0, NotImplemented))
add("sys_safe_space", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=:="), [Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_quote"), [Place(1), Place(3)])], 0, NotImplemented))
add("sys_safe_space", 3, Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_name", 3])]))
add("sys_safe_name", 3, Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("sys_code_class"), [Place(2), Place(-4)]), Skeleton(Cache("sys_name_class"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_name", 3, Clause(2, [Place(-3), 48, 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_name", 3, Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_symbol", 2])]))
add("sys_safe_symbol", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("sys_code_class"), [Place(2), "is_graphic"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_symbol", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_safe_quote", 2])]))
add("sys_safe_quote", 2, Clause(2, [Place(-3), 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(2, [Place(-3), 96], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(2, [Place(-3), 34], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_next_token", 2])]))
add("sys_next_token", 2, Clause(7, [Skeleton("t", [Place(-1), Place(-2), Skeleton("r", [Place(-3), Place(-4)]), Place(-5)]), Skeleton("t", [Place(-6), Place(0), Skeleton("r", [Place(1), Place(-7)]), Place(3)])], [Skeleton(Cache("sys_get_token"), [Place(-8), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [Place(-1), Place(5)])]), Skeleton(Cache("sys_trap"), [Skeleton("sys_convert_token", [Place(6), Place(4)]), Place(-6), Skeleton("sys_sync_raise", [Place(4), Skeleton("t", [Place(6), Place(0), Skeleton("r", [Place(1), Place(5)]), Place(3)]), Place(-1)])])], -1, "t"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_token", 2])]))
add("sys_convert_token", 2, Clause(3, [Skeleton("single", [Place(-3)]), Skeleton("atom", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(-2), Place(1), "[]"]), Skeleton(Cache("atom_codes"), [Place(2), Place(0)])], 0, "single"))
add("sys_convert_token", 2, Clause(3, [Skeleton("back", [Place(-3)]), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(-2), Place(1), "[]"]), Skeleton(Cache("sys_make_variable"), [Place(0), Place(2)])], 0, "back"))
add("sys_convert_token", 2, Clause(3, [Skeleton("decimal", [Place(-3)]), Skeleton("number", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(-2), Place(1)]), Skeleton(Cache("atom_number"), [Place(0), Place(2)])], 0, "decimal"))
add("sys_convert_token", 2, Clause(4, [Skeleton("radix", [Place(-3), Place(-4)]), Skeleton("radix", [Place(-5), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(-2), Place(1)]), Skeleton(Cache("atom_integer"), [Place(0), Place(2), Place(3)])], 0, "radix"))
add("sys_convert_token", 2, Clause(3, [Skeleton("reference", [Place(-3)]), Skeleton("reference", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(-2), Place(1)]), Skeleton(Cache("atom_reference"), [Place(0), Place(2)])], 0, "reference"))
add("sys_convert_token", 2, Clause(3, [Skeleton("codes", [Place(-3)]), Skeleton("codes", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(2), Place(1), "[]"])], 0, "codes"))
add("sys_convert_token", 2, Clause(3, [Skeleton("code", [Place(-3)]), Skeleton("code", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_code"), [Place(2), Place(1), "[]"])], 0, "code"))
add("sys_convert_token", 2, Clause(1, [Place(-2), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_quote", 3])]))
add("sys_convert_quote", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Place(-4)])]), Skeleton(Cache("sys_convert_sep"), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_convert_quote"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_convert_quote", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("sys_convert_char"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_convert_quote"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_convert_quote", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_sep", 2])]))
add("sys_convert_sep", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Skeleton(".", [13, Skeleton(".", [10, Place(1)])])])], -1, "."))
add("sys_convert_sep", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Skeleton(".", [10, Place(1)])])], -1, "."))
add("sys_convert_sep", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Skeleton(".", [13, Place(1)])])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_char", 3])]))
add("sys_convert_char", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Place(-4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_convert_escape"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_convert_char", 3, Clause(3, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Skeleton(".", [Place(-2), Place(-4)])]), Skeleton(Cache("sys_code_class"), [Place(0), "is_cntrl"]), Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["illegal_layout"]), Place(-1)])]), Skeleton(Cache("="), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_convert_char", 3, Clause(3, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Skeleton(".", [Place(-2), Place(-4)])]), Skeleton(Cache("sys_code_class"), [Place(0), "is_invalid"]), Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["illegal_unicode"]), Place(-1)])]), Skeleton(Cache("="), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_convert_char", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(0), Place(2)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_code", 3])]))
add("sys_convert_code", 3, Clause(3, [39, Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Skeleton(".", [39, Place(-3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_convert_double"), [Place(1), Place(2)])], 0, 39))
add("sys_convert_code", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_convert_char"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_double", 2])]))
add("sys_convert_double", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Skeleton(".", [39, Place(-3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_convert_double", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["doubling_missing"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_escape", 3])]))
add("sys_convert_escape", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [Place(-4), Place(-6)])]), Skeleton(Cache("sys_is_escape"), [Place(2), Place(1)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(6, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [Place(-4), Place(-6)])]), Skeleton(Cache("sys_is_radix"), [Place(2), 8]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_convert_radix"), [Place(-2), 8, Place(4), Place(-6)]), Skeleton(Cache("atom_codes"), [Place(-7), Skeleton(".", [Place(2), Place(0)])]), Skeleton(Cache("atom_integer"), [Place(5), 8, Place(1)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_convert_backslash"), [Place(4), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [120, Place(-4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_convert_radix"), [Place(-2), 16, Place(2), Place(-4)]), Skeleton(Cache("atom_codes"), [Place(-6), Place(0)]), Skeleton(Cache("atom_integer"), [Place(4), 16, Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_convert_backslash"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("="), [Place(2), Skeleton(".", [Place(1), Place(-4)])]), Skeleton(Cache("sys_is_meta"), [Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["illegal_escape"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_backslash", 2])]))
add("sys_convert_backslash", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Skeleton(".", [92, Place(-3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_convert_backslash", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("throw"), [Skeleton("error", [Compound("syntax_error", ["unbalanced_escape"]), Place(-1)])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_convert_radix", 4])]))
add("sys_convert_radix", 4, Clause(6, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("="), [Place(4), Skeleton(".", [Place(1), Place(-6)])]), Skeleton(Cache("sys_is_radix"), [Place(1), Place(3)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_convert_radix"), [Place(2), Place(3), Place(4), Place(5)])], 0, "."))
add("sys_convert_radix", 4, Clause(2, ["[]", Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_opts", 3])]))
add("sys_write_opts", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_write_opts", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_opt"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_write_opts"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_write_opts", 3, Clause(2, ["[]", Place(-3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_write_opts", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_opt", 3])]))
add("sys_write_opt", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_write_opt", 3, Clause(4, [Skeleton("variable_names", [Place(-3)]), Skeleton("v", [Place(-1), Place(-4), Place(-5)]), Skeleton("v", [Place(1), Place(2), Place(3)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_variable_names"), [Place(1)])], 0, "variable_names"))
add("sys_write_opt", 3, Clause(5, [Skeleton("quoted", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-6)]), Skeleton("v", [Place(2), Place(-4), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 1, Place(3), Place(2)])], 0, "quoted"))
add("sys_write_opt", 3, Clause(5, [Skeleton("ignore_ops", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-6)]), Skeleton("v", [Place(2), Place(-4), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 2, Place(3), Place(2)])], 0, "ignore_ops"))
add("sys_write_opt", 3, Clause(5, [Skeleton("format", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-6)]), Skeleton("v", [Place(2), Place(-4), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 4, Place(3), Place(2)])], 0, "format"))
add("sys_write_opt", 3, Clause(5, [Skeleton("numbervars", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-6)]), Skeleton("v", [Place(2), Place(-4), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 8, Place(3), Place(2)])], 0, "numbervars"))
add("sys_write_opt", 3, Clause(5, [Skeleton("annotation", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-6)]), Skeleton("v", [Place(2), Place(-4), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 16, Place(3), Place(2)])], 0, "annotation"))
add("sys_write_opt", 3, Clause(4, [Skeleton("priority", [Place(-3)]), Skeleton("v", [Place(-4), Place(-5), Place(-1)]), Skeleton("v", [Place(2), Place(3), Place(1)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_integer"), [Place(1)])], 0, "priority"))
add("sys_write_opt", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["write_option", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_variable_names", 1])]))
add("sys_write_variable_names", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_write_variable_names", 1, Clause(3, [Skeleton(".", [Place(-3), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_variable_name"), [Place(1)]), Skeleton(Cache("sys_write_variable_names"), [Place(2)])], 0, "."))
add("sys_write_variable_names", 1, Clause(1, ["[]"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_write_variable_names", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_variable_name", 1])]))
add("sys_write_variable_name", 1, Clause(1, [Place(-2)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_write_variable_name", 1, Clause(2, [Skeleton("=", [Place(-3), Place(-1)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)])], 0, "="))
add("sys_write_variable_name", 1, Clause(1, [Place(-2)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["variable_name", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_opts", 3])]))
add("sys_read_opts", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_read_opts", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_read_opt"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("sys_read_opts"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_read_opts", 3, Clause(2, ["[]", Place(-3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_read_opts", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_opt", 3])]))
add("sys_read_opt", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_read_opt", 3, Clause(2, [Skeleton("variable_names", [Place(-1)]), Place(-3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "variable_names"))
add("sys_read_opt", 3, Clause(2, [Skeleton("singletons", [Place(-1)]), Place(-3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "singletons"))
add("sys_read_opt", 3, Clause(3, [Skeleton("priority", [Place(-3)]), Skeleton("z", [Place(-1), Place(-4)]), Skeleton("z", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_integer"), [Place(1)])], 0, "priority"))
add("sys_read_opt", 3, Clause(4, [Skeleton("annotation", [Place(-3)]), Skeleton("z", [Place(-4), Place(-5)]), Skeleton("z", [Place(2), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 16, Place(3), Place(2)])], 0, "annotation"))
add("sys_read_opt", 3, Clause(1, [Place(-2), Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["read_option", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_results", 2])]))
add("sys_read_results", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_read_results", 2, Clause(4, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_read_result"), [Place(1), Place(3)]), Skeleton(Cache("sys_read_results"), [Place(2), Place(3)])], 0, "."))
add("sys_read_results", 2, Clause(1, ["[]", Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_read_results", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_result", 2])]))
add("sys_read_result", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_read_result", 2, Clause(3, [Skeleton("variable_names", [Place(-3)]), Skeleton("s", [Place(-4), Place(-1)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("reverse"), [Place(2), Place(1)])], 0, "variable_names"))
add("sys_read_result", 2, Clause(3, [Skeleton("singletons", [Place(-3)]), Skeleton("s", [Place(-1), Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("reverse"), [Place(2), Place(1)])], 0, "singletons"))
add("sys_read_result", 2, Clause(1, [Skeleton("priority", [Place(-1)]), Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "priority"))
add("sys_read_result", 2, Clause(1, [Skeleton("annotation", [Place(-1)]), Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "annotation"))
add("sys_read_result", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["read_option", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_opt_boolean", 4])]))
add("sys_opt_boolean", 4, Clause(1, [Place(-2), Place(-1), Place(-1), Place(-1)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", Place(-1)])])], -1, NotImplemented))
add("sys_opt_boolean", 4, Clause(4, ["true", Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(2), Place(1)]), Place(3)])], 0, "true"))
add("sys_opt_boolean", 4, Clause(4, ["false", Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(2), Skeleton(Cache("\\"), [Place(1)])]), Place(3)])], 0, "false"))
add("sys_opt_boolean", 4, Clause(1, [Place(-2), Place(-1), Place(-1), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["boolean", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_atom", 1])]))
add("sys_proper_atom", 1, Clause(3, [Skeleton(".", [Place(-2), Place(-3)])], [Skeleton(Cache("sys_code_class"), [Place(0), Place(-4)]), Skeleton(Cache("sys_proper_atom"), [Place(2), Skeleton(".", [Place(0), Place(1)])])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_atom", 2])]))
add("sys_proper_atom", 2, Clause(1, ["is_ident", Skeleton(".", [Place(-1), Place(-2)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_ident"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Compound(".", [46, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Skeleton(".", [47, Skeleton(".", [42, Place(-1)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Skeleton(".", [Place(-1), Place(-2)])], [Skeleton(Cache("sys_proper_atom_graphic"), [Place(0)])], -1, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Compound(".", [39, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Compound(".", [96, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Compound(".", [34, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Compound(".", [37, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(0, ["is_solo", Skeleton(".", [Place(-1), "[]"])], [], -1, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_punct", Compound(".", [91, Compound(".", [93, "[]"])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "is_punct"))
add("sys_proper_atom", 2, Clause(0, ["is_punct", Compound(".", [123, Compound(".", [125, "[]"])])], [], -1, "is_punct"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_atom_name", 1])]))
add("sys_proper_atom_name", 1, Clause(3, [Skeleton(".", [Place(-3), Place(-4)])], [Skeleton(Cache("sys_code_class"), [Place(1), Place(-3)]), Skeleton(Cache("sys_name_class"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_proper_atom_name"), [Place(2)])], 0, "."))
add("sys_proper_atom_name", 1, Clause(0, ["[]"], [], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_atom_graphic", 1])]))
add("sys_proper_atom_graphic", 1, Clause(3, [Skeleton(".", [Place(-3), Place(-4)])], [Skeleton(Cache("sys_code_class"), [Place(1), "is_graphic"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_proper_atom_graphic"), [Place(2)])], 0, "."))
add("sys_proper_atom_graphic", 1, Clause(0, ["[]"], [], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_escape_codes", 3])]))
add("sys_escape_codes", 3, Clause(4, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_escape_code"), [Place(0), Place(2), Place(-4)]), Skeleton(Cache("sys_escape_codes"), [Place(1), Place(2), Place(3)])], -1, "."))
add("sys_escape_codes", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_escape_code", 3])]))
add("sys_escape_code", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_is_escape"), [Place(-6), Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Skeleton(".", [Place(4), Place(3)])])])], 0, NotImplemented))
add("sys_escape_code", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_is_meta"), [Place(1)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Skeleton(".", [Place(1), Place(3)])])])], 0, NotImplemented))
add("sys_escape_code", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_code_class"), [Place(1), "is_cntrl"]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_escape_code2"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_escape_code", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_code_class"), [Place(1), "is_invalid"]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_escape_code2"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_escape_code", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(0), Place(2)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_escape_code2", 3])]))
add("sys_escape_code2", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=<"), [Place(1), 511]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("atom_integer"), [Place(-2), 8, Place(1)]), Skeleton(Cache("atom_codes"), [Place(0), Place(-2)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Place(-4)])]), Skeleton(Cache("sys_escape_codes2"), [Place(0), Place(2), Place(-4)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Place(3)])])], 0, NotImplemented))
add("sys_escape_code2", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("atom_integer"), [Place(-5), 16, Place(0)]), Skeleton(Cache("atom_codes"), [Place(3), Place(-5)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [92, Skeleton(".", [120, Place(-3)])])]), Skeleton(Cache("sys_escape_codes2"), [Place(3), Place(1), Place(-3)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [92, Place(2)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_escape_codes2", 3])]))
add("sys_escape_codes2", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Place(1), Place(-3)])]), Skeleton(Cache("sys_escape_codes2"), [Place(2), Place(1), Place(4)])], 0, "."))
add("sys_escape_codes2", 3, Clause(2, ["[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_make_negative", 2])]))
add("sys_make_negative", 2, Clause(4, [Skeleton("$RDX", [Place(-3), Place(-4)]), Skeleton("$RDX", [Place(-5), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(1)]), Place(3)])], 0, "$RDX"))
add("sys_make_negative", 2, Clause(3, [Skeleton("$CHR", [Place(-3)]), Skeleton("$CHR", [Place(-4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(1)]), Place(2)])], 0, "$CHR"))
add("sys_make_negative", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(0)]), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["strings", 3])]))
add("strings", 3, Clause(0, ["syntax_error.illegal_number", "de", "Keine Nummer."], [], -1, "syntax_error.illegal_number"))
add("strings", 3, Clause(0, ["syntax_error.illegal_reference", "de", "Keine Referenz."], [], -1, "syntax_error.illegal_reference"))
add("strings", 3, Clause(0, ["syntax_error.illegal_layout", "de", "Unerlaubtes Druckbildzeichen in Zeichenkette."], [], -1, "syntax_error.illegal_layout"))
add("strings", 3, Clause(0, ["syntax_error.illegal_unicode", "de", "Unerlaubtes Unicodezeichen im Text."], [], -1, "syntax_error.illegal_unicode"))
add("strings", 3, Clause(0, ["syntax_error.doubling_missing", "de", "Anführungszeichen nicht zweifach."], [], -1, "syntax_error.doubling_missing"))
add("strings", 3, Clause(0, ["syntax_error.illegal_escape", "de", "Unerlaubte Steuersequenz in Zeichenkette."], [], -1, "syntax_error.illegal_escape"))
add("strings", 3, Clause(0, ["syntax_error.unbalanced_escape", "de", "Steuersequenz nicht abgeschlossen."], [], -1, "syntax_error.unbalanced_escape"))
add("strings", 3, Clause(0, ["syntax_error.end_of_file_in_block_comment", "de", "Blockkommentar nicht geschlossen."], [], -1, "syntax_error.end_of_file_in_block_comment"))
add("strings", 3, Clause(0, ["syntax_error.end_of_line_as_character", "de", "Unerlaubtes Zeilenende als Zeichen."], [], -1, "syntax_error.end_of_line_as_character"))
add("strings", 3, Clause(0, ["syntax_error.singleton_var", "de", "Alleinstehende Variable(n) ~, anonyme Variable(n) (_) benutzen."], [], -1, "syntax_error.singleton_var"))
add("strings", 3, Clause(0, ["syntax_error.bracket_balance", "de", "Rechte eckige Klammer (\"]\") fehlt."], [], -1, "syntax_error.bracket_balance"))
add("strings", 3, Clause(0, ["syntax_error.brace_balance", "de", "Rechte geschweifte Klammer (\"}\") fehlt."], [], -1, "syntax_error.brace_balance"))
add("strings", 3, Clause(0, ["syntax_error.parenthesis_balance", "de", "Rechte runde Klammer (\")\") fehlt."], [], -1, "syntax_error.parenthesis_balance"))
add("strings", 3, Clause(0, ["syntax_error.end_of_clause_expected", "de", "Überflüssiges Token."], [], -1, "syntax_error.end_of_clause_expected"))
add("strings", 3, Clause(0, ["syntax_error.operator_clash", "de", "Runde Klammer (\"(\") vor Operator fehlt."], [], -1, "syntax_error.operator_clash"))
add("strings", 3, Clause(0, ["syntax_error.cannot_start_term", "de", "Term fehlt."], [], -1, "syntax_error.cannot_start_term"))
add("strings", 3, Clause(0, ["existence_error.source_sink", "de", "Datei ~ nicht gefunden."], [], -1, "existence_error.source_sink"))
add("strings", 3, Clause(0, ["permission_error.open.source_sink", "de", "Kann Datei ~ nicht öffnen."], [], -1, "permission_error.open.source_sink"))
add("strings", 3, Clause(0, ["resource_error.io_exception", "de", "Datei nicht erstellt oder nicht zugreifbar."], [], -1, "resource_error.io_exception"))
add("strings", 3, Clause(0, ["resource_error.remote_error", "de", "Fehler von Entfernt erhalten."], [], -1, "resource_error.remote_error"))
add("strings", 3, Clause(0, ["resource_error.socket_timeout", "de", "Ein-/Ausgabeauszeit."], [], -1, "resource_error.socket_timeout"))
add("strings", 3, Clause(0, ["syntax_error.illegal_number", "", "Not a number."], [], -1, "syntax_error.illegal_number"))
add("strings", 3, Clause(0, ["syntax_error.illegal_reference", "", "Not a reference."], [], -1, "syntax_error.illegal_reference"))
add("strings", 3, Clause(0, ["syntax_error.illegal_layout", "", "Illegal layout character in string."], [], -1, "syntax_error.illegal_layout"))
add("strings", 3, Clause(0, ["syntax_error.illegal_unicode", "", "Illegal Unicode character in text."], [], -1, "syntax_error.illegal_unicode"))
add("strings", 3, Clause(0, ["syntax_error.doubling_missing", "", "Quote not doubled."], [], -1, "syntax_error.doubling_missing"))
add("strings", 3, Clause(0, ["syntax_error.illegal_escape", "", "Illegal escape sequence in string."], [], -1, "syntax_error.illegal_escape"))
add("strings", 3, Clause(0, ["syntax_error.unbalanced_escape", "", "Escape sequence not closed."], [], -1, "syntax_error.unbalanced_escape"))
add("strings", 3, Clause(0, ["syntax_error.end_of_file_in_block_comment", "", "Block comment not closed."], [], -1, "syntax_error.end_of_file_in_block_comment"))
add("strings", 3, Clause(0, ["syntax_error.end_of_line_as_character", "", "Illegal end of line as character."], [], -1, "syntax_error.end_of_line_as_character"))
add("strings", 3, Clause(0, ["syntax_error.singleton_var", "", "Singleton variable(s) ~, use anonymous variable(s) (_)."], [], -1, "syntax_error.singleton_var"))
add("strings", 3, Clause(0, ["syntax_error.bracket_balance", "", "Right bracket (\"]\") missing."], [], -1, "syntax_error.bracket_balance"))
add("strings", 3, Clause(0, ["syntax_error.brace_balance", "", "Right brace (\"}\") missing."], [], -1, "syntax_error.brace_balance"))
add("strings", 3, Clause(0, ["syntax_error.parenthesis_balance", "", "Right parenthesis (\")\") missing."], [], -1, "syntax_error.parenthesis_balance"))
add("strings", 3, Clause(0, ["syntax_error.end_of_clause_expected", "", "Superfluous token."], [], -1, "syntax_error.end_of_clause_expected"))
add("strings", 3, Clause(0, ["syntax_error.operator_clash", "", "Parenthesis (\"(\") before operator missing."], [], -1, "syntax_error.operator_clash"))
add("strings", 3, Clause(0, ["syntax_error.cannot_start_term", "", "Term missing."], [], -1, "syntax_error.cannot_start_term"))
add("strings", 3, Clause(0, ["existence_error.source_sink", "", "File ~ not found."], [], -1, "existence_error.source_sink"))
add("strings", 3, Clause(0, ["permission_error.open.source_sink", "", "Cannot open file ~."], [], -1, "permission_error.open.source_sink"))
add("strings", 3, Clause(0, ["resource_error.io_exception", "", "File not created or not accessible."], [], -1, "resource_error.io_exception"))
add("strings", 3, Clause(0, ["resource_error.remote_error", "", "Got error from remote."], [], -1, "resource_error.remote_error"))
add("strings", 3, Clause(0, ["resource_error.socket_timeout", "", "Input/output timeout."], [], -1, "resource_error.socket_timeout"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_infix", 3])]))
add("sys_is_infix", 3, Clause(0, ["xfx", 1, 1], [], -1, "xfx"))
add("sys_is_infix", 3, Clause(0, ["yfx", 0, 1], [], -1, "yfx"))
add("sys_is_infix", 3, Clause(0, ["xfy", 1, 0], [], -1, "xfy"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_prefix", 2])]))
add("sys_is_prefix", 2, Clause(0, ["fx", 1], [], -1, "fx"))
add("sys_is_prefix", 2, Clause(0, ["fy", 0], [], -1, "fy"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_is_postfix", 2])]))
add("sys_is_postfix", 2, Clause(0, ["xf", 1], [], -1, "xf"))
add("sys_is_postfix", 2, Clause(0, ["yf", 0], [], -1, "yf"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_term", 3])]))
add("sys_write_term", 3, Clause(5, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_write_opts"), [Place(2), Compound("v", ["[]", 0, 1200]), Skeleton("v", [Place(-4), Place(-5), Place(-6)])]), Skeleton(Cache("set_lastcode"), [Place(0), -1]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, Place(4), 0]), Skeleton("v", [Place(0), Place(3), Place(2)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_priority", 3])]))
add("sys_write_priority", 3, Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_var"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("number"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_number"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_atom"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("reference"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_symbol"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(6, [Skeleton("$RDX", [Place(-3), Place(-4)]), Skeleton("w", [Place(-5), Place(-1), Place(-1)]), Place(-6)], [Skeleton(Cache("sys_current_flags"), [Place(4), Place(-7)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(5), 16]), 0]), Skeleton(Cache("integer"), [Place(1)]), Skeleton(Cache("integer"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_radix"), [Place(-2), Place(2), Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-6)]), Skeleton(Cache("sys_put_nspace"), [Place(4), Place(3)]), Skeleton(Cache("sys_safe_atom"), [Place(4), Place(0)])], 0, "$RDX"))
add("sys_write_priority", 3, Clause(4, [Skeleton("$STR", [Place(-3)]), Place(-1), Place(-4)], [Skeleton(Cache("sys_current_flags"), [Place(2), Place(-5)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_string"), [Place(-2), Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(-4)]), Skeleton(Cache("sys_safe_atom"), [Place(2), Place(0)])], 0, "$STR"))
add("sys_write_priority", 3, Clause(5, [Skeleton("$CHR", [Place(-3)]), Skeleton("w", [Place(-4), Place(-1), Place(-1)]), Place(-5)], [Skeleton(Cache("sys_current_flags"), [Place(3), Place(-6)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(4), 16]), 0]), Skeleton(Cache("integer"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_char"), [Place(-2), Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(-5)]), Skeleton(Cache("sys_put_nspace"), [Place(3), Place(2)]), Skeleton(Cache("sys_safe_atom"), [Place(3), Place(0)])], 0, "$CHR"))
add("sys_write_priority", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_flags"), [Place(3), Place(-6)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(4), 2]), 0]), Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_compound"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Skeleton("w", [Place(-1), Place(-1), Place(-5)]), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-2)]), Skeleton(Cache("put_code"), [Place(0), 91]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 999, Place(3)]), Place(4)]), Skeleton(Cache("sys_write_list"), [Place(2), Place(3), Place(4)]), Skeleton(Cache("put_code"), [Place(0), 93])], 0, "."))
add("sys_write_priority", 3, Clause(4, [Skeleton("{}", [Place(-3)]), Skeleton("w", [Place(-1), Place(-1), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(-2)]), Skeleton(Cache("put_code"), [Place(0), 123]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 1200, Place(2)]), Place(3)]), Skeleton(Cache("put_code"), [Place(0), 125])], 0, "{}"))
add("sys_write_priority", 3, Clause(7, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("functor"), [Place(1), Place(-6), 1]), Skeleton(Cache("sys_op"), [Place(4), Place(-6), Place(-7), Place(-8), Place(-1)]), Skeleton(Cache("sys_is_prefix"), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_prefix"), [Place(1), Place(2), Place(3), Place(5), Place(6), Place(4)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(7, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("functor"), [Place(1), Place(-6), 1]), Skeleton(Cache("sys_op"), [Place(4), Place(-6), Place(-7), Place(-8), Place(-1)]), Skeleton(Cache("sys_is_postfix"), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_postfix"), [Place(1), Place(2), Place(3), Place(5), Place(6), Place(4)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(8, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("functor"), [Place(1), Place(-6), 2]), Skeleton(Cache("sys_op"), [Place(4), Place(-6), Place(-7), Place(-8), Place(-1)]), Skeleton(Cache("sys_is_infix"), [Place(4), Place(-6), Place(-9)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_infix"), [Place(1), Place(2), Place(3), Place(5), Place(6), Place(4), Place(7)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_write_compound"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_number", 3])]))
add("sys_write_number", 3, Clause(4, [Place(-3), Skeleton("w", [Place(-4), Place(-1), Place(-1)]), Place(-5)], [Skeleton(Cache("number"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_number"), [Place(-2), Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(-5)]), Skeleton(Cache("sys_put_nspace"), [Place(3), Place(2)]), Skeleton(Cache("sys_safe_atom"), [Place(3), Place(0)])], 0, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_atom", 3])]))
add("sys_write_atom", 3, Clause(5, [Place(-3), Skeleton("w", [Place(-4), Place(-1), Place(-1)]), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("sys_op"), [Place(1), Place(-6), Place(-1), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_prefix"), [Place(4), Place(-1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(-2)]), Skeleton(Cache("sys_put_lparen"), [Place(0), 1, 0, 1200, Place(2), Place(-1)]), Skeleton(Cache("sys_put_symbol"), [Place(1), Place(3)]), Skeleton(Cache("put_code"), [Place(0), 41])], 0, NotImplemented))
add("sys_write_atom", 3, Clause(2, [Place(-2), Place(-1), Place(-3)], [Skeleton(Cache("sys_put_symbol"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_prefix", 6])]))
add("sys_write_prefix", 6, Clause(12, [Place(-2), Skeleton("w", [Place(-3), Place(-4), Place(-5)]), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-2), Skeleton(".", [Place(-10), "[]"])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-11)]), Skeleton(Cache("sys_current_flags"), [Place(4), Place(-12)]), Skeleton(Cache("sys_put_lparen"), [Place(9), Place(7), Place(2), Place(5), Place(1), Place(-13)]), Skeleton(Cache("sys_put_adjust"), [Place(3), Place(10), Place(6), Place(-12)]), Skeleton(Cache("sys_oper_minus"), [Place(0), Place(11), Place(-13)]), Skeleton(Cache("sys_put_symbol"), [Place(0), Place(4)]), Skeleton(Cache("sys_put_rspace"), [Place(9), Place(6), Place(11), Place(-13)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(5), Place(7)]), Place(-8)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(11), Compound(Cache("\\"), [8])]), Place(-13)]), Skeleton(Cache("sys_write_priority"), [Place(8), Skeleton("w", [Place(11), Place(6), Place(10)]), Place(4)]), Skeleton(Cache("sys_put_rparen"), [Place(9), Place(7), Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_postfix", 6])]))
add("sys_write_postfix", 6, Clause(11, [Place(-2), Skeleton("w", [Place(-3), Place(-4), Place(-5)]), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-2), Skeleton(".", [Place(-10), "[]"])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-11)]), Skeleton(Cache("sys_put_lparen"), [Place(9), 1, Place(2), Place(5), Place(1), Place(-12)]), Skeleton(Cache("sys_oper_escape"), [Place(0), Place(10), Place(-12)]), Skeleton(Cache("sys_oper_side"), [Place(7), Place(10), Place(-12)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(5), Place(7)]), Place(-9)]), Skeleton(Cache("sys_write_priority"), [Place(8), Skeleton("w", [Place(10), Place(7), Place(3)]), Place(4)]), Skeleton(Cache("sys_put_lspace"), [Place(9), Place(6)]), Skeleton(Cache("sys_put_oper"), [Place(0), Place(4), Place(-1)]), Skeleton(Cache("sys_put_rparen"), [Place(9), 1, Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_infix", 7])]))
add("sys_write_infix", 7, Clause(15, [Place(-2), Skeleton("w", [Place(-3), Place(-4), Place(-5)]), Place(-6), Place(-7), Place(-8), Place(-9), Place(-10)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-2), Skeleton(".", [Place(-11), Skeleton(".", [Place(-12), "[]"])])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-13)]), Skeleton(Cache("sys_current_flags"), [Place(4), Place(-14)]), Skeleton(Cache("sys_put_lparen"), [Place(11), Place(8), Place(2), Place(5), Place(1), Place(-15)]), Skeleton(Cache("sys_put_indent"), [Place(11), Place(3), Place(12), Place(6), Place(8), Place(2), Place(5), Place(1), Place(-5)]), Skeleton(Cache("sys_oper_escape"), [Place(0), Place(13), Place(-16)]), Skeleton(Cache("sys_oper_side"), [Place(7), Place(14), Place(-16)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(5), Place(7)]), Place(-9)]), Skeleton(Cache("sys_write_priority"), [Place(9), Skeleton("w", [Place(14), Place(7), Place(3)]), Place(4)]), Skeleton(Cache("sys_put_lformat"), [Place(11), Place(3), Place(12), Place(6)]), Skeleton(Cache("sys_put_oper"), [Place(0), Place(4), Place(-2)]), Skeleton(Cache("sys_put_rformat"), [Place(11), Place(3), Place(12), Place(6), Place(0), Place(13)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(5), Place(8)]), Place(-2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(13), Compound(Cache("\\"), [14])]), Place(-15)]), Skeleton(Cache("sys_write_priority"), [Place(10), Skeleton("w", [Place(13), Place(0), Place(3)]), Place(4)]), Skeleton(Cache("sys_put_rparen"), [Place(11), Place(8), Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_list", 3])]))
add("sys_write_list", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(-2)]), Skeleton(Cache("put_code"), [Place(0), 124]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 999, Place(2)]), Place(3)])], 0, NotImplemented))
add("sys_write_list", 3, Clause(5, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(-2)]), Skeleton(Cache("put_atom"), [Place(0), ", "]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 999, Place(3)]), Place(4)]), Skeleton(Cache("sys_write_list"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_write_list", 3, Clause(1, ["[]", Place(-1), Place(-1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_write_list", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_stream"), [Place(2), Place(-5)]), Skeleton(Cache("put_code"), [Place(3), 124]), Skeleton(Cache("sys_write_priority"), [Place(0), Skeleton("w", [1, 999, Place(1)]), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_compound", 3])]))
add("sys_write_compound", 3, Clause(6, [Place(-2), Skeleton("w", [Place(-1), Place(-1), Place(-3)]), Place(-4)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-2), Skeleton(".", [Place(-5), Place(-6)])])]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(-7)]), Skeleton(Cache("sys_put_symbol"), [Place(0), Place(2)]), Skeleton(Cache("put_code"), [Place(5), 40]), Skeleton(Cache("sys_write_priority"), [Place(3), Skeleton("w", [1, 999, Place(1)]), Place(2)]), Skeleton(Cache("sys_write_args"), [Place(4), Place(1), Place(2)]), Skeleton(Cache("put_code"), [Place(5), 41])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_args", 3])]))
add("sys_write_args", 3, Clause(5, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_stream"), [Place(3), Place(-6)]), Skeleton(Cache("put_atom"), [Place(4), ", "]), Skeleton(Cache("sys_write_priority"), [Place(0), Skeleton("w", [1, 999, Place(2)]), Place(3)]), Skeleton(Cache("sys_write_args"), [Place(1), Place(2), Place(3)])], -1, "."))
add("sys_write_args", 3, Clause(0, ["[]", Place(-1), Place(-1)], [], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_atom_radix", 3])]))
add("sys_atom_radix", 3, Clause(3, [Place(-3), 16, Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_radix2"), [Place(1), 16, "0x", Place(2)])], 0, NotImplemented))
add("sys_atom_radix", 3, Clause(3, [Place(-3), 8, Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_radix2"), [Place(1), 8, "0o", Place(2)])], 0, NotImplemented))
add("sys_atom_radix", 3, Clause(3, [Place(-3), 2, Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_radix2"), [Place(1), 2, "0b", Place(2)])], 0, NotImplemented))
add("sys_atom_radix", 3, Clause(2, [Place(-2), Place(-1), Place(-3)], [Skeleton(Cache("atom_integer"), [Place(0), 10, Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_atom_radix2", 4])]))
add("sys_atom_radix2", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("=<"), [0, Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_integer"), [Place(-2), Place(2), Place(4)]), Skeleton(Cache("atom_split"), [Place(1), "", Skeleton(".", [Place(3), Skeleton(".", [Place(0), "[]"])])])], 0, NotImplemented))
add("sys_atom_radix2", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(4)]), Place(-6)]), Skeleton(Cache("atom_integer"), [Place(-2), Place(2), Place(4)]), Skeleton(Cache("atom_split"), [Place(1), "", Skeleton(".", ["-", Skeleton(".", [Place(3), Skeleton(".", [Place(0), "[]"])])])])], 0, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_atom_string", 2])]))
add("sys_atom_string", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("atom_codes"), [Place(1), Place(-3)]), Skeleton(Cache("sys_escape_codes"), [Place(1), Place(-3), Compound(".", [34, "[]"])]), Skeleton(Cache("atom_codes"), [Place(0), Skeleton(".", [34, Place(1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_atom_char", 2])]))
add("sys_atom_char", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("=<"), [Place(2), 1114111]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_code"), [Place(2), Place(-4), "[]"]), Skeleton(Cache("atom_codes"), [Place(1), Skeleton(".", [48, Skeleton(".", [39, Place(2)])])])], 0, NotImplemented))
add("sys_atom_char", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("=<"), [-1114111, Place(2)]), Skeleton(Cache("=<"), [Place(2), -1]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(2)]), Place(-4)]), Skeleton(Cache("sys_escape_code"), [Place(2), Place(-4), "[]"]), Skeleton(Cache("atom_codes"), [Place(1), Skeleton(".", [45, Skeleton(".", [48, Skeleton(".", [39, Place(2)])])])])], 0, NotImplemented))
add("sys_atom_char", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("atom_integer"), [Place(0), 10, Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_write_var", 2])]))
add("sys_write_var", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("sys_current_vars"), [Place(2), Place(-5)]), Skeleton(Cache("sys_find_var"), [Place(1), Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_flags"), [Place(2), Place(-2)]), Skeleton(Cache("sys_var_quoted"), [Place(3), Place(0), Place(-2)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(-4)]), Skeleton(Cache("sys_safe_atom"), [Place(2), Place(0)])], 0, NotImplemented))
add("sys_write_var", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("sys_current_stream"), [Place(1), Place(-3)]), Skeleton(Cache("sys_safe_code"), [Place(1), 95]), Skeleton(Cache("dg_var_serno"), [Place(0), Place(-2)]), Skeleton(Cache("atom_integer"), [Place(-4), 10, Place(0)]), Skeleton(Cache("put_atom"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_find_var", 3])]))
add("sys_find_var", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("member"), [Skeleton("=", [Place(3), Place(-5)]), Place(2)]), Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_var_quoted", 3])]))
add("sys_var_quoted", 3, Clause(3, [Place(-3), Place(-4), Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_var_quoted", 3, Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("atom_codes"), [Place(1), Place(-3)]), Skeleton(Cache("\\+"), [Skeleton("sys_proper_var", [Place(1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_codes"), [Place(1), Place(-3), Compound(".", [96, "[]"])]), Skeleton(Cache("atom_codes"), [Place(2), Skeleton(".", [96, Place(1)])])], 0, NotImplemented))
add("sys_var_quoted", 3, Clause(1, [Place(-2), Place(-1), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_var", 1])]))
add("sys_proper_var", 1, Clause(3, [Skeleton(".", [Place(-2), Place(-3)])], [Skeleton(Cache("sys_code_class"), [Place(0), Place(-4)]), Skeleton(Cache("sys_proper_var"), [Place(2), Skeleton(".", [Place(0), Place(1)])])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_proper_var", 2])]))
add("sys_proper_var", 2, Clause(1, ["is_upper", Skeleton(".", [Place(-1), Place(-2)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_upper"))
add("sys_proper_var", 2, Clause(1, ["is_score", Skeleton(".", [Place(-1), Place(-2)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_score"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_adjust", 4])]))
add("sys_put_adjust", 4, Clause(3, [Place(-3), Place(-4), Place(-1), Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_put_adjust", 4, Clause(4, [Place(-3), Place(-1), Place(-4), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 12]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(1), 3]), Place(3)])], 0, NotImplemented))
add("sys_put_adjust", 4, Clause(1, [Place(-2), Place(-1), Place(-1), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_indent", 9])]))
add("sys_put_indent", 9, Clause(3, [Place(-1), Place(-3), Place(-4), Place(-1), Place(-1), Place(-1), Place(-1), Place(-1), Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(3, [Place(-1), Place(-3), Place(-1), Place(-4), Place(-1), Place(-1), Place(-1), Place(-1), Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(4, [Place(-1), Place(-3), Place(-1), Place(-4), Place(-1), Place(-1), Place(-1), Place(-1), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 12]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(1), 3]), Place(3)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(8, [Place(-3), Place(-4), Place(-1), Place(-1), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("sys_needs_paren"), [Place(3), Place(4), Place(5), Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_spaces"), [Place(1), 2]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(2), 3]), Place(7)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(1, [Place(-1), Place(-2), Place(-1), Place(-1), Place(-1), Place(-1), Place(-1), Place(-1), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_lparen", 6])]))
add("sys_put_lparen", 6, Clause(7, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("sys_needs_paren"), [Place(2), Place(3), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_lparen2"), [Place(1), Place(5), Place(6)])], 0, NotImplemented))
add("sys_put_lparen", 6, Clause(1, [Place(-1), Place(-1), Place(-1), Place(-1), Place(-2), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_lparen2", 3])]))
add("sys_put_lparen2", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32]), Skeleton(Cache("put_code"), [Place(1), 40]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Skeleton(Cache("/\\"), [Place(2), Compound(Cache("\\"), [6])]), 1]), Place(3)])], 0, NotImplemented))
add("sys_put_lparen2", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("put_code"), [Place(0), 40]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(1), 1]), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_rparen", 5])]))
add("sys_put_rparen", 5, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("sys_needs_paren"), [Place(2), Place(3), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 41])], 0, NotImplemented))
add("sys_put_rparen", 5, Clause(0, [Place(-1), Place(-1), Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_needs_paren", 4])]))
add("sys_needs_paren", 4, Clause(3, [Place(-1), Place(-3), Place(-4), Place(-1)], [Skeleton(Cache("<"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_needs_paren", 4, Clause(1, [0, Place(-2), Place(0), Place(-2)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(0), 8]), 0])], -1, 0))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_lformat", 4])]))
add("sys_put_lformat", 4, Clause(4, [Place(-3), Place(-1), Place(-4), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_lspace"), [Place(1), Place(3)])], 0, NotImplemented))
add("sys_put_lformat", 4, Clause(3, [Place(-3), Place(-1), Place(-1), Place(-4)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 12]), 8]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_lspace"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_put_lformat", 4, Clause(2, [Place(-2), Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(1), 3]), Place(-3)]), Skeleton(Cache("nl"), [Place(0)]), Skeleton(Cache("sys_put_spaces"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_rformat", 6])]))
add("sys_put_rformat", 6, Clause(5, [Place(-3), Place(-1), Place(-4), Place(-5), Place(-1), Place(-6)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_rspace"), [Place(1), Place(3), Place(4), Place(-1)])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(4, [Place(-3), Place(-1), Place(-1), Place(-4), Place(-1), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_rspace"), [Place(1), Place(2), Place(3), Place(-1)])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(4, [Place(-3), Place(-4), Place(-1), Place(-5), Place(-1), Place(-1)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 12]), 8]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("nl"), [Place(1)]), Skeleton(Cache("sys_put_spaces"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(2, [Place(-2), Place(-1), Place(-1), Place(-1), Place(-3), Place(-1)], [Skeleton(Cache("atom_length"), [Place(1), Place(-3)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [3, Place(1)]), Place(-3)]), Skeleton(Cache("sys_put_spaces"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_spaces", 2])]))
add("sys_put_spaces", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache(">"), [Place(2), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(2), 1]), Place(-4)]), Skeleton(Cache("sys_put_spaces"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_put_spaces", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_lspace", 2])]))
add("sys_put_lspace", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_put_lspace", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_rspace", 4])]))
add("sys_put_rspace", 4, Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(3), Compound(Cache("\\"), [6])]), Place(4)])], 0, NotImplemented))
add("sys_put_rspace", 4, Clause(2, [Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(0), 2]), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_oper_side", 3])]))
add("sys_oper_side", 3, Clause(3, [0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(1), 8]), Place(2)])], 0, 0))
add("sys_oper_side", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(0), Compound(Cache("\\"), [8])]), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_oper_minus", 3])]))
add("sys_oper_minus", 3, Clause(3, ["-", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(1), 4]), Place(2)])], 0, "-"))
add("sys_oper_minus", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(0), Compound(Cache("\\"), [4])]), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_nspace", 2])]))
add("sys_put_nspace", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_code"), [Place(1), 32])], 0, NotImplemented))
add("sys_put_nspace", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_oper_escape", 3])]))
add("sys_oper_escape", 3, Clause(3, [",", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(1), 1]), Place(2)])], 0, ","))
add("sys_oper_escape", 3, Clause(3, ["|", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("\\/"), [Place(1), 1]), Place(2)])], 0, "|"))
add("sys_oper_escape", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("/\\"), [Place(0), Compound(Cache("\\"), [1])]), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_stream", 2])]))
add("sys_current_stream", 2, Clause(1, [Skeleton("v", [Place(-2), Place(-1), Place(-1)]), Place(0)], [], -1, "v"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_flags", 2])]))
add("sys_current_flags", 2, Clause(1, [Skeleton("v", [Place(-1), Place(-2), Place(-1)]), Place(0)], [], -1, "v"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_vars", 2])]))
add("sys_current_vars", 2, Clause(1, [Skeleton("v", [Place(-1), Place(-1), Place(-2)]), Place(0)], [], -1, "v"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_oper", 3])]))
add("sys_put_oper", 3, Clause(2, [",", Place(-3), ","], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(-3)]), Skeleton(Cache("put_code"), [Place(1), 44])], 0, ","))
add("sys_put_oper", 3, Clause(2, ["|", Place(-3), "|"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(-3)]), Skeleton(Cache("put_code"), [Place(1), 124])], 0, "|"))
add("sys_put_oper", 3, Clause(4, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_flags"), [Place(1), Place(-5)]), Skeleton(Cache("sys_symbol_quoted"), [Place(0), Place(3), Place(2)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(-3)]), Skeleton(Cache("sys_safe_atom"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_put_symbol", 2])]))
add("sys_put_symbol", 2, Clause(3, [Place(-2), Place(-3)], [Skeleton(Cache("sys_current_flags"), [Place(1), Place(-4)]), Skeleton(Cache("sys_symbol_quoted"), [Place(0), Place(2), Place(-4)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(-3)]), Skeleton(Cache("sys_safe_atom"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_symbol_quoted", 3])]))
add("sys_symbol_quoted", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("reference"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_reference_quoted"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_symbol_quoted", 3, Clause(3, [Place(-3), Place(-4), Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_symbol_quoted", 3, Clause(3, [Place(-3), Place(-1), Place(-4)], [Skeleton(Cache("atom_codes"), [Place(1), Place(-3)]), Skeleton(Cache("\\+"), [Skeleton("sys_proper_atom", [Place(1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_codes"), [Place(1), Place(-3), Compound(".", [39, "[]"])]), Skeleton(Cache("atom_codes"), [Place(2), Skeleton(".", [39, Place(1)])])], 0, NotImplemented))
add("sys_symbol_quoted", 3, Clause(1, [Place(-2), Place(-1), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_reference_quoted", 3])]))
add("sys_reference_quoted", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_reference"), [Place(3), Place(1)])], 0, NotImplemented))
add("sys_reference_quoted", 3, Clause(3, [Place(-2), Place(-1), Place(-3)], [Skeleton(Cache("atom_reference"), [Place(-4), Place(0)]), Skeleton(Cache("atom_concat"), ["0r", Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_term", 4])]))
add("sys_read_term", 4, Clause(6, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_read_opts"), [Place(2), Compound("z", [1200, 0]), Skeleton("z", [Place(-6), Place(-7)])]), Skeleton(Cache("sys_next_token"), [Skeleton("t", ["-", Place(5), Skeleton("r", [Place(1), Place(0)]), Compound("s", ["[]", "[]"])]), Place(-2)]), Skeleton(Cache("sys_read_optional"), [Place(-3), Place(4), Place(0), Skeleton("t", [Place(-1), Place(-1), Place(-1), Place(-2)])]), Skeleton(Cache("sys_read_results"), [Place(2), Place(0)]), Skeleton(Cache("="), [Place(3), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_optional", 4])]))
add("sys_read_optional", 4, Clause(3, ["end_of_file", Place(-1), Place(-3), Place(-4)], [Skeleton(Cache("sys_current_token"), ["end_of_file", Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "end_of_file"))
add("sys_read_optional", 4, Clause(4, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_read_priority"), [Place(0), Place(1), Place(2), Place(-4)]), Skeleton(Cache("sys_read_end"), [".", Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_priority", 4])]))
add("sys_read_priority", 4, Clause(7, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_token"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_read_factor"), [Place(4), Place(-6), Place(1), Place(-7), Place(2), Place(-4)]), Skeleton(Cache("sys_current_token"), [Place(-8), Place(2), Place(-4)]), Skeleton(Cache("sys_read_secondary"), [Place(6), Place(4), Place(0), Place(1), Place(5), Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_secondary", 7])]))
add("sys_read_secondary", 7, Clause(8, [Skeleton("atom", [Place(-3)]), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_read_infix"), [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)])], 0, "atom"))
add("sys_read_secondary", 7, Clause(8, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("="), [Place(1), ","]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_read_infix"), [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)])], 0, ","))
add("sys_read_secondary", 7, Clause(8, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("="), [Place(1), "|"]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_read_infix"), [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)])], 0, "|"))
add("sys_read_secondary", 7, Clause(2, [Place(-1), Place(-2), Place(0), Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_infix", 7])]))
add("sys_read_infix", 7, Clause(11, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("sys_op"), [Place(1), Place(-10), Place(-11), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_infix"), [Place(8), Place(-10), Place(-12)]), Skeleton(Cache(">="), [Place(4), Place(9)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_next_token"), [Place(6), Place(-8)]), Skeleton(make_defined([Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("<"), [Skeleton(Cache("-"), [Place(1), Place(2)]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["operator_clash"]), Place(-1)]), Place(4), Place(5)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(9), Place(8), Place(5), Place(6), Place(-8)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(9), Place(10)]), Place(-12)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_read_priority"), [Place(-7), Place(10), Place(6), Place(-8)]), Skeleton(Cache("=.."), [Place(-12), Skeleton(".", [Place(1), Skeleton(".", [Place(2), Skeleton(".", [Place(5), "[]"])])])]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_current_token"), [Place(-7), Place(6), Place(-8)]), Skeleton(Cache("sys_read_secondary"), [Place(5), Place(10), Place(3), Place(4), Place(9), Place(6), Place(7)])], 0, NotImplemented))
add("sys_read_infix", 7, Clause(10, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8), Place(-9)], [Skeleton(Cache("sys_op"), [Place(1), Place(-10), Place(-11), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_postfix"), [Place(8), Place(-10)]), Skeleton(Cache(">="), [Place(4), Place(9)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_next_token"), [Place(6), Place(-8)]), Skeleton(make_defined([Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("<"), [Skeleton(Cache("-"), [Place(1), Place(2)]), Place(3)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["operator_clash"]), Place(-1)]), Place(4), Place(5)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(9), Place(8), Place(5), Place(6), Place(-8)]), Skeleton(Cache("=.."), [Place(-7), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])])]), Skeleton(Cache("="), [Place(6), Place(-8)]), Skeleton(Cache("sys_current_token"), [Place(-4), Place(6), Place(-8)]), Skeleton(Cache("sys_read_secondary"), [Place(2), Place(5), Place(3), Place(4), Place(9), Place(6), Place(7)])], 0, NotImplemented))
add("sys_read_infix", 7, Clause(2, [Place(-1), Place(-2), Place(0), Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_lookup_var", 4])]))
add("sys_lookup_var", 4, Clause(6, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("sys_sys_current_vars"), [Place(-7), Place(3), Place(-5)]), Skeleton(Cache("member"), [Skeleton("=", [Place(1), Place(2)]), Place(5)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_remove_anon"), [Place(1), Place(3), Place(4)])], 0, NotImplemented))
add("sys_lookup_var", 4, Clause(5, [Place(-2), Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_sys_current_vars"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_set_vars"), [Skeleton(".", [Skeleton("=", [Place(0), Place(1)]), Place(4)]), Place(2), Place(-4)]), Skeleton(Cache("sys_current_anon"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("sys_set_anon"), [Skeleton(".", [Skeleton("=", [Place(0), Place(1)]), Place(4)]), Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_remove_anon", 3])]))
add("sys_remove_anon", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_anon"), [Place(-6), Place(2), Place(-4)]), Skeleton(Cache("select"), [Skeleton("=", [Place(1), Place(-1)]), Place(4), Place(-6)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_set_anon"), [Place(4), Place(2), Place(3)])], 0, NotImplemented))
add("sys_remove_anon", 3, Clause(2, [Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_token", 3])]))
add("sys_current_token", 3, Clause(4, [Place(-2), Skeleton("t", [Place(0), Place(-3), Place(-4), Place(-5)]), Skeleton("t", [Place(0), Place(1), Place(2), Place(3)])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_options", 3])]))
add("sys_current_options", 3, Clause(4, [Place(-2), Skeleton("t", [Place(-3), Place(0), Place(-4), Place(-5)]), Skeleton("t", [Place(1), Place(0), Place(2), Place(3)])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_reach_code", 3])]))
add("sys_reach_code", 3, Clause(5, [Place(-2), Skeleton("t", [Place(-3), Place(-4), Skeleton("r", [Place(-5), Place(0)]), Place(-6)]), Skeleton("t", [Place(1), Place(2), Skeleton("r", [Place(3), Place(0)]), Place(4)])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_sys_current_vars", 3])]))
add("sys_sys_current_vars", 3, Clause(5, [Place(-2), Skeleton("t", [Place(-3), Place(-4), Place(-5), Skeleton("s", [Place(0), Place(-6)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(0), Place(4)])])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_set_vars", 3])]))
add("sys_set_vars", 3, Clause(5, [Place(-2), Skeleton("t", [Place(-3), Place(-4), Place(-5), Skeleton("s", [Place(-1), Place(-6)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(0), Place(4)])])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_current_anon", 3])]))
add("sys_current_anon", 3, Clause(5, [Place(-2), Skeleton("t", [Place(-3), Place(-4), Place(-5), Skeleton("s", [Place(-6), Place(0)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), Place(0)])])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_set_anon", 3])]))
add("sys_set_anon", 3, Clause(5, [Place(-2), Skeleton("t", [Place(-3), Place(-4), Place(-5), Skeleton("s", [Place(-6), Place(-1)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), Place(0)])])], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_factor", 6])]))
add("sys_read_factor", 6, Clause(7, [Skeleton("atom", [Place(-3)]), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_reach_code"), [Place(-2), Place(5), Place(-7)]), Skeleton(Cache("sys_next_token"), [Place(5), Place(-7)]), Skeleton(Cache("sys_read_atom"), [Place(0), Place(1), Place(2), Place(3), Place(4), Place(5), Place(6)])], 0, "atom"))
add("sys_read_factor", 6, Clause(3, ["anon", Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "anon"))
add("sys_read_factor", 6, Clause(5, [Skeleton("var", [Place(-3)]), Place(-4), Place(-1), 0, Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_lookup_var"), [Place(1), Place(2), Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(4)])], 0, "var"))
add("sys_read_factor", 6, Clause(6, ["[", Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(-6)]), Skeleton(Cache("sys_current_token"), [Place(-2), Place(4), Place(-6)]), Skeleton(Cache("sys_read_list"), [Place(0), Place(1), Place(2), Place(3), Place(4), Place(5)])], 0, "["))
add("sys_read_factor", 6, Clause(6, ["{", Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(-6)]), Skeleton(Cache("sys_current_token"), [Place(-2), Place(4), Place(-6)]), Skeleton(Cache("sys_read_set"), [Place(0), Place(1), Place(2), Place(3), Place(4), Place(5)])], 0, "{"))
add("sys_read_factor", 6, Clause(4, ["(", Place(-3), Place(-1), 0, Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(-4)]), Skeleton(Cache("sys_read_priority"), [Place(1), 1200, Place(2), Place(-4)]), Skeleton(Cache("sys_read_end"), [")", Place(2), Place(-4)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(3)])], 0, "("))
add("sys_read_factor", 6, Clause(3, [Skeleton("number", [Place(-3)]), Place(1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "number"))
add("sys_read_factor", 6, Clause(4, [Skeleton("radix", [Place(-3), Place(-1)]), Place(1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("sys_current_options"), [Place(-5), Place(1), Place(-3)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "radix"))
add("sys_read_factor", 6, Clause(3, [Skeleton("radix", [Place(-3), Place(-4)]), Skeleton("$RDX", [Place(1), Place(2)]), Place(-1), 0, Place(-4), Place(-3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(1)])], 0, "radix"))
add("sys_read_factor", 6, Clause(3, [Skeleton("reference", [Place(-3)]), Place(1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "reference"))
add("sys_read_factor", 6, Clause(4, [Skeleton("codes", [Place(-3)]), Place(1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("sys_current_options"), [Place(-5), Place(1), Place(-3)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "codes"))
add("sys_read_factor", 6, Clause(5, [Skeleton("codes", [Place(-3)]), Skeleton("$STR", [Place(-4)]), Place(-1), 0, Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("atom_codes"), [Place(2), Place(1)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(4)])], 0, "codes"))
add("sys_read_factor", 6, Clause(4, [Skeleton("code", [Place(-3)]), Place(1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("sys_current_options"), [Place(-5), Place(1), Place(-3)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "code"))
add("sys_read_factor", 6, Clause(3, [Skeleton("code", [Place(-3)]), Skeleton("$CHR", [Place(1)]), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "code"))
add("sys_read_factor", 6, Clause(2, [Place(-1), Place(-1), Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["cannot_start_term"]), Place(-1)]), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_atom", 7])]))
add("sys_read_atom", 7, Clause(6, [40, Place(-3), Place(-4), Place(-1), 0, Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(-5)]), Skeleton(Cache("sys_read_priority"), [Place(-2), 999, Place(3), Place(-5)]), Skeleton(Cache("sys_current_token"), [Place(-7), Place(3), Place(-5)]), Skeleton(Cache("sys_read_args"), [Place(5), Place(-7), Place(3), Place(-5)]), Skeleton(Cache("sys_read_end"), [")", Place(3), Place(-5)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(1), Skeleton(".", [Place(0), Place(5)])])]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(4)])], 0, 40))
add("sys_read_atom", 7, Clause(7, [Place(-3), "-", Place(-4), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_current_token"), [Place(-2), Place(5), Place(-7)]), Skeleton(Cache("sys_read_factor"), [Place(0), Place(-2), Place(3), Place(4), Place(5), Place(-7)]), Skeleton(Cache("sys_make_negative"), [Place(0), Place(2)]), Skeleton(Cache("="), [Place(5), Place(6)])], 0, NotImplemented))
add("sys_read_atom", 7, Clause(9, [Place(-1), Place(-3), Place(-4), Place(-5), Place(-6), Place(-7), Place(-8)], [Skeleton(Cache("sys_op"), [Place(1), Place(-9), Place(-10), Place(-1), Place(-1)]), Skeleton(Cache("sys_is_prefix"), [Place(7), Place(-9)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_current_token"), [Place(-2), Place(5), Place(-7)]), Skeleton(Cache("sys_read_prefix"), [Place(0), Place(2), Place(1), Place(3), Place(8), Place(7), Place(4), Place(5), Place(6)])], 0, NotImplemented))
add("sys_read_atom", 7, Clause(2, [Place(-1), Place(-2), Place(0), Place(-1), 0, Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_prefix", 9])]))
add("sys_read_prefix", 9, Clause(3, [",", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, ","))
add("sys_read_prefix", 9, Clause(3, ["|", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "|"))
add("sys_read_prefix", 9, Clause(3, [")", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, ")"))
add("sys_read_prefix", 9, Clause(3, ["]", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "]"))
add("sys_read_prefix", 9, Clause(3, ["}", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "}"))
add("sys_read_prefix", 9, Clause(3, [".", Place(-3), Place(1), Place(-1), Place(-1), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_read_prefix", 9, Clause(7, [Place(-1), Place(-2), Place(-3), Place(-4), Place(-5), Place(-6), Place(3), Place(-7), Place(-8)], [Skeleton(make_defined([Clause(5, [Place(-3), Place(-4), Place(-5), Place(-6)], [Skeleton(Cache("<"), [Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["operator_clash"]), Place(-1)]), Place(3), Place(4)])], 0, NotImplemented), Clause(2, [Place(-1), Place(-1), Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)]), [Place(2), Place(3), Place(5), Place(-7)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("-"), [Place(3), Place(4)]), Place(-6)]), Skeleton(Cache("="), [Place(5), Place(-7)]), Skeleton(Cache("sys_read_priority"), [Place(-5), Place(4), Place(5), Place(-7)]), Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(1), Skeleton(".", [Place(3), "[]"])])]), Skeleton(Cache("="), [Place(5), Place(6)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_args", 4])]))
add("sys_read_args", 4, Clause(5, [",", Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(-5)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(3), Place(-5)]), Skeleton(Cache("sys_current_token"), [Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_read_args"), [Place(1), Place(2), Place(3), Place(4)])], 0, ","))
add("sys_read_args", 4, Clause(2, [Place(-1), "[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_list", 6])]))
add("sys_read_list", 6, Clause(6, ["]", Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_reach_code"), [Place(-2), Place(4), Place(-6)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(-6)]), Skeleton(Cache("sys_read_atom"), [Place(0), "[]", Place(1), Place(2), Place(3), Place(4), Place(5)])], 0, "]"))
add("sys_read_list", 6, Clause(4, [Place(-1), Skeleton(".", [Place(-2), Place(-3)]), Place(-1), 0, Place(-4), Place(-5)], [Skeleton(Cache("sys_read_priority"), [Place(0), 999, Place(2), Place(-4)]), Skeleton(Cache("sys_current_token"), [Place(-2), Place(2), Place(-4)]), Skeleton(Cache("sys_read_rest"), [Place(0), Place(1), Place(2), Place(-4)]), Skeleton(Cache("sys_read_end"), ["]", Place(2), Place(-4)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_rest", 4])]))
add("sys_read_rest", 4, Clause(5, [",", Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(-5)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(-5)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(3), Place(-5)]), Skeleton(Cache("sys_current_token"), [Place(-3), Place(3), Place(-5)]), Skeleton(Cache("sys_read_rest"), [Place(1), Place(2), Place(3), Place(4)])], 0, ","))
add("sys_read_rest", 4, Clause(4, ["|", Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(-4)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(-4)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(2), Place(3)])], 0, "|"))
add("sys_read_rest", 4, Clause(2, [Place(-1), "[]", Place(-2), Place(-3)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_set", 6])]))
add("sys_read_set", 6, Clause(6, ["}", Place(-3), Place(-4), Place(-5), Place(-6), Place(-7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(-6)]), Skeleton(Cache("sys_reach_code"), [Place(-2), Place(4), Place(-6)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(-6)]), Skeleton(Cache("sys_read_atom"), [Place(0), "{}", Place(1), Place(2), Place(3), Place(4), Place(5)])], 0, "}"))
add("sys_read_set", 6, Clause(3, [Place(-1), Skeleton("{}", [Place(-2)]), Place(-1), 0, Place(-3), Place(-4)], [Skeleton(Cache("sys_read_priority"), [Place(0), 1200, Place(1), Place(-3)]), Skeleton(Cache("sys_read_end"), ["}", Place(1), Place(-3)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_read_end", 3])]))
add("sys_read_end", 3, Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_current_token"), [Place(1), Place(2), Place(-4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_read_end", 3, Clause(3, [".", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["end_of_clause_expected"]), Place(-1)]), Place(1), Place(2)])], 0, "."))
add("sys_read_end", 3, Clause(3, [")", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["parenthesis_balance"]), Place(-1)]), Place(1), Place(2)])], 0, ")"))
add("sys_read_end", 3, Clause(3, ["}", Place(-3), Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(-3)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["brace_balance"]), Place(-1)]), Place(1), Place(2)])], 0, "}"))
add("sys_read_end", 3, Clause(2, ["]", Place(-2), Place(-3)], [Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Compound("syntax_error", ["bracket_balance"]), Place(-1)]), Place(0), Place(1)])], -1, "]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["initialization", 1])]))
add("initialization", 1, Clause(1, [Place(-2)], [Place(0)], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_launch", 0])]))
add("sys_launch", 0, Clause(1, [], [Skeleton(Cache("current_prolog_flag"), ["argv", Place(-2)]), Skeleton(Cache("sys_trap"), [Skeleton("sys_launch", [Place(0)]), Place(-2), Skeleton("sys_print_error", [Place(0)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_launch", 1])]))
add("sys_launch", 1, Clause(0, ["[]"], [Cache("sys_banner"), Cache("sys_toplevel")], -1, "[]"))
add("sys_launch", 1, Clause(2, [Skeleton(".", [Place(-2), Place(-3)])], [Skeleton(Cache("set_prolog_flag"), ["argv", Place(1)]), Skeleton(Cache("ensure_loaded"), [Place(0)])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_banner", 0])]))
add("sys_banner", 0, Clause(5, [], [Skeleton(Cache("current_prolog_flag"), ["version_data", Place(-2)]), Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(-1), Skeleton(".", [Place(-2), Skeleton(".", [Place(-3), Skeleton(".", [Place(-4), Skeleton(".", [Skeleton(".", [Skeleton("date", [Place(-5)]), Place(-1)]), Place(-1)])])])])])]), Skeleton(Cache("get_string"), ["format.date", Place(-6)]), Skeleton(Cache("sys_time_atom"), [Place(4), Place(3), Place(-5)]), Skeleton(Cache("current_output"), [Place(-6)]), Skeleton(Cache("sys_print_message"), [Skeleton("banner", ["player", Place(0), Place(1), Place(2), Place(3)]), Place(4)]), Cache("nl"), Skeleton(Cache("sys_print_message"), [Compound("banner", ["copyright"]), Place(4)]), Cache("nl")], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_toplevel", 0])]))
add("sys_toplevel", 0, Clause(2, [], [Skeleton(Cache("current_input"), [Place(-2)]), Skeleton(Cache("os_task_current"), [Place(-3)]), Skeleton(Cache("setup_once_cleanup"), [Skeleton("asserta", [Skeleton("sys_including", ["user", Place(1), Place(0)])]), Skeleton("sys_toplevel_prompt", [Place(0)]), Skeleton("once", [Skeleton("retract", [Skeleton("sys_including", ["user", Place(1), Place(0)])])])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_toplevel_prompt", 1])]))
add("sys_toplevel_prompt", 1, Clause(4, [Place(-3)], [Cache("repeat"), Compound(Cache("put_atom"), ["?- "]), Cache("flush_output"), Skeleton(Cache("sys_trap"), [Skeleton("read_term", [Place(1), Place(-3), Skeleton(".", [Skeleton("variable_names", [Place(-4)]), "[]"])]), Place(-5), Skeleton(",", [Skeleton("sys_print_error", [Place(3)]), "fail"])]), Skeleton(make_defined([Clause(2, [Place(-3), Place(-1), Place(-1)], [Skeleton(Cache("=="), [Place(1), "end_of_file"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_trap"), [Skeleton("sys_query_attended", [Place(0), Place(1)]), Place(2), Skeleton("sys_print_error", [Place(2)])]), Cache("fail")], -1, NotImplemented)]), [Place(1), Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_query_attended", 2])]))
add("sys_query_attended", 2, Clause(4, [Place(-3), Place(-4)], [Skeleton(Cache("$MARK"), [Place(-5)]), Place(1), Skeleton(Cache("$MARK"), [Place(-3)]), Skeleton(Cache("sys_answer_show"), [Place(2)]), Skeleton(make_defined([Clause(4, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$CUT"), [Place(3)]), Cache("sys_listing_period")], 0, NotImplemented), Clause(2, [Place(-1), Place(-1), Place(-3)], [Cache("sys_ask_abort"), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$CUT"), [Place(1)])], 0, NotImplemented)]), [Place(3), Place(1), Place(0)])], 0, NotImplemented))
add("sys_query_attended", 2, Clause(0, [Place(-1), Place(-1)], [Compound(Cache("put_atom"), ["fail"]), Cache("sys_listing_period")], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_ask_abort", 0])]))
add("sys_ask_abort", 0, Clause(1, [], [Cache("flush_output"), Skeleton(Cache("get_atom"), [10, Place(-2)]), Skeleton(Cache("\\=="), [Place(0), ";\n"])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_answer_show", 1])]))
add("sys_answer_show", 1, Clause(2, [Place(-2)], [Skeleton(Cache("reverse"), [Place(0), Place(-3)]), Skeleton(Cache("sys_filter_names"), [Place(0), Place(1), Place(-2)]), Skeleton(Cache("sys_answer_map"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_filter_names", 3])]))
add("sys_filter_names", 3, Clause(6, [Skeleton(".", [Skeleton("=", [Place(-3), Place(-4)]), Place(-5)]), Place(-6), Place(-7)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("sys_find_var"), [Place(2), Place(4), Place(-4)]), Skeleton(Cache("="), [Place(2), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_filter_names"), [Place(3), Place(4), Place(5)])], 0, "."))
add("sys_filter_names", 3, Clause(3, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Skeleton(".", [Place(0), Place(-2)])], [Skeleton(Cache("sys_filter_names"), [Place(1), Place(2), Place(0)])], -1, "."))
add("sys_filter_names", 3, Clause(0, ["[]", Place(-1), "[]"], [], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_answer_map", 2])]))
add("sys_answer_map", 2, Clause(5, [Skeleton(".", [Place(-3), Skeleton(".", [Place(-4), Place(-5)])]), Place(-6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_answer_eq"), [Place(1), Place(4)]), Compound(Cache("put_atom"), [", "]), Skeleton(Cache("sys_answer_map"), [Skeleton(".", [Place(2), Place(3)]), Place(4)])], 0, "."))
add("sys_answer_map", 2, Clause(2, [Skeleton(".", [Place(-2), "[]"]), Place(-3)], [Skeleton(Cache("sys_answer_eq"), [Place(0), Place(1)])], -1, "."))
add("sys_answer_map", 2, Clause(0, ["[]", Place(-1)], [Compound(Cache("put_atom"), ["true"])], -1, "[]"))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_answer_eq", 2])]))
add("sys_answer_eq", 2, Clause(3, [Skeleton("=", [Place(-2), Place(-3)]), Place(-4)], [Skeleton(Cache("sys_var_quoted"), [Place(0), 1, Place(-2)]), Skeleton(Cache("put_atom"), [Place(0)]), Compound(Cache("put_atom"), [" = "]), Skeleton(Cache("sys_answer_term"), [Place(1), Place(2)])], -1, "="))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_answer_term", 2])]))
add("sys_answer_term", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("acyclic_term"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("write_term"), [Place(1), Skeleton(".", [Compound("priority", [699]), Skeleton(".", [Skeleton("variable_names", [Place(2)]), Compound(".", [Compound("quoted", ["true"]), "[]"])])])])], 0, NotImplemented))
add("sys_answer_term", 2, Clause(0, [Place(-1), Place(-1)], [Compound(Cache("put_atom"), ["<cyclic term>"])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["listing", 0])]))
add("listing", 0, Clause(0, [], [Skeleton(Cache("listing"), [Place(-1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["listing", 1])]))
add("listing", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_output"), [Place(-3)]), Skeleton(Cache("listing"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["listing", 2])]))
add("listing", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("\\+"), [Skeleton("ground", [Place(1)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_listing_pattern"), [Place(1), Place(2)])], 0, NotImplemented))
add("listing", 2, Clause(4, [Skeleton("/", [Place(-3), Place(-4)]), Place(-5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_atom"), [Place(1)]), Skeleton(Cache("sys_check_integer"), [Place(2)]), Skeleton(Cache("sys_listing_user"), [Skeleton("/", [Place(1), Place(2)]), Place(3)])], 0, "/"))
add("listing", 2, Clause(1, [Place(-2), Place(-1)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), Place(-1)])])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_pattern", 2])]))
add("sys_listing_pattern", 2, Clause(2, [Place(-2), Place(-3)], [Skeleton(Cache("current_predicate"), [Place(0)]), Skeleton(Cache("sys_listing_user"), [Place(0), Place(1)]), Cache("fail")], -1, NotImplemented))
add("sys_listing_pattern", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_user", 2])]))
add("sys_listing_user", 2, Clause(4, [Skeleton("/", [Place(-2), Place(-3)]), Place(-4)], [Skeleton(Cache("\\+"), [Skeleton("sys_listing_stop", [Place(0), Place(1)])]), Skeleton(Cache("sys_listing_multifile"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("sys_listing_dynamic"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("functor"), [Place(-5), Place(0), Place(1)]), Skeleton(Cache("kb_clause_ref"), [Place(3), 0, Place(-3)]), Skeleton(Cache("kb_clause_shard"), [Place(1), Place(-2)]), Skeleton(Cache("\\+"), [Skeleton("sys_listing_stop", [Place(0)])]), Skeleton(Cache("kb_clause_data"), [Place(1), Place(3), Place(-3), Place(-2)]), Skeleton(Cache("sys_decode_body"), [Place(0), Place(-2)]), Skeleton(Cache("sys_untrans_body"), [Place(0), Place(1), Place(-3)]), Skeleton(Cache("sys_listing_show"), [Place(3), Place(1), Place(2)]), Cache("fail")], -1, "/"))
add("sys_listing_user", 2, Clause(0, [Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_multifile", 3])]))
add("sys_listing_multifile", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_multifile", [Place(-6)])]), Skeleton(Cache("\\+"), [Skeleton("sys_listing_stop", [Place(4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_listing_write"), [Skeleton(":-", [Skeleton("multifile", [Skeleton("/", [Place(1), Place(2)])])]), Place(3)])], 0, NotImplemented))
add("sys_listing_multifile", 3, Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_dynamic", 3])]))
add("sys_listing_dynamic", 3, Clause(5, [Place(-3), Place(-4), Place(-5)], [Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), Place(-6)]), Skeleton(Cache("kb_link_flags"), [Place(4), Place(-6)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(4), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_listing_write"), [Skeleton(":-", [Skeleton("dynamic", [Skeleton("/", [Place(1), Place(2)])])]), Place(3)])], 0, NotImplemented))
add("sys_listing_dynamic", 3, Clause(0, [Place(-1), Place(-1), Place(-1)], [], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_show", 3])]))
add("sys_listing_show", 3, Clause(3, [Place(-3), "true", Place(-4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_listing_write"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_listing_show", 3, Clause(3, [Place(-2), Place(-3), Place(-4)], [Skeleton(Cache("sys_listing_write"), [Skeleton(":-", [Place(0), Place(1)]), Place(2)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_write", 2])]))
add("sys_listing_write", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("term_variables"), [Place(0), Place(-4)]), Skeleton(Cache("term_singletons"), [Place(0), Place(-5)]), Skeleton(Cache("sys_listing_names"), [Place(2), Place(3), 0, Place(-5)]), Skeleton(Cache("write_term"), [Place(1), Place(0), Skeleton(".", [Compound("quoted", ["true"]), Skeleton(".", [Skeleton("variable_names", [Place(3)]), Compound(".", [Compound("format", ["true"]), "[]"])])])]), Skeleton(Cache("sys_listing_period"), [Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_names", 4])]))
add("sys_listing_names", 4, Clause(0, ["[]", Place(-1), Place(-1), "[]"], [], -1, "[]"))
add("sys_listing_names", 4, Clause(7, [Skeleton(".", [Place(-3), Place(-4)]), Place(-5), Place(-6), Skeleton(".", [Skeleton("=", ["_", Place(1)]), Place(-7)])], [Skeleton(Cache("member"), [Place(-8), Place(3)]), Skeleton(Cache("=="), [Place(6), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_listing_names"), [Place(2), Place(3), Place(4), Place(5)])], 0, "."))
add("sys_listing_names", 4, Clause(5, [Skeleton(".", [Place(-2), Place(-3)]), Place(-4), Place(-5), Skeleton(".", [Skeleton("=", [Place(-6), Place(0)]), Place(-2)])], [Skeleton(Cache("sys_listing_name"), [Place(3), Place(4)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(3), 1]), Place(-5)]), Skeleton(Cache("sys_listing_names"), [Place(1), Place(2), Place(3), Place(0)])], -1, "."))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_name", 2])]))
add("sys_listing_name", 2, Clause(3, [Place(-3), Place(-4)], [Skeleton(Cache("<"), [Place(1), 26]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Place(1), 65]), Place(-3)]), Skeleton(Cache("char_code"), [Place(2), Place(1)])], 0, NotImplemented))
add("sys_listing_name", 2, Clause(4, [Place(-2), Place(-3)], [Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Skeleton(Cache("rem"), [Place(0), 26]), 65]), Place(-4)]), Skeleton(Cache("char_code"), [Place(-5), Place(2)]), Skeleton(Cache("$EVAL"), [Skeleton(Cache("+"), [Skeleton(Cache("//"), [Place(0), 26]), 1]), Place(-2)]), Skeleton(Cache("atom_integer"), [Place(-4), 10, Place(0)]), Skeleton(Cache("atom_concat"), [Place(3), Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_period", 0])]))
add("sys_listing_period", 0, Clause(1, [], [Skeleton(Cache("current_output"), [Place(-2)]), Skeleton(Cache("sys_listing_period"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_period", 1])]))
add("sys_listing_period", 1, Clause(1, [Place(-2)], [Skeleton(Cache("sys_safe_code"), [Place(0), 46]), Skeleton(Cache("nl"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_stop", 1])]))
add("sys_listing_stop", 1, Clause(0, ["system"], [], -1, "system"))
add("sys_listing_stop", 1, Clause(2, [Place(-2)], [Skeleton(Cache("current_prolog_flag"), ["system_url", Place(-3)]), Skeleton(Cache("file_directory_name"), [Place(1), Place(-3)]), Skeleton(Cache("sub_atom"), [Place(0), 0, Place(-1), Place(-1), Place(1)])], -1, NotImplemented))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["sys_listing_stop", 2])]))
add("sys_listing_stop", 2, Clause(0, ["sys_op", 5], [], -1, "sys_op"))
add("sys_listing_stop", 2, Clause(0, ["sys_source", 3], [], -1, "sys_source"))
add("sys_listing_stop", 2, Clause(0, ["sys_srcprop", 2], [], -1, "sys_srcprop"))
add("sys_listing_stop", 2, Clause(0, ["sys_predprop", 3], [], -1, "sys_predprop"))
add("sys_listing_stop", 2, Clause(0, ["sys_lastpred", 3], [], -1, "sys_lastpred"))
add("sys_listing_stop", 2, Clause(0, ["sys_including", 3], [], -1, "sys_including"))
add("sys_listing_stop", 2, Clause(0, ["sys_emulated", 2], [], -1, "sys_emulated"))
run(Goal(0, [Compound(Cache("sys_multifile_safe"), ["strings", 3])]))
run(Goal(0, [Compound(Cache("sys_usage_predicate"), ["strings", 3])]))
add("strings", 3, Clause(0, ["banner.player", "de", "Dogelog Spieler, Prolog zum Mond, ~.~.~ (~~)"], [], -1, "banner.player"))
add("strings", 3, Clause(0, ["banner.copyright", "de", "(c) 1985-2024, XLOG Technologies AG, Schweiz"], [], -1, "banner.copyright"))
add("strings", 3, Clause(0, ["banner.player", "", "Dogelog Player, Prolog to the Moon, ~.~.~ (~~)"], [], -1, "banner.player"))
add("strings", 3, Clause(0, ["banner.copyright", "", "(c) 1985-2024, XLOG Technologies AG, Switzerland"], [], -1, "banner.copyright"))
def get_cont():
return call
def get_mark():
return trail
def get_engine():
return engine
def get_ctx():
return ctx
def get_stage():
return stage
import os
import signal
import sys
import asyncio
def init():
set_stage(0)
set_partition("user")
async def consult_async(text):
check_atom(text)
back_input = engine.text_input
src = Source()
src.buf = text
engine.text_input = src
try:
await perform_async(Compound("ensure_loaded", ["user"]))
finally:
stream_flush(engine.text_input)
stream_flush(engine.text_error)
engine.text_input = back_input
async def toplevel_async():
await perform_async("sys_launch")
def post(message):
register_signal("main", message)
invoke_interrupt("main")
def show(term):
perform(Compound("sys_print_error", [term]))
FFI_FUNC = 0x00000100
def register(functor, arity, func, flags):
if (flags & FFI_FUNC) != 0:
res = make_special(lambda args: invoke_func(func, args))
else:
res = make_special(lambda args: invoke(func, args))
add(functor, arity, res)
def invoke(func, args):
temp = [NotImplemented] * len(args)
i = 0
while i < len(temp):
temp[i] = deref(args[i])
i += 1
func(*temp)
cont(call.args[1])
return True
def invoke_func(func, args):
temp = [NotImplemented] * (len(args) - 1)
i = 0
while i < len(temp):
temp[i] = deref(args[i])
i += 1
temp = func(*temp)
if not unify(args[len(args) - 1], temp):
return False
cont(call.args[1])
return True
def perform(goal):
goal = Compound(".", [goal, "[]"])
return launch(goal, "main", VOID_ARGS)
async def perform_async(goal):
goal = Compound(".", [goal, "[]"])
return await launch_async(goal, "main", VOID_ARGS)
def plain_out(data, buf):
try:
data.write(buf)
except IOError as err:
raise make_error(map_stream_error(err))
def plain_err(data, buf):
try:
data.write(buf)
except IOError as err:
raise make_error(map_stream_error(err))
def console_flush(data):
try:
data.flush()
except IOError as err:
raise make_error(map_stream_error(err))
async def console_promise(buf, stream):
try:
res = await asyncio.to_thread(blocking_readline, stream.data)
stream.buf = res
stream.pos = 0
except IOError as err:
register_signal(buf, map_stream_error(err))
def blocking_readline(data):
return data.readline()
ANSI_RESET = "\x1B[0m"
ANSI_INPUT = "\x1B[92m" # Intense Green
ANSI_ERROR = "\x1B[91m" # Intense Red
def ansi_out(data, buf):
try:
data.write(ANSI_RESET)
data.write(buf)
data.write(ANSI_INPUT)
except IOError as err:
raise make_error(map_stream_error(err))
def ansi_err(data, buf):
try:
data.write(ANSI_ERROR)
data.write(buf)
data.write(ANSI_INPUT)
except IOError as err:
raise make_error(map_stream_error(err))
def ctrlc_abort(signum, frame):
post(Compound("system_error", ["user_abort"]))
async def dogelog_async():
init()
os.system("")
signal.signal(signal.SIGINT, ctrlc_abort)
if len(sys.argv) > 1:
await toplevel_async()
else:
sys.stdout.write(ANSI_INPUT)
sys.stdout.flush()
dst = Sink()
dst.data = sys.stdout
dst.send = ansi_out
dst.notify = console_flush
engine.text_output = dst
dst = Sink()
dst.data = sys.stderr
dst.send = ansi_err
dst.notify = console_flush
engine.text_error = dst
await toplevel_async()
sys.stdout.write(ANSI_RESET)
sys.stdout.flush()
set_bootbase(__file__)
dst = Sink()
dst.data = sys.stdout
dst.send = plain_out
dst.notify = console_flush
engine.text_output = dst
dst = Sink()
dst.data = sys.stderr
dst.send = plain_err
dst.notify = console_flush
engine.text_error = dst
src = Source()
src.data = sys.stdin
src.receive = console_promise
src.flags |= MASK_SRC_AREAD
engine.text_input = src
if __name__ == "__main__":
asyncio.run(dogelog_async())