
MASK_PRED_ARITH = 0x40000000
MASK_PRED_SPECIAL = 0x20000000
MASK_PRED_TEST = 0x10000000
MASK_PRED_DYNAMIC = 0x08000000
MASK_PRED_BITS = 27
MASK_PRED_INDEX = (1 << MASK_PRED_BITS) - 1

MASK_TOUCH_DYNAMIC = 0x00000001
MASK_TOUCH_BOTTOM = 0x00000002
MASK_REMOVE_REVERSE = 0x00000001

VAR_MASK_SEEN = 0x40000000
VAR_MASK_EVEN = 0x20000000
VAR_MASK_ODD = 0x10000000
VAR_MASK_STATE = VAR_MASK_EVEN | VAR_MASK_ODD
VAR_MASK_BITS = 28
VAR_MASK_SERNO = (1 << VAR_MASK_BITS) - 1

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.abort = lambda: None
        self.flags = 0
        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.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
        self.flags = VAR_MASK_SERNO
        self.tail = None


def is_variable(obj):
    return isinstance(obj, Variable)


class Structure:
    def __init__(self, functor, args):
        self.functor = functor
        self.args = args


def is_structure(obj):
    return isinstance(obj, Structure)


class Compound(Structure):
    def __init__(self, functor, args):
        super().__init__(functor, args)
        self.walk = 0


def is_compound(obj):
    return isinstance(obj, Compound)


class Frozen(Structure):
    def __init__(self, functor, args):
        super().__init__(functor, args)


def is_frozen(obj):
    return isinstance(obj, Frozen)



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



def deref(term):
    while is_variable(term) and term.instantiated is not NotImplemented:
        term = term.instantiated
    return term


def copy_term(first):
    res = walk_link(first)
    walk_unlink(first)
    return res


def walk_link(first):
    stack = None
    while True:
        first = deref(first)
        if is_variable(first):
            if first.tail is None:
                peek = Variable()
                first.tail = peek
                first = peek
            else:
                first = first.tail
        elif is_compound(first):
            if not is_structure(first.functor):
                first.functor = Compound(first.functor,
                                         [NotImplemented] * len(first.args))
                first.walk &= ~VAR_MASK_SERNO
                stack = stack_push(stack, first)
                first = first.args[0]
                continue
            else:
                first = first.functor
        item = stack_peek(stack)
        while (item is not None and
               (item.walk & VAR_MASK_SERNO) == len(item.args) - 1):
            item.functor.args[item.walk & VAR_MASK_SERNO] = first
            first = item.functor
            stack_pop(stack)
            item = stack_peek(stack)
        if item is None:
            return first
        else:
            item.functor.args[item.walk & VAR_MASK_SERNO] = first
            item.walk += 1
            first = item.args[item.walk & VAR_MASK_SERNO]


def walk_unlink(first):
    stack = None
    while True:
        first = deref(first)
        if is_variable(first):
            if first.tail is not None:
                first.tail = None
        elif is_compound(first):
            if is_structure(first.functor):
                first.functor = first.functor.functor
                if 0 != len(first.args) - 1:
                    first.walk &= ~VAR_MASK_SERNO
                    stack = stack_push(stack, first)
                first = first.args[0]
                continue
        item = stack_peek(stack)
        if item is None:
            return
        else:
            item.walk += 1
            first = item.args[item.walk & VAR_MASK_SERNO]
            if (item.walk & VAR_MASK_SERNO) == len(item.args) - 1:
                stack_pop(stack)


def stack_push(stack, elem):
    if stack is None:
        stack = []
    stack.append(elem)
    return stack


def stack_peek(stack):
    if stack is None:
        return None
    if len(stack) == 0:
        return None
    return stack[len(stack)-1]


def stack_pop(stack):
    del stack[len(stack)-1]



def assoc_get(vmap, key):
    if vmap is None:
        return NotImplemented
    return vmap.get(key, NotImplemented)


def assoc_set(vmap, key, value):
    if vmap is None:
        vmap = {}
    vmap[key] = value
    return vmap



class Goal:
    def __init__(self, size, body, cutvar):
        self.size = size
        self.body = body
        self.cutvar = cutvar


def is_goal(obj):
    return isinstance(obj, Goal)


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):
        self.flags = 0
        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):
    if arity < 0:
        return NotImplemented
    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, offset):
    peek = Provable()
    peek.flags |= offset
    peek.rope = new_rope()
    peek.nonguard = new_rope()
    peek.idxmap = {}
    i = 0
    while i < len(rope):
        add_peek(peek, rope[i], MASK_TOUCH_BOTTOM)
        i += 1
    return peek


def new_rope():
    return Logical(None, 0, [])


def sanitize_key(key):
    if isinstance(key, dict) or isinstance(key, list):
        return id(key)
    else:
        return key





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, 1)
        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 = NotImplemented
    peek.idxmap = NotImplemented
    peek.nonguard = NotImplemented
    peek.func = NotImplemented

    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_TOUCH_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, 1)
            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
            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_TOUCH_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_TOUCH_DYNAMIC) == 0:
            clause_or_pred.shard = engine.partition
        add_peek(peek, clause_or_pred, flags)
    elif is_provable(clause_or_pred):
        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)]))
    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:
        idxval = sanitize_key(idxval)
        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_TOUCH_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):
    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:
        idxval = sanitize_key(idxval)
        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_REVERSE) == 0:
        index = array_index(data, clause)
    else:
        index = array_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 array_index(arr, obj):
    i = 0
    while i < len(arr):
        if arr[i] is obj:
            return i
        i += 1
    return -1


def array_last_index(arr, obj):
    i = len(arr)
    while i > 0:
        i -= 1
        if arr[i] is obj:
            return i
    return -1

import time
import asyncio
import platform

VOID_ARGS = []

trail = None
redo = None
call = "[]"


def make_error(beta):
    return Exception(Compound("error", [beta, fetch_stack(ctx)]))


def fetch_stack(buf):
    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 object_equals(elem.args[1], buf):
            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):
    if is_cache(functor):
        functor = functor.name
    return Compound("/", [functor, arity])



if platform.python_implementation() == "PyPy":
    gc_maxinfs = 144000
else:
    gc_maxinfs = 88000

gc_mask = VAR_MASK_ODD

gc_last = 0.0
gc_time = 0.0
gc_enter = 0
gc_tick = gc_maxinfs
gc_tack = 60*gc_maxinfs
gc_tock = 3600*gc_maxinfs


def real_time():
    return time.monotonic_ns() / 1000000.0



def gc_major():
    global gc_time
    global gc_mask
    gc_time -= real_time()
    gc_mask ^= VAR_MASK_STATE
    engine.low = 0
    engine.high = engine.serno
    engine.serno = 0
    mark_redo()
    adjust_redo()
    sweep_trail(None)
    gc_time += real_time()


def mark_term(first):
    stack = None
    while True:
        if is_variable(first):
            if (first.flags & VAR_MASK_STATE) != gc_mask:
                first.flags = (first.flags & ~VAR_MASK_STATE) | gc_mask
                val = first.flags & VAR_MASK_SERNO
                if val != VAR_MASK_SERNO:
                    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
                if first.instantiated is not NotImplemented:
                    peek = first.instantiated
                    first.instantiated = stack
                    stack = first
                    first = peek
                    continue
        elif is_compound(first):
            if (first.walk & VAR_MASK_STATE) != gc_mask:
                first.walk = (first.walk & ~VAR_MASK_STATE) | gc_mask
                peek = first.args[0]
                first.args[0] = stack
                first.walk &= ~VAR_MASK_SERNO
                stack = first
                first = peek
                continue
        while (stack is not None and (is_variable(stack) or
                (stack.walk & VAR_MASK_SERNO) == len(stack.args) - 1)):
            if is_variable(stack):
                peek = stack.instantiated
                stack.instantiated = first
                first = stack
                stack = peek
            else:
                peek = stack.args[stack.walk & VAR_MASK_SERNO]
                stack.args[stack.walk & VAR_MASK_SERNO] = first
                first = stack
                stack = peek
        if stack is None:
            return
        else:
            peek = stack.args[stack.walk & VAR_MASK_SERNO]
            stack.args[stack.walk & VAR_MASK_SERNO] = first
            stack.walk += 1
            first = stack.args[stack.walk & VAR_MASK_SERNO]
            stack.args[stack.walk & VAR_MASK_SERNO] = peek


def mark_redo():
    term = call
    last = redo
    while True:
        mark_term(term)
        if last is None:
            break
        term = last.cont
        last = last.tail



def gc_minor():
    global gc_time
    global gc_maxinfs
    global gc_last
    gc_time -= real_time()
    mark2_redo()
    mark2_trail(engine.backtrail)
    adjust_redo()
    sweep_trail(engine.backtrail)
    gc_now = real_time()
    gc_time += gc_now
    val = gc_now - gc_last
    gc_last = gc_now
    val = (gc_maxinfs * 1000) / val
    gc_maxinfs = round((3 * gc_maxinfs + val) / 4)


def mark2_term(first):
    stack = None
    while True:
        if is_variable(first):
            if (first.flags & VAR_MASK_STATE) != gc_mask:
                first.flags = (first.flags & ~VAR_MASK_STATE) | gc_mask
                if first.instantiated is not NotImplemented:
                    peek = first.instantiated
                    first.instantiated = stack
                    stack = first
                    first = peek
                    continue
        elif is_compound(first):
            if (first.walk & VAR_MASK_STATE) != gc_mask:
                first.walk = (first.walk & ~VAR_MASK_STATE) | gc_mask
                peek = first.args[0]
                first.args[0] = stack
                first.walk &= ~VAR_MASK_SERNO
                stack = first
                first = peek
                continue
        while (stack is not None and (is_variable(stack) or
                (stack.walk & VAR_MASK_SERNO) == len(stack.args) - 1)):
            if is_variable(stack):
                peek = stack.instantiated
                stack.instantiated = first
                first = stack
                stack = peek
            else:
                peek = stack.args[stack.walk & VAR_MASK_SERNO]
                stack.args[stack.walk & VAR_MASK_SERNO] = first
                first = stack
                stack = peek
        if stack is None:
            return
        else:
            peek = stack.args[stack.walk & VAR_MASK_SERNO]
            stack.args[stack.walk & VAR_MASK_SERNO] = first
            stack.walk += 1
            first = stack.args[stack.walk & VAR_MASK_SERNO]
            stack.args[stack.walk & VAR_MASK_SERNO] = peek


def mark2_redo():
    term = call
    last = redo
    while True:
        mark2_term(term)
        if last is None:
            break
        term = last.cont
        last = last.tail



def adjust_redo():
    last = redo
    while last is not None:
        temp = last.mark
        while temp is not None:
            if (temp.flags & VAR_MASK_STATE) == gc_mask:
                break
            else:
                temp = temp.tail
        last.mark = temp
        last = last.tail


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 sweep_trail(stop):
    global trail
    temp = trail
    back = None
    while temp is not stop:
        term = temp
        temp = term.tail
        if (term.flags & VAR_MASK_STATE) == gc_mask:
            if back is not None:
                back.tail = term
            else:
                trail = term
            back = term
        else:
            term.instantiated = NotImplemented
            term.tail = None
    if back is not None:
        back.tail = stop
    else:
        trail = stop
    engine.backtrail = trail



def solve_signal(rope, at, choice):
    if engine.signal is not NotImplemented:
        message = engine.signal
        engine.signal = NotImplemented
        raise make_error(message)
    return True



SYS_MASK_ASYNC_MODE = 0x00000001
SYS_MASK_ALLOW_YIELD = 0x00000008
SYS_MASK_FULL_ASYNC = SYS_MASK_ASYNC_MODE | SYS_MASK_ALLOW_YIELD


def cont(term):
    global call
    call = term


def solve(snap, found):
    global call
    global redo
    global gc_enter
    global gc_tick
    global gc_tack
    global gc_tock
    while True:
        if found is True:
            if gc_enter >= gc_tick:
                if gc_enter >= gc_tock:
                    gc_major()
                    gc_tock += 3600*gc_maxinfs
                elif gc_enter >= gc_tack:
                    gc_minor()
                    gc_tack += 60*gc_maxinfs
                gc_tick += gc_maxinfs
                if (engine.flags & SYS_MASK_ASYNC_MODE) != 0:
                    more(Choice(solve_signal, None, 0, trail))
                    return lambda: immediate_promise()
            goal = call
            if is_structure(goal):
                gc_enter += 1
                goal = goal.args[0]
                peek = lookup_pred(goal)
                if peek is NotImplemented or (peek.flags & MASK_PRED_ARITH) != 0:
                    raise make_error(Compound("existence_error",
                        ["procedure", make_indicator_term(goal)]))
                if is_structure(goal):
                    goal = goal.args
                else:
                    goal = VOID_ARGS
                if (peek.flags & MASK_PRED_TEST) != 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_structure(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_nonvar(functor)
        functor = copy_term(functor)
        raise make_error(Compound("type_error",
                ["callable", functor]))


def make_indicator_term(goal):
    if is_structure(goal):
        functor = goal.functor
        arity = len(goal.args)
    else:
        functor = goal
        arity = 0
    return make_indicator(functor, arity)


def solve_rope(rope, at, choice):
    goal = deref(call.args[0])
    if is_structure(goal):
        goal = goal.args
    else:
        goal = VOID_ARGS
    return solve2_rope(goal, rope, at, choice)


def solve2_rope(paras, 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, paras):
            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



def defined_clauses(pred, args):
    peek = pred.rope
    if peek.count < 2:
        return peek
    offset = pred.flags & MASK_PRED_INDEX
    if len(args) >= offset and len(pred.idxmap) > 0:
        key = key_value(args[offset-1])
        if key is NotImplemented:
            return peek
        else:
            key = sanitize_key(key)
            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_structure(term):
        return term.functor
    else:
        return term



CTX_MAIN = "main"


def run(goal):
    if not launch(goal, CTX_MAIN, VOID_ARGS):
        raise make_error(Compound("syntax_error", ["directive_failed"]))


def snap_setup():
    global redo
    redo = Choice(solve_setup, None, 0, trail)
    return redo


def solve_setup(rope, at, choice):
    return False


def snap_cleanup(snap):
    global call
    more(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: (list | None) = None

def is_pending(template):
    if template is NotImplemented:
        return True
    elif is_place(template):
        return True
    else:
        return False


def exec_deref(template):
    if template is NotImplemented:
        return template
    elif is_place(template):
        index = template.index
        peek = temp_display[index]
        if peek is NotImplemented:
            return template
        else:
            return deref(peek)
    else:
        return deref(template)



def exec_build(template):
    back = None
    while True:
        if template is NotImplemented:
            template = Variable()
            break
        elif is_place(template):
            index = template.index
            template = temp_display[index]
            if template is NotImplemented:
                template = Variable()
                temp_display[index] = template
            else:
                template = deref(template)
            break
        elif is_skeleton(template):
            args = [NotImplemented] * len(template.args)
            args[len(args)-1] = back
            back = Compound(template.functor, args)
            template = template.args
            i = 0
            while i < len(args) - 1:
                args[i] = exec_build(template[i])
                i += 1
            template = template[i]
        else:
            template = deref(template)
            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 template is NotImplemented:
            return True
        elif is_place(template):
            index = template.index
            template = temp_display[index]
            if template is NotImplemented:
                temp_display[index] = deref(alpha)
                return True
            else:
                return unify(alpha, template)
        elif is_skeleton(template):
            alpha = deref(alpha)
            if is_variable(alpha):
                args = [NotImplemented] * len(template.args)
                bind(Compound(template.functor, args), alpha)
                template = template.args
                i = 0
                while i < len(args):
                    args[i] = exec_build(template[i])
                    i += 1
                return True
            elif is_structure(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
    if len(aux) != len(code):
        return False
    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_ARITH) == 0:
            raise make_error(Compound("type_error",
                  ["evaluable", make_indicator(template.functor, len(template.args))]))
        return peek.func(template.args)
    else:
        if template is NotImplemented:
            raise make_error("instantiation_error")
        elif is_place(template):
            index = template.index
            template = temp_display[index]
            if template is NotImplemented:
                raise make_error("instantiation_error")
        template = deref(template)
        if is_number(template):
            return template
        peek = lookup_eval(template)
        if peek is NotImplemented or (peek.flags & MASK_PRED_ARITH) == 0:
            raise make_error(Compound("type_error",
                  ["evaluable", make_indicator_term(template)]))
        if is_structure(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_TEST) == 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_ARITH) != 0:
                return Compound(template.functor, args)
            else:
                return Compound(peek, args)
        else:
            gc_enter += 1
            return peek.func(template.args)
    else:
        peek = lookup_pred(template)
        if peek is NotImplemented or (peek.flags & MASK_PRED_TEST) == 0:
            return template
        else:
            gc_enter += 1
            if is_structure(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 object_equals(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



class Item:
    def __init__(self, first, second, idx):
        self.first = first
        self.second = second
        self.idx = idx


def unify(first, second):
    stack = None
    log = None
    try:
        while True:
            first = deref(first)
            second = deref(second)
            if is_variable(first):
                if not is_variable(second) or first is not second:
                    bind(second, first)
            elif is_variable(second):
                bind(first, second)
            elif not is_structure(first):
                if not object_equals(first, second):
                    break
            elif not is_structure(second):
                break
            elif len(first.args) != len(second.args):
                break
            else:
                first = union_find(first)
                second = union_find(second)
                if first.functor != second.functor:
                    break
                elif first is not second:
                    log = union_add(log, first, second)
                    if 0 != len(first.args) - 1:
                        item2 = Item(first, second, 0)
                        stack = stack_push(stack, item2)
                    first = first.args[0]
                    second = second.args[0]
                    continue
            item = stack_peek(stack)
            if item is None:
                return True
            else:
                item.idx += 1
                first = item.first.args[item.idx]
                second = item.second.args[item.idx]
                if item.idx == len(item.first.args) - 1:
                    stack_pop(stack)
        return False
    finally:
        union_undo(log)


def union_find(obj):
    if is_frozen(obj):
        return obj
    while is_structure(obj.functor):
        obj = obj.functor
    return obj


def union_add(log, vfrom, to):
    if is_frozen(vfrom):
        return log
    vfrom.functor = to
    if log is None:
        log = []
    log.append(vfrom)
    return log


def union_undo(log):
    if log is None:
        return
    i = len(log) - 1
    while i >= 0:
        elem = log[i]
        elem.functor = elem.functor.functor
        i -= 1


def bind(source, term):
    global trail
    global count
    term.instantiated = source
    term.tail = trail
    if (term.flags & VAR_MASK_STATE) == gc_mask:
        term.flags |= VAR_MASK_STATE
    trail = term


def unbind(mark):
    global trail
    while mark is not trail:
        term = trail
        if engine.backtrail is term:
            engine.backtrail = term.tail
        trail = term.tail
        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_structure(expr):
        functor = expr.functor
        arity = len(expr.args)
    else:
        functor = expr
        arity = 0
    return resolve_functor(functor, arity + 1)



tasks = []


class Context:
    def __init__(self):
        self.trail = None
        self.redo = None
        self.call = "[]"
        self.gc_mask = VAR_MASK_ODD
        self.engine = Engine()
        self.engine.text_output = engine.text_output
        self.engine.text_error = engine.text_error
        self.engine.text_input = engine.text_input
        tasks.append(self)


def ctx_ended(buf):
    k = array_last_index(tasks, buf)
    if k != -1:
        del tasks[k]




def group_teardown():
    i = 0
    while i < len(tasks):
        buf = tasks[i]
        msg = Compound("system_error", ["user_exit"])
        register_signal(buf, msg)
        invoke_interrupt(buf)
        i += 1



ctx = CTX_MAIN


def ctx_set(buf):
    global ctx
    ctx = buf


def ctx_switch(buf):
    global trail
    global redo
    global call
    global gc_mask
    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 = gc_mask
    gc_mask = buf.gc_mask
    buf.gc_mask = temp
    temp = engine
    set_engine(buf.engine)
    buf.engine = temp



def launch(form, buf, paras):
    global call
    if buf != CTX_MAIN:
        ctx_set(buf)
        ctx_switch(buf)
    back = engine.flags & SYS_MASK_FULL_ASYNC
    engine.flags &= ~SYS_MASK_FULL_ASYNC
    snap = snap_setup()
    if is_clause(form):
        call = melt_clause(form, paras)
    elif is_goal(form):
        call = melt_directive(form)
    else:
        call = form
    try:
        found = solve(snap, True)
    finally:
        snap_cleanup(snap)
        engine.flags &= ~SYS_MASK_FULL_ASYNC
        engine.flags |= back
        if buf != CTX_MAIN:
            ctx_switch(buf)
            ctx_set(CTX_MAIN)
    return found


def callback(form, buf, paras):
    try:
        return launch(form, buf, paras)
    except BaseException:
        return False


def melt_directive(goal):
    if goal.size != 0:
        display = [NotImplemented] * goal.size
    else:
        display = None
    peek = goal.cutvar
    if peek != -1:
        display[peek] = redo
    return exec_body(goal.body, display)


def melt_clause(clause, paras):
    if clause.size != 0:
        display = [NotImplemented] * clause.size
    else:
        display = None
    if exec_head(clause.head, display, paras):
        peek = clause.cutvar
        if peek != -1:
            display[peek] = redo
        return exec_body(clause.body, display)
    else:
        return "[]"



async def launch_async(form, buf, paras):
    global gc_last
    global call
    gc_last += real_time()
    if buf != CTX_MAIN:
        ctx_set(buf)
        ctx_switch(buf)
    back = engine.flags & SYS_MASK_FULL_ASYNC
    engine.flags |= SYS_MASK_FULL_ASYNC
    found = True
    snap = snap_setup()
    if is_clause(form):
        call = melt_clause(form, paras)
    elif is_goal(form):
        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 != CTX_MAIN:
                    ctx_switch(buf)
                    ctx_set(CTX_MAIN)
                gc_last -= real_time()
                await found()
                gc_last += real_time()
                if buf != CTX_MAIN:
                    ctx_set(buf)
                    ctx_switch(buf)
                found = False
            else:
                break
    finally:
        snap_cleanup(snap)
        engine.flags &= ~SYS_MASK_FULL_ASYNC
        engine.flags |= back
        if buf != CTX_MAIN:
            ctx_switch(buf)
            ctx_set(CTX_MAIN)
            ctx_ended(buf)
    gc_last -= real_time()
    return found


async def task_async(form, buf, paras):
    try:
        await launch_async(form, buf, paras)
    except BaseException:
        pass


def register_interrupt(buf, func):
    en = determine_engine(buf)
    en.abort = func


def register_signal(buf, msg):
    en = determine_engine(buf)
    en.signal = msg


def invoke_interrupt(buf):
    en = determine_engine(buf)
    en.abort()


def determine_engine(buf):
    if buf != CTX_MAIN:
        if buf is not ctx:
            return buf.engine
        else:
            return engine
    else:
        if ctx != 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, 6, 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, 24, 24],
    [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, 24],
    [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, 1, 2, 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, 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],
    [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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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],
    [28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [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, 1, 1, 2, 0, 0],
    [1, 2, 0, 2, 0, 2, 1, 2, 1, 2, 1, 2, 1, 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],
    [41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 5, 5, 5, 5, 4, 5],
    [1, 1, 1, 1, 1, 1, 0, 0, 0, 6, 6, 6, 6, 6, 20, 4],
    [2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 25, 25],
    [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, 5, 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, 6, 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, 5, 5, 5, 5, 5, 0, 5, 0, 0, 5, 0],
    [5, 5, 5, 5, 5, 5, 0, 5, 8, 8, 8, 6, 6, 6, 6, 6],
    [6, 0, 8, 0, 0, 8, 0, 8, 8, 8, 8, 0, 8, 8, 6, 8],
    [6, 5, 6, 5, 24, 24, 0, 24, 24, 0, 0, 0, 0, 0, 0, 0],
    [0, 6, 6, 0, 0, 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],
    [41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 41, 73, 105, 137, 169, 201],
    [233, 265, 297, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 6, 8, 6],
    [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],
    [5, 24, 0, 0, 0, 0, 0, 0, 0, 0, 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],
    [41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 6, 0, 0, 0, 0, 0],
    [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],
    [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, 8, 8, 8, 6, 6, 6],
    [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],
    [4, 4, 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, 4, 4, 24, 24, 24],
    [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],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5],
    [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, 41, 73, 105, 137, 169, 201, 233, 265, 297, 329, 0, 0, 0, 0, 24],
    [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],
    [28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 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, 0, 0, 0, 0, 0, 28],
    [28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 28, 28],
    [28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 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, 176, 140, 287, 140, 271, 271, 271, 288, 209, 209, 209, 209, 289, 271, 
    209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 290, 291, 209, 209, 292, 
    209, 209, 209, 209, 209, 209, 293, 209, 209, 209, 209, 209, 209, 209, 209, 209, 
    209, 209, 209, 209, 209, 209, 294, 295, 271, 296, 209, 209, 297, 279, 298, 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, 299, 300, 279, 279, 279, 301, 279, 302, 
    279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 279, 
    209, 209, 209, 279, 303, 209, 209, 304, 209, 305, 209, 209, 209, 209, 209, 209],
    [9, 9, 9, 11, 11, 11, 306, 307, 13, 13, 13, 13, 13, 13, 308, 309, 
    11, 11, 310, 48, 48, 48, 311, 312, 48, 313, 314, 314, 314, 314, 32, 32, 
    315, 316, 317, 318, 319, 320, 140, 140, 209, 321, 209, 209, 209, 209, 209, 322, 
    209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 323, 140, 209],
    [324, 325, 326, 327, 136, 48, 48, 48, 48, 328, 178, 48, 48, 48, 48, 329, 
    330, 48, 48, 136, 48, 48, 48, 48, 200, 331, 48, 48, 209, 209, 332, 48, 
    209, 333, 334, 209, 335, 336, 209, 209, 334, 209, 209, 336, 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, 337, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    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, 338, 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, 314, 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, 48, 48, 48, 388, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 313, 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, 476, 9, 477, 11, 478, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 271, 479, 48, 48, 480, 481, 482, 140, 140, 483, 
    48, 464, 484, 48, 62, 485, 140, 48, 486, 140, 140, 48, 487, 140, 48, 313],
    [488, 48, 48, 489, 490, 457, 491, 492, 222, 48, 48, 493, 494, 48, 196, 192, 
    495, 48, 496, 497, 498, 48, 48, 499, 222, 48, 48, 500, 501, 502, 503, 504, 
    48, 97, 505, 506, 507, 140, 140, 140, 508, 509, 510, 48, 48, 511, 512, 192, 
    513, 83, 84, 514, 515, 516, 517, 518, 519, 48, 48, 520, 521, 522, 523, 140],
    [48, 48, 48, 524, 525, 526, 481, 140, 48, 48, 48, 527, 528, 192, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 529, 530, 531, 532, 140, 140, 
    48, 48, 48, 533, 534, 192, 535, 140, 48, 48, 536, 537, 192, 538, 539, 140, 
    48, 540, 541, 542, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
    [48, 48, 505, 543, 140, 140, 140, 140, 140, 140, 9, 9, 11, 11, 148, 544, 
    545, 546, 48, 547, 548, 192, 140, 140, 140, 140, 549, 48, 48, 550, 551, 140, 
    552, 48, 48, 553, 554, 555, 48, 48, 556, 557, 558, 48, 48, 48, 48, 196, 
    559, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 48, 560, 192],
    [84, 48, 529, 561, 562, 148, 175, 563, 48, 564, 565, 566, 140, 140, 140, 140, 
    567, 48, 48, 568, 569, 192, 570, 48, 571, 572, 192, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 573, 
    574, 115, 48, 575, 576, 577, 140, 140, 140, 140, 140, 100, 271, 578, 579, 580],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 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, 581, 582, 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, 583],
    [48, 48, 48, 584, 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, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 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, 313, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 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, 587, 588, 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],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 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, 589, 
    48, 48, 48, 590, 591, 592, 593, 594, 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, 595, 48, 596, 192, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 9, 9, 11, 11, 271, 597, 140, 140, 140, 140, 140, 140, 
    48, 48, 48, 48, 598, 599, 600, 600, 601, 602, 140, 140, 140, 140, 603, 604],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 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, 605, 
    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, 606],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 607, 608, 140, 609, 610, 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, 611, 612, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
    [209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 192, 
    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, 322, 140, 140, 140, 140, 
    32, 32, 613, 32, 614, 209, 209, 209, 209, 209, 209, 209, 322, 140, 140, 140],
    [209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 323, 
    209, 209, 615, 209, 209, 209, 616, 617, 618, 209, 619, 209, 209, 209, 287, 140, 
    209, 209, 209, 209, 620, 140, 140, 140, 140, 140, 140, 140, 271, 621, 271, 621, 
    209, 209, 209, 209, 209, 338, 271, 461, 140, 140, 140, 140, 140, 140, 140, 140],
    [9, 622, 11, 623, 624, 625, 241, 9, 626, 627, 628, 629, 630, 9, 622, 11, 
    631, 632, 11, 633, 634, 635, 636, 9, 637, 11, 9, 622, 11, 623, 624, 11, 
    241, 9, 626, 636, 9, 637, 11, 9, 622, 11, 638, 9, 639, 640, 641, 642, 
    11, 643, 9, 644, 645, 646, 647, 11, 648, 9, 649, 11, 650, 651, 652, 653],
    [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, 654, 32, 32, 655, 656, 657, 658, 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, 
    659, 660, 661, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
    [662, 663, 664, 27, 27, 27, 665, 140, 666, 140, 140, 140, 140, 140, 140, 140, 
    48, 48, 151, 667, 668, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 669, 140, 48, 48, 670, 671, 
    140, 140, 140, 140, 140, 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, 672, 192, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 48, 587, 673, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 674, 200],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 675, 614, 140, 140, 
    9, 9, 626, 11, 676, 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, 503, 271, 271, 677, 678, 140, 140, 140, 140, 
    503, 271, 679, 680, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    681, 48, 682, 683, 684, 685, 686, 687, 688, 206, 689, 206, 140, 140, 140, 690, 
    140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140],
    [209, 209, 691, 209, 209, 209, 209, 209, 209, 322, 333, 692, 692, 692, 209, 323, 
    693, 209, 209, 209, 209, 209, 209, 209, 209, 209, 694, 140, 140, 140, 695, 209, 
    696, 209, 209, 691, 697, 698, 323, 140, 140, 140, 140, 140, 140, 140, 140, 140, 
    209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 699],
    [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, 700, 426, 426, 
    209, 209, 209, 209, 209, 209, 209, 701, 209, 209, 209, 209, 209, 176, 691, 427],
    [691, 209, 209, 209, 702, 176, 209, 209, 702, 209, 694, 691, 698, 140, 140, 140, 
    209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 
    209, 209, 209, 209, 209, 322, 694, 426, 703, 209, 209, 209, 704, 705, 176, 697, 
    209, 209, 209, 209, 209, 209, 209, 209, 209, 706, 209, 209, 209, 209, 209, 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, 481, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 
    48, 48, 48, 48, 48, 48, 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, 48],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 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],
    [48, 48, 48, 48, 48, 48, 48, 48, 48, 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],
    [707, 140, 584, 584, 584, 584, 584, 584, 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, 708]]
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, 13, 13, 
    36, 37, 33, 33, 33, 33, 33, 33, 38, 33, 39, 40, 13, 13, 13, 13, 
    13, 41, 13, 42, 33, 33, 33, 33, 33, 33, 33, 43, 44, 33, 33, 45, 
    33, 33, 33, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 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, 58, 13, 13, 13, 59, 60, 13, 
    13, 13, 13, 61, 13, 13, 13, 13, 13, 13, 62, 63, 33, 33, 64, 33, 
    13, 13, 13, 13, 65, 13, 13, 13, 66, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    67, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 
    33, 33, 33, 33, 33, 33, 33, 33, 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, 68, 
    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, 68]


def code_property(ch):
    return pool[pool2[buf3[ch >> 10]][(ch >> 4) & 0x3F]][ch & 0xF]


def code_category(ch):
    return code_property(ch) & 0x1F


def code_numeric(ch):
    return (code_property(ch) >> 5) - 1

import asyncio
import locale
import sys
import importlib
import os
import math

MAX_ARITY = 2147483647



def make_special(func):
    peek = Provable()
    peek.flags |= MASK_PRED_SPECIAL
    peek.func = func
    return peek


def make_check(func):
    peek = Provable()
    peek.flags |= MASK_PRED_TEST
    peek.func = func
    return peek


def make_arithmetic(func):
    peek = Provable()
    peek.flags |= MASK_PRED_ARITH
    peek.func = func
    return peek



def test_fail(args):
    return False


def test_cut(args):
    choice = exec_build(args[0])
    more(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 temp == "nothing":
        pass
    elif (is_structure(temp) and
            temp.functor == 'just' and
            len(temp.args) == 1):
        temp = deref(temp.args[0])
        bind(redo, temp)
    else:
        check_nonvar(temp)
        temp = copy_term(temp)
        raise make_error(Compound("type_error", ["maybe", temp]))


def solve_seq(peek):
    back = None
    res = None
    while (is_structure(peek) and
            peek.functor == "." and
            len(peek.args) == 2):
        temp = deref(peek.args[0])
        temp = Compound(".", [temp, NotImplemented])
        if back is None:
            res = temp
        else:
            back.args[1] = temp
        back = temp
        peek = deref(peek.args[1])
    check_nil(peek)
    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_structure(goal) and
            goal.functor == "." and
            len(goal.args) == 2):
        mark = trail
        peek = deref(goal.args[0])
        temp = deref(peek.args[0])
        solve_mark(temp)
        goal = deref(goal.args[1])
        if (is_structure(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)
        temp = deref(peek.args[1])
        solve_seq(temp)
        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:
        more(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"]))
    elif isinstance(err, MemoryError):
        err = make_error(Compound("system_error", ["out_of_memory"]))
    return err



def test_os_sleep_promise(args):
    delay = 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 = 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)
    if name is None:
        register_signal(buf,
            Compound("existence_error", ["module", url]))
    else:
        try:
            module = await asyncio.to_thread(blocking_import, name)
            res["module"] = module
        except SyntaxError:
            register_signal(buf,
                Compound("syntax_error", ["bad_module"]))
        except ModuleNotFoundError:
            register_signal(buf,
                Compound("existence_error", ["module", url]))


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 = exec_build(args[0])
    module.main()
    return True



def special_yield(args):
    if (engine.flags & SYS_MASK_ALLOW_YIELD) == 0:
        raise make_error(Compound("system_error", ["illegal_yield"]))
    cont(call.args[1])
    more(Choice(solve_signal, None, 0, 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 = engine.flags & SYS_MASK_ASYNC_MODE
    engine.flags &= ~SYS_MASK_ASYNC_MODE
    try:
        found = solve(snap, found)
    except Exception as err:
        engine.flags &= ~SYS_MASK_ASYNC_MODE
        engine.flags |= back
        snap_cleanup(snap)
        raise err from None
    engine.flags &= ~SYS_MASK_ASYNC_MODE
    engine.flags |= 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:
        more(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 = engine.flags & SYS_MASK_ASYNC_MODE
    engine.flags |= SYS_MASK_ASYNC_MODE
    try:
        found = solve(snap, found)
    except Exception as err:
        engine.flags &= ~SYS_MASK_ASYNC_MODE
        engine.flags |= back
        snap_cleanup(snap)
        raise err from None
    engine.flags &= ~SYS_MASK_ASYNC_MODE
    engine.flags |= 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:
        more(snap.tail)
    if found is True:
        cont(snap.cont.args[1])
    return found


def special_call(args):
    goal = deref(args[0])
    goal = Compound(".", [goal, call.args[1]])
    cont(goal)
    return True



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_structure(beta):
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["atomic", beta]))


def check_nil(beta):
    if beta == "[]":
        return
    if (is_structure(beta) and beta.functor == "."
            and len(beta.args) == 2):
        raise make_error(Compound("representation_error",
                          ["max_arity"]))
    else:
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error",
                          ["list", 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 = exec_deref(args[0])
    if is_variable(alpha) or is_pending(alpha):
        beta = exec_build(args[1])
        beta = special_univ_pack(beta)
        return exec_unify(alpha, beta)
    else:
        alpha = exec_build(alpha)
        alpha = special_univ_unpack(alpha)
        return exec_unify(args[1], alpha)


def special_univ_pack(beta):
    if (is_structure(beta) and
            "." == beta.functor and
            len(beta.args) == 2):
        pass
    else:
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["list", beta]))
    functor = deref(beta.args[0])
    check_atomic(functor)
    beta = deref(beta.args[1])
    args = list_objects(beta)
    if len(args) == 0:
        pass
    else:
        if is_number(functor):
            raise make_error(Compound("type_error", ["atom", functor]))
        functor = Compound(functor, args)
    return functor


def list_objects(obj):
    peek = obj
    arity = 0
    while (is_structure(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_structure(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_structure(alpha):
        temp = alpha.args
        alpha = alpha.functor
        return Compound(".", [alpha,
            objects_list(temp, 0, len(temp))])
    else:
        return Compound(".", [alpha, "[]"])


def objects_list(args, off, count):
    res = "[]"
    i = off + count - 1
    while i >= off:
        res = Compound(".", [args[i], res])
        i -= 1
    return res


def test_functor(args):
    alpha = exec_deref(args[0])
    if is_variable(alpha) or is_pending(alpha):
        functor = exec_build(args[1])
        check_atomic(functor)
        arity = 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:
            pass
        else:
            if is_number(functor):
                raise make_error(Compound("type_error", ["atom", functor]))
            temp = [NotImplemented] * arity
            i = 0
            while i < arity:
                temp[i] = Variable()
                i += 1
            functor = Compound(functor, temp)
        return exec_unify(alpha, functor)
    else:
        alpha = exec_build(alpha)
        if is_structure(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 = exec_build(args[0])
    check_integer(alpha)
    beta = exec_build(args[1])
    check_callable(beta)
    if is_structure(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 = exec_build(args[0])
    check_integer(alpha)
    beta = exec_build(args[1])
    check_callable(beta)
    gamma = exec_build(args[2])
    if is_structure(beta):
        arity = len(beta.args)
    else:
        arity = 0
    if alpha < 1 or arity < alpha:
        return False
    linkarg(gamma, beta, alpha)
    return True


def linkarg(source, term, pos):
    if is_frozen(term):
        raise make_error(Compound("permission_error",
                  ["modify", "compound", term]))
    if (term.walk & VAR_MASK_STATE) == gc_mask:
        mark2_term(source)
    term.args[pos-1] = source



def test_term_variables(args):
    alpha = exec_build(args[0])
    res = None
    back = None

    def term_variables2(node):
        nonlocal res
        nonlocal back
        peek = Compound(".", [node, NotImplemented])
        if back is None:
            res = peek
        else:
            back.args[1] = peek
        back = peek
        return False

    walk_vars(alpha, term_variables2, VAR_MASK_SEEN)
    if back is None:
        res = "[]"
    else:
        back.args[1] = "[]"
    walk_vars(alpha, lambda node: False, 0)
    return exec_unify(args[1], res)


def walk_vars(first, acceptor, state):
    stack = None
    while True:
        first = deref(first)
        if is_variable(first):
            if (first.flags & VAR_MASK_SEEN) != state:
                if acceptor(first):
                    return True
                first.flags = (first.flags & ~VAR_MASK_SEEN) | state
        elif is_compound(first):
            if (first.walk & VAR_MASK_SEEN) != state:
                first.walk = (first.walk & ~VAR_MASK_SEEN) | state
                if 0 != len(first.args) - 1:
                    first.walk &= ~VAR_MASK_SERNO
                    stack = stack_push(stack, first)
                first = first.args[0]
                continue
        item = stack_peek(stack)
        if item is None:
            return False
        else:
            item.walk += 1
            first = item.args[item.walk & VAR_MASK_SERNO]
            if (item.walk & VAR_MASK_SERNO) == len(item.args) - 1:
                stack_pop(stack)



def test_var(args):
    alpha = exec_build(args[0])
    return is_variable(alpha)


def test_compound(args):
    alpha = exec_build(args[0])
    return is_structure(alpha)


def test_reference(args):
    alpha = exec_build(args[0])
    if is_variable(alpha) or is_structure(alpha):
        return False
    if is_atom(alpha) or is_number(alpha):
        return False
    return True



def test_nonvar(args):
    alpha = exec_build(args[0])
    return not is_variable(alpha)


def test_atomic(args):
    alpha = exec_build(args[0])
    if is_structure(alpha) or is_variable(alpha):
        return False
    return True


def test_number(args):
    alpha = exec_build(args[0])
    return is_number(alpha)


def test_float(args):
    alpha = exec_build(args[0])
    return is_float(alpha) and not is_infinite(alpha)



def test_integer(args):
    alpha = exec_build(args[0])
    return is_integer(alpha)


def test_atom(args):
    alpha = exec_build(args[0])
    return is_atom(alpha)


def test_callable(args):
    alpha = exec_build(args[0])
    if is_variable(alpha) or is_number(alpha):
        return False
    return True


def test_must_be(args):
    alpha = exec_build(args[0])
    check_atom(alpha)
    beta = exec_build(args[1])
    if "integer" == alpha:
        check_integer(beta)
    elif "atom" == alpha:
        check_atom(beta)
    elif "callable" == alpha:
        check_callable(beta)
    else:
        raise make_error(Compound("type_error",
                ["type", alpha]))
    return True



def is_infinite(alpha):
    return alpha == math.inf or alpha == -math.inf


def narrow_float(alpha):
    if is_float(alpha):
        if is_infinite(alpha):
            raise make_error(Compound("evaluation_error", ["undefined"]))
        return alpha
    else:
        try:
            return float(alpha)
        except OverflowError:
            raise make_error(Compound("evaluation_error", ["float_overflow"]))


def norm_float(alpha):
    if math.isnan(alpha):
        raise make_error(Compound("evaluation_error", ["undefined"]))
    if math.isinf(alpha):
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    if alpha == 0.0:
        return 0.0
    return alpha



def test_code_category(args):
    alpha = exec_build(args[0])
    check_integer(alpha)
    if alpha < 0 or alpha > 0x10FFFF:
        alpha = 0  # UNASSIGNED
    else:
        alpha = code_category(alpha)
    return exec_unify(args[1], alpha)


def test_code_numeric(args):
    alpha = 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):
    radix = exec_build(args[1])
    check_integer(radix)
    if radix < 2 or radix > 36:
        raise make_error(Compound("domain_error", ["radix", radix]))
    text = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        beta = exec_build(args[2])
        check_integer(beta)
        if beta >= 0:
            beta = atom_integer_encode(beta, radix)
        else:
            beta = "-" + atom_integer_encode(- beta, radix)
        return exec_unify(text, beta)
    else:
        text = exec_build(text)
        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 ValueError:
        raise make_error(Compound("syntax_error", ["illegal_number"]))


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_atom_number(args):
    text = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        beta = exec_build(args[1])
        check_number(beta)
        beta = atom_number_encode(beta)
        return exec_unify(text, beta)
    else:
        text = exec_build(text)
        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:
        res = "%.16g" % num
        if float(res) != num:
            res = "%.17g" % num
        return shape_number(res)


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 res.startswith("+"):
        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 ValueError:
            raise make_error(Compound("syntax_error", ["illegal_number"]))
    else:
        try:
            return int(text)
        except ValueError:
            raise make_error(Compound("syntax_error", ["illegal_number"]))



def test_atom_exotic(args):
    text = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        obj = exec_build(args[1])
        if obj is True:
            obj = "True"
        elif obj is False:
            obj = "False"
        elif obj is None:
            obj = "None"
        elif obj == math.inf:
            obj = "Inf"
        elif is_number(obj):
            obj = "Special"
        else:
            obj = "Reference"
        return exec_unify(text, obj)
    else:
        text = exec_build(text)
        check_atom(text)
        if text == "True":
            obj = True
        elif text == "False":
            obj = False
        elif text == "None":
            obj = None
        elif text == "Inf":
            obj = math.inf
        else:
            obj = NotImplemented
        if obj is NotImplemented:
            raise make_error(Compound("syntax_error", ["illegal_exotic"]))
        return exec_unify(args[1], obj)



def test_os_get_gestalt(args):
    gestalt = {}
    scm = os.environ.get("TERM_SCHEME", None)
    gestalt["sys_color"] = scm if scm is not None else "normal"
    loc = locale.getlocale()[0]
    gestalt["sys_locale"] = loc if loc is not None else ""
    res = objects_list(sys.argv, 1, len(sys.argv)-1)
    gestalt["argv"] = res
    return exec_unify(args[0], gestalt)



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("call", 1, make_special(special_call))

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("term_variables", 2, make_check(test_term_variables))

add("var", 1, make_check(test_var))
add("compound", 1, make_check(test_compound))
add("reference", 1, make_check(test_reference))
add("nonvar", 1, make_check(test_nonvar))
add("atomic", 1, make_check(test_atomic))
add("number", 1, make_check(test_number))
add("float", 1, make_check(test_float))

add("integer", 1, make_check(test_integer))
add("atom", 1, make_check(test_atom))
add("callable", 1, make_check(test_callable))
add("must_be", 2, make_check(test_must_be))

add("code_category", 2, make_check(test_code_category))
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_exotic", 2, make_check(test_atom_exotic))

add("os_get_gestalt", 1, make_check(test_os_get_gestalt))

import os
import platform
import asyncio
import stat
import errno

MAX_BUF = 4096

bootbase = ""


def set_bootbase(url):
    global bootbase
    bootbase = url



MASK_DST_COLR = 0x00000004
MASK_DST_CYCL = 0x00000008
MASK_DST_FEAT = MASK_DST_COLR | MASK_DST_CYCL


class Sink:
    def __init__(self):
        self.buf = ""
        self.send = lambda fd, buf: fd
        self.last = -1
        self.flags = 0
        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 = exec_build(args[0])
    check_sink(obj)
    engine.text_output = obj
    return True


def test_set_error(args):
    obj = 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_atom(args):
    stream = exec_build(args[0])
    check_sink(stream)
    text = exec_build(args[1])
    check_atom(text)
    put_atom(stream, text)
    return True


def put_atom(stream, text):
    if len(text) > 0:
        stream.last = last_code(text)
        if stream.buf is not None:
            stream.buf += text
            if len(stream.buf) >= MAX_BUF:
                flush_buffer(stream)
        else:
            stream.data = stream.send(stream.data, text)


def last_code(text):
    return ord(text[len(text)-1])


def flush_buffer(stream):
    if stream.buf is not None and len(stream.buf) > 0:
        text = stream.buf
        stream.buf = ""
        stream.data = stream.send(stream.data, text)



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 = 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_get_code(args):
    stream = 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 = 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_opts(args):
    url = exec_build(args[0])
    check_atom(url)
    opts = exec_build(args[1])
    stream = Source()
    if not exec_unify(args[2], stream):
        return False
    buf = ctx
    prom = open_file_promise_opts(buf, stream, url, opts)
    return exec_unify(args[3], lambda: prom)


def get_encoding(opts):
    if opts is not None and "encoding" in opts:
        return opts["encoding"]
    else:
        return "utf8"


async def open_file_promise_opts(buf, stream, url, opts):
    enc = get_encoding(opts)
    try:
        file = await asyncio.to_thread(open, url, encoding=enc, newline='')
    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):
    if hasattr(err, 'reason'):
        code = err.reason.errno
        if code == 11001:
            return Compound("resource_error", ["unknown_host"])
        else:
            return Compound("resource_error", ["connect_failed"])
    else:
        code = err.errno
        if code == errno.ENOENT or errno.EACCES:
            return Compound("existence_error", ["source_sink", url])
        else:
            return Compound("resource_error", ["remote_error"])




def test_os_read_promise(args):
    stream = exec_build(args[0])
    buf = ctx
    return exec_unify(args[1], lambda: stream.receive(buf, stream))


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):
    if data.fileno() == 0:
        return data.readline(8192)
    else:
        return data.read(8192)


def map_stream_error(err):
    code = err.errno
    if code == errno.ETIMEDOUT:
        return Compound("resource_error", ["socket_timeout"])
    elif code == errno.EADDRINUSE:
        return Compound("resource_error", ["port_error"])
    elif code == errno.ECONNRESET:
        return Compound("resource_error", ["remote_error"])
    else:
        return Compound("resource_error", ["io_exception"])


def test_os_close_promise(args):
    stream = 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_prop_promise(args):
    url = exec_build(args[0])
    check_atom(url)
    res = {}
    if not exec_unify(args[1], res):
        return False
    buf = ctx
    prom = prop_file_promise(buf, url, res)
    return exec_unify(args[2], lambda: prom)


async def prop_file_promise(buf, url, res):
    try:
        stats = await asyncio.to_thread(os.stat, url)
        ftype = "regular" if stat.S_ISREG(stats.st_mode) else \
            ("directory" if stat.S_ISDIR(stats.st_mode) else "other")

        res["last_modified"] = stats.st_mtime_ns // 1000000
        res["absolute_path"] = os.path.abspath(url)
        res["type"] = ftype
        res["can_write"] = "true" if (stats.st_mode & 0x80) != 0 else "false"
    except OSError as err:
        register_signal(buf, map_file_error(err, url))
        return



def test_os_stream_flags(args):
    obj = exec_build(args[0])
    if isinstance(obj, Source):
        flags = obj.flags
    else:
        check_sink(obj)
        flags = obj.flags
    return exec_unify(args[1], flags)


def test_os_open_sync_opts(args):
    url = exec_build(args[0])
    check_atom(url)
    mode = exec_build(args[1])
    check_atom(mode)
    opts = exec_build(args[2])
    if "read" == mode:
        raise make_error(Compound("resource_error",
                                  ["not_implemented"]))
    elif "write" == mode:
        stream = open_write(url, "w", opts)
    elif "append" == mode:
        stream = open_write(url, "a", opts)
    else:
        raise make_error(Compound("domain_error",
                                  ["io_mode", mode]))
    return exec_unify(args[3], stream)


def open_write(url, mode, opts):
    enc = get_encoding(opts)
    try:
        file = open(url, mode, encoding=enc, 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)
        return data
    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 = 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 = 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_cntrl_sync(args):
    url = exec_build(args[0])
    check_atom(url)
    prop = exec_build(args[1])
    if (is_structure(prop) and
            prop.functor == "last_modified"
            and len(prop.args) == 1):
        val = deref(prop.args[0])
        check_integer(val)
        if val < 0:
            raise make_error(Compound("domain_error",
                     ["not_less_than_zero", val]))
        try:
            os.utime(url, (val/1000, val/1000))
        except OSError as err:
            raise make_error(map_file_error(err, url))
    elif (is_structure(prop) and
            prop.functor == "can_write"
            and len(prop.args) == 1):
        val = deref(prop.args[0])
        check_atom(val)
        if "true" != val and "false" != val:
            raise make_error(Compound("domain_error",
                     ["boolean", val]))
        try:
            stats = os.stat(url)
            if "true" == val:
                os.chmod(url, (stats.st_mode | 0x80))
            else:
                os.chmod(url, (stats.st_mode & ~0x80))
        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_os_read_sync(args):
    stream = exec_build(args[0])
    stream.buf = stream.receive(stream.data)
    stream.pos = 0
    return True



def test_ir_anon_new(args):
    alpha = NotImplemented
    return exec_unify(args[0], Quote(alpha))


def test_ir_place_new(args):
    alpha = exec_build(args[0])
    check_integer(alpha)
    alpha = Place(alpha)
    return exec_unify(args[1], Quote(alpha))


def test_ir_skeleton_new(args):
    alpha = exec_build(args[0])
    beta = 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_make_frozen(args):
    alpha = exec_build(args[0])
    beta = exec_build(args[1])
    beta = list_objects(beta)
    alpha = Frozen(alpha, beta)
    return exec_unify(args[2], alpha)



def test_ir_pred_site(args):
    alpha = exec_build(args[0])
    if is_structure(alpha):
        if is_atom(alpha.functor):
            alpha = Compound(Cache(alpha.functor), alpha.args)
    elif is_atom(alpha):
        alpha = Cache(alpha)
    return exec_unify(args[1], alpha)


def test_ir_is_site(args):
    alpha = exec_build(args[0])
    if is_structure(alpha):
        return is_cache(alpha.functor)
    return is_cache(alpha)


def test_ir_site_name(args):
    alpha = exec_build(args[0])
    if is_structure(alpha):
        if is_cache(alpha.functor):
            alpha = Compound(alpha.functor.name, alpha.args)
    elif is_cache(alpha):
        alpha = alpha.name
    return exec_unify(args[1], alpha)



def test_ir_clause_new(args):
    alpha = exec_build(args[0])
    check_integer(alpha)
    beta = exec_build(args[1])
    beta = list_objects(beta)
    gamma = exec_build(args[2])
    gamma = list_objects(gamma)
    delta = exec_build(args[3])
    check_integer(delta)
    mue = exec_build(args[4])
    if is_structure(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 = exec_build(args[0])
    check_atom(functor)
    arity = exec_build(args[1])
    check_integer(arity)
    gamma = exec_build(args[2])
    flags = exec_build(args[3])
    check_integer(flags)
    add_clause(functor, arity, gamma, flags)
    return True



def test_ir_goal_new(args):
    alpha = exec_build(args[0])
    check_integer(alpha)
    beta = exec_build(args[1])
    beta = list_objects(beta)
    gamma = exec_build(args[2])
    check_integer(gamma)
    unquote_objects(beta)
    return exec_unify(args[3], Goal(alpha, beta, gamma))


def special_ir_goal_call(args):
    goal = deref(args[0])
    check_goal(goal)
    goal = melt_directive(goal)
    solve_seq(goal)
    return True


def check_goal(beta):
    if not is_goal(beta):
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["goal", beta]))



MASK_FIND_MODIFY = 0x00000001
MASK_FIND_DYNAMIC = 0x00000002
MASK_FIND_REVERSE = 0x00000004


def special_kb_clause_ref(args):
    head = deref(args[0])
    check_callable(head)
    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_structure(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 = exec_build(args[0])
    check_atom(functor)
    arity = exec_build(args[1])
    check_integer(arity)
    flags = exec_build(args[2])
    check_integer(flags)
    pred_touch(functor, arity, flags)
    return True



def test_kb_clause_remove(args):
    functor = exec_build(args[0])
    check_atom(functor)
    arity = exec_build(args[1])
    check_integer(arity)
    flags = exec_build(args[2])
    check_integer(flags)
    clause = exec_build(args[3])
    check_clause(clause)
    return remove_clause(functor, arity, clause, flags)


def check_clause(beta):
    if not is_clause(beta):
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["clause", beta]))


def test_kb_pred_destroy(args):
    functor = exec_build(args[0])
    check_atom(functor)
    arity = exec_build(args[1])
    check_integer(arity)
    pred_destroy(functor, arity)
    return True



def test_kb_make_defined(args):
    alpha = exec_build(args[0])
    alpha = list_objects(alpha)
    offset = exec_build(args[1])
    check_integer(offset)
    return exec_unify(args[2], make_defined(alpha, offset))


def test_kb_pred_link(args):
    functor = exec_build(args[0])
    check_atom(functor)
    arity = 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_is_link(args):
    alpha = exec_build(args[0])
    if is_structure(alpha):
        return is_provable(alpha.functor)
    return is_provable(alpha)


def test_kb_link_flags(args):
    peek = exec_build(args[0])
    check_provable(peek)
    res = peek.flags >> MASK_PRED_BITS
    return exec_unify(args[1], res)


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_shard(args):
    clause = exec_build(args[0])
    check_clause(clause)
    return exec_unify(args[1], clause.shard)


def test_kb_clause_arity(args):
    clause = exec_build(args[0])
    check_clause(clause)
    res = len(clause.head)
    return exec_unify(args[1], res)



def special_kb_clause_head(args):
    clause = deref(args[0])
    check_clause(clause)
    head = deref(args[1])
    if is_structure(head):
        paras = head.args
    else:
        paras = VOID_ARGS
    if clause.size != 0:
        display = [NotImplemented] * clause.size
    else:
        display = None
    if not exec_head(clause.head, display, paras):
        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 is_structure(head):
        paras = head.args
    else:
        paras = VOID_ARGS
    if clause.size != 0:
        display = [NotImplemented] * clause.size
    else:
        display = None
    if not exec_head(clause.head, display, paras):
        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_get_partition(args):
    return exec_unify(args[0], engine.partition)


def test_dg_set_partition(args):
    value = exec_build(args[0])
    check_atom(value)
    set_partition(value)
    return True


def test_sys_flags_get(args):
    return exec_unify(args[0], engine.flags)



def test_sys_flag_map(args):
    res = {}
    res["system_url"] = bootbase
    res["foreign_ext"] = ".py"
    res["host_info"] = platform.python_implementation()+", Python "+platform.python_version()
    res["mach_info"] = platform.processor()+", "+platform.platform()
    return exec_unify(args[0], 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 = 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_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 = exec_build(args[0])
    check_integer(value)
    set_stage(value)
    return True



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_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_get_code", 2, make_check(test_os_get_code))
add("os_peek_code", 2, make_check(test_os_peek_code))
add("os_open_promise_opts", 4, make_check(test_os_open_promise_opts))
add("os_read_promise", 2, make_check(test_os_read_promise))
add("os_close_promise", 2, make_check(test_os_close_promise))
add("os_prop_promise", 3, make_check(test_os_prop_promise))

add("os_stream_flags", 2, make_check(test_os_stream_flags))
add("os_open_sync_opts", 4, make_check(test_os_open_sync_opts))
add("flush_output", 1, make_check(test_flush_output))
add("os_close_sync", 1, make_check(test_os_close_sync))
add("os_cntrl_sync", 2, make_check(test_os_cntrl_sync))
add("os_read_sync", 1, make_check(test_os_read_sync))

add("ir_anon_new", 1, make_check(test_ir_anon_new))
add("ir_place_new", 2, make_check(test_ir_place_new))
add("ir_skeleton_new", 3, make_check(test_ir_skeleton_new))
add("ir_make_frozen", 3, make_check(test_ir_make_frozen))
add("ir_pred_site", 2, make_check(test_ir_pred_site))
add("ir_is_site", 1, make_check(test_ir_is_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", 4, make_check(test_ir_goal_new))
add("ir_goal_call", 1, make_special(special_ir_goal_call))

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", 3, make_check(test_kb_make_defined))
add("kb_pred_link", 3, make_check(test_kb_pred_link))
add("kb_is_link", 1, make_check(test_kb_is_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_shard", 2, make_check(test_kb_clause_shard))
add("kb_clause_arity", 2, make_check(test_kb_clause_arity))
add("kb_clause_head", 2, make_special(special_kb_clause_head))
add("kb_clause_data", 4, make_special(special_kb_clause_data))
add("dg_get_partition", 1, make_check(test_dg_get_partition))
add("dg_set_partition", 1, make_check(test_dg_set_partition))

add("sys_flags_get", 1, make_check(test_sys_flags_get))
add("sys_flag_map", 1, make_check(test_sys_flag_map))
add("os_get_workdir", 1, make_check(test_os_get_workdir))
add("os_set_workdir", 1, make_check(test_os_set_workdir))

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))


import math
import sys
import struct



def test_eval(args):
    try:
        res = exec_eval(args[1])
        return exec_unify(args[0], res)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))



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])
    if is_integer(alpha) and is_integer(beta):
        return alpha + beta
    else:
        return norm_float(narrow_float(alpha) + narrow_float(beta))


def arit_sub(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    if is_integer(alpha) and is_integer(beta):
        return alpha - beta
    else:
        return norm_float(narrow_float(alpha) - narrow_float(beta))


def arit_mul(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    if is_integer(alpha) and is_integer(beta):
        return alpha * beta
    else:
        return norm_float(narrow_float(alpha) * narrow_float(beta))


def arit_quot(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    beta = narrow_float(beta)
    if beta == 0.0:
        raise make_error(Compound("evaluation_error", ["zero_divisor"]))
    return norm_float(narrow_float(alpha) / beta)


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])
    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 norm_float(math.pow(narrow_float(alpha), narrow_float(beta)))


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])
    if is_integer(alpha):
        return abs(alpha)
    else:
        return math.fabs(narrow_float(alpha))


def arit_sign(args):
    alpha = exec_eval(args[0])
    if is_integer(alpha):
        if alpha < 0:
            return -1
        elif alpha == 0:
            return 0
        else:
            return 1
    else:
        alpha = narrow_float(alpha)
        if alpha < 0.0:
            return -1.0
        elif alpha == 0.0:
            return 0.0
        else:
            return 1.0


def arit_min(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    if is_infinite(alpha) or is_infinite(beta):
        if alpha == math.inf:
            return beta
        elif beta == math.inf:
            return alpha
        elif alpha == -math.inf:
            return alpha
        else:
            return beta
    elif 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_infinite(alpha) or is_infinite(beta):
        if alpha == -math.inf:
            return beta
        elif beta == -math.inf:
            return alpha
        elif alpha == math.inf:
            return alpha
        else:
            return beta
    elif is_integer(alpha) and is_integer(beta):
        return max(alpha, beta)
    else:
        return max(narrow_float(alpha), narrow_float(beta))


def arit_inf(args):
    return math.inf



def arit_truncate(args):
    alpha = exec_eval(args[0])
    if is_integer(alpha):
        return alpha
    else:
        return math.trunc(narrow_float(alpha))


def arit_floor(args):
    alpha = exec_eval(args[0])
    if is_integer(alpha):
        return alpha
    else:
        return math.floor(narrow_float(alpha))


def arit_ceiling(args):
    alpha = exec_eval(args[0])
    if is_integer(alpha):
        return alpha
    else:
        return math.ceil(narrow_float(alpha))


def arit_round(args):
    alpha = exec_eval(args[0])
    if is_integer(alpha):
        return alpha
    else:
        return (math.floor(2*narrow_float(alpha))+1) >> 1



def test_numberequal(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return number_equal(alpha, beta)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def test_numbernotequal(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return not number_equal(alpha, beta)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def number_equal(alpha, beta):
    if is_infinite(alpha) or is_infinite(beta):
        return alpha == beta
    elif is_integer(alpha) and is_integer(beta):
        return alpha == beta
    else:
        return narrow_float(alpha) == narrow_float(beta)


def test_numberless(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return number_less(alpha, beta)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def test_numbergreaterequal(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return not number_less(alpha, beta)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def test_numbergreater(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return number_less(beta, alpha)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def test_numberlessequal(args):
    try:
        alpha = exec_eval(args[0])
        beta = exec_eval(args[1])
        return not number_less(beta, alpha)
    except OverflowError:
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    except ValueError:
        raise make_error(Compound("evaluation_error", ["undefined"]))


def number_less(alpha, beta):
    if is_infinite(alpha) or is_infinite(beta):
        if alpha == beta:
            return False
        if beta == math.inf:
            return True
        if alpha == -math.inf:
            return True
        return False
    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 norm_float(math.sin(narrow_float(alpha)))


def arit_cos(args):
    alpha = exec_eval(args[0])
    return norm_float(math.cos(narrow_float(alpha)))


def arit_tan(args):
    alpha = exec_eval(args[0])
    return norm_float(math.tan(narrow_float(alpha)))


def arit_asin(args):
    alpha = exec_eval(args[0])
    return norm_float(math.asin(narrow_float(alpha)))


def arit_acos(args):
    alpha = exec_eval(args[0])
    return norm_float(math.acos(narrow_float(alpha)))


def arit_atan(args):
    alpha = exec_eval(args[0])
    return norm_float(math.atan(narrow_float(alpha)))


def arit_pi(args):
    return math.pi



def arit_pow(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    return norm_float(math.pow(narrow_float(alpha), narrow_float(beta)))


def arit_exp(args):
    alpha = exec_eval(args[0])
    return norm_float(math.exp(narrow_float(alpha)))


def arit_log(args):
    alpha = exec_eval(args[0])
    return norm_float(math.log(narrow_float(alpha)))


def arit_sqrt(args):
    alpha = exec_eval(args[0])
    return norm_float(math.sqrt(narrow_float(alpha)))


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])
    alpha = narrow_float(alpha)
    beta = narrow_float(beta)
    if alpha == 0.0 and beta == 0.0:
        raise make_error(Compound("evaluation_error", ["undefined"]))
    else:
        return norm_float(math.atan2(alpha, beta))



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):
    stack = None
    log = None
    try:
        while True:
            first = deref(first)
            second = deref(second)
            if not is_structure(first):
                if not object_equals(first, second):
                    break
            elif not is_structure(second):
                break
            elif len(first.args) != len(second.args):
                break
            else:
                first = union_find(first)
                second = union_find(second)
                if first.functor != second.functor:
                    break
                elif first is not second:
                    log = union_add(log, first, second)
                    if 0 != len(first.args) - 1:
                        item = Item(first, second, 0)
                        stack = stack_push(stack, item)
                    first = first.args[0]
                    second = second.args[0]
                    continue
            item = stack_peek(stack)
            if item is None:
                return True
            else:
                item.idx += 1
                first = item.first.args[item.idx]
                second = item.second.args[item.idx]
                if item.idx == len(item.first.args) - 1:
                    stack_pop(stack)
        return False
    finally:
        union_undo(log)



def test_same_term(args):
    alpha = exec_build(args[0])
    beta = exec_build(args[1])
    return object_equals(alpha, beta)


def test_hash_code(args):
    alpha = exec_build(args[0])
    alpha = object_hash_code(alpha)
    return exec_unify(args[1], alpha)


def object_hash_code(alpha):
    if is_variable(alpha):
        return variable_serno(alpha)
    elif is_atom(alpha):
        res = 0
        i = 0
        while i < len(alpha):
            res = int32(res * 31 + ord(alpha[i]))
            i += 1
        return res
    elif is_number(alpha):
        if is_integer(alpha):
            if -0x8000000 < alpha <= 0x7FFFFFFF:
                return alpha
            else:
                if alpha < 0:
                    sign = -1
                    alpha = -alpha
                else:
                    sign = 1
                alpha = "%x" % alpha
                res = 0
                i = len(alpha) % 8
                if i > 0:
                    res = int32(int(alpha[0:i], 16))
                while i < len(alpha):
                    res = int32(res * 31 + int(alpha[i:i+8], 16))
                    i += 8
                return res*sign
        else:
            beta = struct.pack(">d", alpha)
            gamma = struct.unpack(">l", beta[0:4]) + struct.unpack(">l", beta[4:8])
            return gamma[0] ^ gamma[1]
    elif alpha is None:
        return 0
    elif alpha is True:
        return 1231
    elif alpha is False:
        return 1237
    else:
        return 2467


def int32(alpha):
    alpha &= 0xFFFFFFFF
    if alpha >= 0x80000000:
        return alpha - 0x100000000
    else:
        return alpha


def variable_serno(alpha):
    val = alpha.flags & VAR_MASK_SERNO
    if val == VAR_MASK_SERNO:
        if engine.low < engine.high:
            val = engine.low
            engine.low = val + 1
        else:
            val = engine.serno
            engine.serno = val + 1
        alpha.flags &= ~VAR_MASK_SERNO
        alpha.flags |= val
    return val



def test_atom_codes(args):
    text = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        res = exec_build(args[1])
        res = atom_codes_pack(res)
        return exec_unify(text, res)
    else:
        text = exec_build(text)
        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_structure(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("type_error", ["character_code", ch]))
        i += 1
        temp = deref(temp.args[1])
    check_nil(temp)
    res = [NotImplemented] * i
    temp = peek
    i = 0
    while (is_structure(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 = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        ch = exec_build(args[1])
        check_integer(ch)
        if ch < 0 or ch > 0x10FFFF:
            raise make_error(Compound("type_error", ["character_code", ch]))
        ch = chr(ch)
        return exec_unify(text, ch)
    else:
        text = exec_build(text)
        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 = exec_build(args[0])
    check_atom(text)
    return exec_unify(args[1], len(text))


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 test_atom_join(args):
    alpha = exec_build(args[0])
    res = atom_join(alpha)
    return exec_unify(args[1], res)


def atom_join(res):
    peek = res
    i = 0
    while is_structure(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_structure(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 "".join(elems)



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("is", 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("inf", 1, make_arithmetic(arit_inf))

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("same_term", 2, make_check(test_same_term))
add("hash_code", 2, make_check(test_hash_code))

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_concat", 3, make_special(special_atom_concat))

add("atom_join", 2, make_check(test_atom_join))
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 asyncio
import math
import calendar
import urllib.request
import urllib.error
import http.client
import time


def post(message):
    register_signal("main", message)
    invoke_interrupt("main")


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)



FFI_FUNC = 0x00000100


def register(functor, arity, func, flags):
    if (flags & FFI_FUNC) != 0:
        res = make_check(lambda args: invoke_func(func, args))
    else:
        res = make_check(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] = exec_build(args[i])
        i += 1
    func(*temp)
    return True


def invoke_func(func, args):
    temp = [NotImplemented] * (len(args) - 1)
    i = 0
    while i < len(temp):
        temp[i] = exec_build(args[i])
        i += 1
    res = func(*temp)
    return exec_unify(args[len(args) - 1], res)



def test_ir_object_new(args):
    res = {}
    return exec_unify(args[0], res)


def test_ir_object_current(args):
    obj = exec_build(args[0])
    key = exec_build(args[1])
    check_atom(key)
    if isinstance(obj, dict):
        res = obj.get(key, NotImplemented)
    else:
        try:
            res = getattr(obj, key, NotImplemented)
        except AttributeError:
            res = NotImplemented
    if res is NotImplemented:
        return False
    return exec_unify(args[2], res)



def test_ir_object_set(args):
    obj = exec_build(args[0])
    key = exec_build(args[1])
    check_atom(key)
    value = exec_build(args[2])
    if isinstance(obj, dict):
        obj[key] = value
    else:
        try:
            setattr(obj, key, value)
        except Exception:
            raise make_error(Compound("permission_error",
                ["field", "modify", key]))
    return True


def test_ir_object_reset(args):
    obj = exec_build(args[0])
    key = exec_build(args[1])
    check_atom(key)
    if isinstance(obj, dict):
        if key in obj:
            del obj[key]
    else:
        try:
            if hasattr(obj, key):
                delattr(obj, key)
        except Exception:
            raise make_error(Compound("permission_error",
                ["field", "modify", key]))
    return True


def test_ir_object_keys(args):
    obj = exec_build(args[0])
    if isinstance(obj, dict):
        obj = obj.keys()
    else:
        obj = dir(obj)
    obj = set_to_list(obj)
    return exec_unify(args[1], obj)


def set_to_list(temp):
    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 = "[]"
    else:
        back.args[1] = "[]"
    return res



def test_ir_float_value(args):
    alpha = exec_deref(args[0])
    if is_variable(alpha) or is_pending(alpha):
        beta = exec_build(args[1])
        check_number(beta)
        res = norm_float(narrow_float(beta))
        return exec_unify(alpha, res)
    else:
        alpha = exec_build(alpha)
        check_number(alpha)
        res = narrow_float(alpha)
        return exec_unify(args[1], res)


def norm_float(alpha):
    if math.isnan(alpha):
        raise make_error(Compound("evaluation_error", ["undefined"]))
    if not math.isfinite(alpha):
        raise make_error(Compound("evaluation_error", ["float_overflow"]))
    if alpha == 0.0:
        return 0.0
    return alpha



def test_os_call_later(args):
    goal = exec_build(args[0])
    check_goal(goal)
    delay = exec_build(args[1])
    check_integer(delay)
    if delay < 0:
        raise make_error(Compound("domain_error",
                                  ["not_less_than_zero", delay]))
    buf = ctx
    loop = asyncio.get_running_loop()
    tid = loop.call_later(delay/1000.0,
               lambda: callback(goal, buf, VOID_ARGS))
    return exec_unify(args[2], tid)


def test_timer_cancel(args):
    res = exec_build(args[0])
    check_timer(res)
    res.cancel()
    return True


def check_timer(beta):
    if not isinstance(beta, asyncio.TimerHandle):
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["timer", beta]))



def test_current_task(args):
    return exec_unify(args[0], ctx)


def test_task_abort(args):
    buf = exec_build(args[0])
    check_task(buf)
    msg = exec_build(args[1])
    msg = copy_term(msg)
    register_signal(buf, msg)
    invoke_interrupt(buf)
    return True


def check_task(beta):
    if beta != CTX_MAIN and not isinstance(beta, Context):
        check_nonvar(beta)
        beta = copy_term(beta)
        raise make_error(Compound("type_error", ["task", beta]))


def test_os_task_create(args):
    goal = exec_build(args[0])
    check_goal(goal)
    buf = Context()
    loop = asyncio.get_running_loop()
    loop.create_task(task_async(goal, buf, VOID_ARGS))
    return exec_unify(args[1], buf)



def test_net_open_promise_opts(args):
    url = exec_build(args[0])
    check_atom(url)
    opts = exec_build(args[1])
    stream = Source()
    if not exec_unify(args[2], stream):
        return False
    buf = ctx
    prom = open_http_promise_opts(buf, stream, url, opts)
    return exec_unify(args[3], lambda: prom)


async def open_http_promise_opts(buf, stream, url, opts):
    if opts is not None and "method" in opts:
        method = opts["method"]
    elif opts is not None and "body" in opts:
        method = "POST"
    else:
        method = "GET"
    if opts is not None and "body" in opts:
        opts2 = opts["body"]
        enc = get_encoding(opts2)
        body = opts2["text"].encode(enc)
    else:
        body = None
    if opts is not None and "headers" in opts:
        headers = opts["headers"]
    else:
        headers = {}
    request = urllib.request.Request(url,
                                     data=body, headers=headers, method=method)
    try:
        response = await asyncio.to_thread(urllib.request.urlopen, request)
    except http.client.RemoteDisconnected as err:
        register_signal(buf, map_stream_error(err))
        return
    except urllib.error.HTTPError as err:
        register_signal(buf, map_http_result(err, url))
        return
    except urllib.error.URLError as err:
        register_signal(buf, map_file_error(err, url))
        return
    if opts is not None:
        opts["uri"] = response.url
        opts["status"] = response.status
        res = {}
        vmap = response.headers
        for key in vmap:
            res[key.lower()] = vmap[key]
        opts["fields"] = res
    enc = get_encoding(opts)
    stream.data = response
    stream.receive = lambda b, s: http_read_promise(enc, b, s)
    stream.release = file_close_promise
    stream.flags |= MASK_SRC_AREAD


async def http_read_promise(enc, buf, stream):
    try:
        res = await asyncio.to_thread(blocking_chunk, enc, stream.data)
        stream.buf = res
        stream.pos = 0
    except IOError as err:
        register_signal(buf, map_stream_error(err))


def blocking_chunk(enc, data):
    return data.read().decode(enc)


def map_http_result(err, url):
    code = err.code
    if code == 403:  # Forbidden
        return Compound("permission_error",
                        ["open", "source_sink", url])
    elif code == 404:  # Not Found
        return Compound("existence_error",
                        ["source_sink", url])
    elif code == 405:  # Method Not Allowed
        return Compound("resource_error",
                        ["illegal_method"])
    elif code == 500:  # Internal Server Error
        return Compound("resource_error",
                        ["internal_error"])
    elif code == 503:  # Service Unavailable
        return Compound("resource_error",
                        ["service_unavailable"])
    else:
        return Compound("resource_error",
                        ["io_exception"])



HTTP_TIME = "%a, %d %b %Y %H:%M:%S GMT"

def test_net_prop_promise(args):
    url = exec_build(args[0])
    check_atom(url)
    res = {}
    if not exec_unify(args[1], res):
        return False
    buf = ctx
    prom = prop_http_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 http.client.RemoteDisconnected as err:
        register_signal(buf, map_stream_error(err))
        return
    except urllib.error.HTTPError as err:
        register_signal(buf, map_http_result(err, url))
        return
    except urllib.error.URLError as err:
        register_signal(buf, Compound("resource_error", ["url_exception"]))
        return

    val = response.headers.get("last-modified")
    mtime = sys_time_parse(val, HTTP_TIME, 1) \
        if val is not None else -1

    res["last_modified"] = mtime
    res["absolute_path"] = response.url
    res["type"] = "regular"
    res["can_write"] = "false"



def test_net_open_sync_opts(args):
    url = exec_build(args[0])
    check_atom(url)
    raise make_error(Compound("permission_error",
                  ["access", "source_sink", url]))


def test_net_cntrl_sync(args):
    url = exec_build(args[0])
    check_atom(url)
    raise make_error(Compound("permission_error",
                  ["access", "source_sink", url]))



def test_sys_atom_time(args):
    fmt = exec_build(args[1])
    check_atom(fmt)
    flag = exec_build(args[2])
    check_integer(flag)
    text = exec_deref(args[0])
    if is_variable(text) or is_pending(text):
        tms = exec_build(args[3])
        check_integer(tms)
        try:
            res = sys_time_format(fmt, tms, flag)
        except ValueError:
            raise make_error(Compound("domain_error", ["time_format", fmt]))
        return exec_unify(text, res)
    else:
        text = exec_build(text)
        check_atom(text)
        try:
            res = sys_time_parse(text, fmt, flag)
        except ValueError as err:
            if "in format" in err.args[0]:
                raise make_error(Compound("domain_error", ["time_format", fmt]))
            else:
                raise make_error(Compound("syntax_error", ["illegal_date"]))
        return exec_unify(args[3], res)


def sys_time_parse(text, fmt, utc):
    if utc != 0:
        locale.setlocale(locale.LC_TIME, (None, None))
        date = time.strptime(text, fmt)
        return calendar.timegm(date)*1000
    else:
        locale.setlocale(locale.LC_TIME, locale.getlocale())
        date = time.strptime(text, fmt)
        return int(time.mktime(date)*1000)


def sys_time_format(fmt, tms, utc):
    if utc != 0:
        date = time.gmtime(tms/1000)
        locale.setlocale(locale.LC_TIME, (None, None))
        return time.strftime(fmt, date)
    else:
        date = time.localtime(tms/1000)
        locale.setlocale(locale.LC_TIME, locale.getlocale())
        return time.strftime(fmt, date)



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_reset", 2, make_check(test_ir_object_reset))
add("ir_object_keys", 2, make_check(test_ir_object_keys))

add("ir_float_value", 2, make_check(test_ir_float_value))

add("os_call_later", 3, make_check(test_os_call_later))
add("timer_cancel", 1, make_check(test_timer_cancel))
add("current_task", 1, make_check(test_current_task))
add("task_abort", 2, make_check(test_task_abort))
add("os_task_create", 2, make_check(test_os_task_create))

add("net_open_promise_opts", 4, make_check(test_net_open_promise_opts))
add("net_prop_promise", 3, make_check(test_net_prop_promise))

add("net_open_sync_opts", 4, make_check(test_net_open_sync_opts))
add("net_cntrl_sync", 2, make_check(test_net_cntrl_sync))

add("sys_atom_time", 4, make_check(test_sys_atom_time))


import math

add("sys_trans_horn", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_trans_horn", 2, Clause(4, [Skeleton(":-", [Place(1)]), Skeleton("tr_goal", [Place(2), Place(3)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(2), Place(3), "[]"])], 0, ":-"))
add("sys_trans_horn", 2, Clause(5, [Skeleton(":-", [Place(1), Place(2)]), Skeleton("tr_clause", [Place(3), Place(1), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["callable", Place(1)]), Skeleton(Cache("sys_trans_body"), [Place(2), "nothing", Place(3), Place(4), "[]"])], 0, ":-"))
add("sys_trans_horn", 2, Clause(1, [Place(0), Skeleton("tr_clause", ["nothing", Place(0), "[]"])], [Skeleton(Cache("must_be"), ["callable", Place(0)])], -1, NotImplemented))
add("sys_trans_body", 5, Clause(5, [Place(1), Place(2), Place(2), Place(3), Place(4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Skeleton("call", [Place(1)]), Place(4)])])], 0, NotImplemented))
add("sys_trans_body", 5, Clause(4, ["true", Place(1), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "true"))
add("sys_trans_body", 5, Clause(9, [Skeleton(",", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(3), Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(7), Place(4), Place(8), Place(6)])], 0, ","))
add("sys_trans_body", 5, Clause(8, [Skeleton(";", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_disj"), [Skeleton(";", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(7)]), Skeleton(Cache("="), [Place(5), Skeleton(".", [Skeleton("$ALT", [Place(7)]), Place(6)])])], 0, ";"))
add("sys_trans_body", 5, Clause(8, [Skeleton("->", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_disj"), [Skeleton("->", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(7)]), Skeleton(Cache("="), [Place(5), Skeleton(".", [Skeleton("$ALT", [Place(7)]), Place(6)])])], 0, "->"))
add("sys_trans_body", 5, Clause(5, ["!", Place(1), Skeleton("just", [Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_cut"), [Place(1), Place(2)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Skeleton("$CUT", [Place(2)]), Place(4)])])], 0, "!"))
add("sys_trans_body", 5, Clause(4, [Place(0), Place(1), Place(1), Place(2), Place(3)], [Skeleton(Cache("must_be"), ["callable", Place(0)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [Place(0), Place(3)])])], -1, NotImplemented))
add("sys_trans_cut", 2, Clause(1, ["nothing", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "nothing"))
add("sys_trans_cut", 2, Clause(1, [Skeleton("just", [Place(0)]), Place(0)], [], -1, "just"))
add("sys_trans_disj", 5, Clause(5, [Place(1), NotImplemented, Place(2), Place(3), Skeleton(".", [Place(4), "[]"])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alter"), [Place(1), Place(2), Place(3), Place(4), NotImplemented])], 0, NotImplemented))
add("sys_trans_disj", 5, Clause(9, [Skeleton(";", [Place(1), Place(2)]), NotImplemented, Place(3), Place(4), Skeleton(".", [Place(5), Place(6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alter"), [Place(1), Place(3), Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_trans_disj"), [Place(2), Place(8), Place(7), Place(4), Place(6)])], 0, ";"))
add("sys_trans_disj", 5, Clause(2, ["fail", 1, Place(1), Place(1), "[]"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "fail"))
add("sys_trans_disj", 5, Clause(4, [Place(0), NotImplemented, Place(1), Place(2), Skeleton(".", [Place(3), "[]"])], [Skeleton(Cache("sys_trans_alter"), [Place(0), Place(1), Place(2), Place(3), NotImplemented])], -1, NotImplemented))
add("sys_trans_alter", 5, Clause(5, [Place(1), Place(2), Place(3), Skeleton("$SEQ", ["nothing", Place(4)]), 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_alter", 5, Clause(10, [Skeleton("->", [Place(1), Place(2)]), Place(3), Place(4), Skeleton("$SEQ", [Skeleton("just", [Place(5)]), Place(6)]), 1], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(7), Place(8), Skeleton(".", [Skeleton("$CUT", [Place(5)]), Place(9)])]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(3), Place(4), Place(9), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(7), Place(6), Place(8)])], 0, "->"))
add("sys_trans_alter", 5, Clause(4, [Place(0), Place(1), Place(2), Skeleton("$SEQ", ["nothing", Place(3)]), 0], [Skeleton(Cache("sys_trans_body"), [Place(0), Place(1), Place(2), Place(3), "[]"])], -1, NotImplemented))
add("sys_trans_mark", 3, Clause(3, [Skeleton("just", [Place(1)]), Skeleton(".", [Skeleton("$MARK", [Place(1)]), Place(2)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "just"))
add("sys_trans_mark", 3, Clause(1, ["nothing", Place(0), Place(0)], [], -1, "nothing"))
add("sys_untrans_body", 3, Clause(0, ["[]", NotImplemented, "true"], [], -1, "[]"))
add("sys_untrans_body", 3, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_untrans_rest"), [Place(1), Place(0), Place(2), Place(3)])], -1, "."))
add("sys_untrans_rest", 4, Clause(3, ["[]", Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_untrans_goal"), [Place(0), Place(1), Place(2)])], -1, "[]"))
add("sys_untrans_rest", 4, Clause(6, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Skeleton(",", [Place(4), Place(5)])], [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_goal", 3, Clause(4, [Skeleton("$ALT", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_untrans_disj"), [Place(1), Place(2), Place(3)])], 0, "$ALT"))
add("sys_untrans_goal", 3, Clause(3, [Skeleton("$CUT", [Place(1)]), Skeleton("just", [Place(2)]), "!"], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "$CUT"))
add("sys_untrans_goal", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
add("sys_untrans_disj", 3, Clause(0, ["[]", NotImplemented, "fail"], [], -1, "[]"))
add("sys_untrans_disj", 3, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_untrans_more"), [Place(1), Place(0), Place(2), Place(3)])], -1, "."))
add("sys_untrans_more", 4, Clause(4, ["[]", Skeleton("$SEQ", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_untrans_alter"), [Place(0), Place(1), Place(2), Place(3)])], -1, "[]"))
add("sys_untrans_more", 4, Clause(7, [Skeleton(".", [Place(0), Place(1)]), Skeleton("$SEQ", [Place(2), Place(3)]), Place(4), Skeleton(";", [Place(5), Place(6)])], [Skeleton(Cache("sys_untrans_alter"), [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_alter", 4, Clause(4, ["nothing", Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_untrans_body"), [Place(0), Place(1), Place(3)]), Skeleton(Cache("sys_untrans_ambiguity"), [Place(3), Place(2)])], -1, "nothing"))
add("sys_untrans_alter", 4, Clause(9, [Skeleton("just", [Place(0)]), Place(1), Place(2), Skeleton("->", [Place(3), Place(4)])], [Skeleton(Cache("sys_untrans_split"), [Place(1), Place(0), Place(5), Place(6)]), Skeleton(Cache("sys_trans_mark"), [Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_untrans_body"), [Place(8), Place(7), Place(3)]), Skeleton(Cache("sys_untrans_body"), [Place(6), Place(2), Place(4)])], -1, "just"))
add("sys_untrans_split", 4, Clause(4, [Skeleton(".", [Skeleton("$CUT", [Place(1)]), Place(2)]), Place(3), "[]", Place(2)], [Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("sys_untrans_split", 4, Clause(5, [Skeleton(".", [Place(0), Place(1)]), Place(2), Skeleton(".", [Place(0), Place(3)]), Place(4)], [Skeleton(Cache("sys_untrans_split"), [Place(1), Place(2), Place(3), Place(4)])], -1, "."))
add("sys_untrans_ambiguity", 2, Clause(3, [Skeleton("->", [Place(1), Place(2)]), Skeleton(";", [Skeleton("->", [Place(1), Place(2)]), "fail"])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "->"))
add("sys_untrans_ambiguity", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
add("sys_encode_horn", 4, Clause(5, [Skeleton("tr_goal", [Skeleton("just", [Place(1)]), Place(2)]), Skeleton("ir_goal", [Place(3), 0]), Place(4), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_body"), [Place(2), Place(3), Skeleton(".", [Place(1), "[]"]), Place(4), Skeleton(".", [Skeleton("v", [Place(1), 0, NotImplemented]), "[]"]), NotImplemented])], 0, "tr_goal"))
add("sys_encode_horn", 4, Clause(3, [Skeleton("tr_goal", ["nothing", Place(0)]), Skeleton("ir_goal", [Place(1), -1]), Place(2), NotImplemented], [Skeleton(Cache("sys_encode_body"), [Place(0), Place(1), "[]", Place(2), "[]", NotImplemented])], -1, "tr_goal"))
add("sys_encode_horn", 4, Clause(11, [Skeleton("tr_clause", [Skeleton("just", [Place(1)]), Place(2), Place(3)]), Skeleton("ir_clause", [Place(4), Place(5), 0, Place(6)]), Place(7), Place(8)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [NotImplemented, Place(9)])]), Skeleton(Cache("sys_encode_list"), [Place(9), Place(4), Place(7), Skeleton(".", [Skeleton("v", [Place(1), 0, NotImplemented]), "[]"]), Place(10)]), Skeleton(Cache("sys_encode_body"), [Place(3), Place(5), Skeleton(".", [Skeleton("-", [Place(2), Place(1)]), "[]"]), Place(7), Place(10), NotImplemented]), Skeleton(Cache("sys_idx_value"), [Place(2), Place(7), Place(8), Place(3), Place(6)])], 0, "tr_clause"))
add("sys_encode_horn", 4, Clause(9, [Skeleton("tr_clause", ["nothing", Place(0), Place(1)]), Skeleton("ir_clause", [Place(2), Place(3), -1, Place(4)]), Place(5), Place(6)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [NotImplemented, Place(7)])]), Skeleton(Cache("sys_encode_list"), [Place(7), Place(2), Place(5), "[]", Place(8)]), Skeleton(Cache("sys_encode_body"), [Place(1), Place(3), Skeleton(".", [Place(0), "[]"]), Place(5), Place(8), NotImplemented]), Skeleton(Cache("sys_idx_value"), [Place(0), Place(5), Place(6), Place(1), Place(4)])], -1, "tr_clause"))
add("sys_encode_body", 6, Clause(9, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("sys_encode_goal"), [Place(0), Place(5), Place(2), Place(1), Place(4), Place(6), Place(8)]), Skeleton(Cache("sys_encode_body"), [Place(1), Place(3), Skeleton(".", [Place(0), Place(4)]), Place(5), Place(8), Place(7)])], -1, "."))
add("sys_encode_body", 6, Clause(1, ["[]", "[]", NotImplemented, NotImplemented, Place(0), Place(0)], [], -1, "[]"))
add("sys_encode_goal", 7, Clause(10, [Skeleton("$ALT", [Place(1)]), 1, Place(2), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("vars_intersection"), [Place(1), Skeleton("-", [Place(4), Place(3)]), Place(7)]), Skeleton(Cache("=.."), [Place(8), Skeleton(".", ["", Place(7)])]), Skeleton(Cache("sys_encode_disj"), [Place(1), Place(8), Place(9), 1, 1]), Skeleton(Cache("sys_encode_invoke"), [Place(8), Place(2), Skeleton("link", [Place(9), 1]), Place(5), Place(6)])], 0, "$ALT"))
add("sys_encode_goal", 7, Clause(10, [Skeleton("is", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_term"), [Place(1), 1, Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", ["is"]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, "is"))
add("sys_encode_goal", 7, Clause(10, [Skeleton("=:=", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", ["=:="]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, "=:="))
add("sys_encode_goal", 7, Clause(10, [Skeleton("=\\=", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", ["=\\="]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, "=\\="))
add("sys_encode_goal", 7, Clause(10, [Skeleton("<", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", ["<"]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, "<"))
add("sys_encode_goal", 7, Clause(10, [Skeleton(">", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", [">"]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, ">"))
add("sys_encode_goal", 7, Clause(10, [Skeleton("=<", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", ["=<"]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, "=<"))
add("sys_encode_goal", 7, Clause(10, [Skeleton(">=", [Place(1), Place(2)]), 1, Place(3), NotImplemented, NotImplemented, Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_expr"), [Place(1), Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_encode_expr"), [Place(2), Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_const_functor"), [Frozen("site", [">="]), Skeleton(".", [Place(6), Skeleton(".", [Place(8), "[]"])]), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, ">="))
add("sys_encode_goal", 7, Clause(6, [Place(1), 1, Place(2), NotImplemented, NotImplemented, Place(3), Place(4)], [Skeleton(Cache("functor"), [Place(1), Place(5), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_invoke"), [Place(1), Place(2), Skeleton("site", [Place(5)]), Place(3), Place(4)])], 0, NotImplemented))
add("sys_encode_goal", 7, Clause(5, [Place(0), Place(1), Place(2), NotImplemented, NotImplemented, Place(3), Place(4)], [Skeleton(Cache("sys_encode_term"), [Place(0), Place(1), Place(2), Place(3), Place(4)])], -1, NotImplemented))
add("sys_encode_disj", 5, Clause(8, [Skeleton(".", [Skeleton("$SEQ", [Place(0), Place(1)]), Place(2)]), Place(3), Skeleton(".", [Place(4), Place(5)]), Place(6), Place(7)], [Skeleton(Cache("sys_encode_horn"), [Skeleton("tr_clause", [Place(0), Place(3), Place(1)]), Place(4), Place(6), Place(7)]), Skeleton(Cache("sys_encode_disj"), [Place(2), Place(3), Place(5), Place(6), Place(7)])], -1, "."))
add("sys_encode_disj", 5, Clause(0, ["[]", NotImplemented, "[]", NotImplemented, NotImplemented], [], -1, "[]"))
add("sys_encode_invoke", 5, Clause(9, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [NotImplemented, Place(6)])]), Skeleton(Cache("sys_encode_list"), [Place(6), Place(7), 1, Place(4), Place(8)]), Skeleton(Cache("sys_const_functor"), [Place(3), Place(7), Place(2)]), Skeleton(Cache("="), [Place(8), Place(5)])], 0, NotImplemented))
add("sys_encode_invoke", 5, Clause(2, [NotImplemented, Skeleton("const", [Place(0)]), Place(0), Place(1), Place(1)], [], -1, NotImplemented))
add("sys_encode_args", 4, Clause(7, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Place(4), Place(5)], [Skeleton(Cache("sys_encode_expr"), [Place(0), Place(2), Place(4), Place(6)]), Skeleton(Cache("sys_encode_args"), [Place(1), Place(3), Place(6), Place(5)])], -1, "."))
add("sys_encode_args", 4, Clause(1, ["[]", "[]", Place(0), Place(0)], [], -1, "[]"))
add("sys_encode_expr", 4, Clause(5, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_var"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_encode_expr", 4, Clause(9, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(5), Place(6)])]), Skeleton(Cache("sys_encode_args"), [Place(6), Place(7), Place(3), Place(8)]), Skeleton(Cache("sys_const_functor"), [Skeleton("site", [Place(5)]), Place(7), Place(2)]), Skeleton(Cache("="), [Place(8), Place(4)])], 0, NotImplemented))
add("sys_encode_expr", 4, Clause(4, [Place(1), Skeleton("const", [Skeleton("site", [Place(1)])]), Place(2), Place(3)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_encode_expr", 4, Clause(2, [Place(0), Skeleton("const", [Place(0)]), Place(1), Place(1)], [], -1, NotImplemented))
add("sys_encode_list", 5, Clause(8, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Place(4), Place(5), Place(6)], [Skeleton(Cache("sys_encode_term"), [Place(0), Place(4), Place(2), Place(5), Place(7)]), Skeleton(Cache("sys_encode_list"), [Place(1), Place(3), Place(4), Place(7), Place(6)])], -1, "."))
add("sys_encode_list", 5, Clause(1, ["[]", "[]", NotImplemented, Place(0), Place(0)], [], -1, "[]"))
add("sys_encode_term", 5, Clause(5, [Place(1), NotImplemented, Place(2), Place(3), Place(4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_var"), [Place(1), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_encode_term", 5, Clause(10, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(6), Place(7)])]), Skeleton(Cache("sys_encode_list"), [Place(7), Place(8), Place(2), Place(4), Place(9)]), Skeleton(Cache("sys_const_functor"), [Place(6), Place(8), Place(3)]), Skeleton(Cache("="), [Place(9), Place(5)])], 0, NotImplemented))
add("sys_encode_term", 5, Clause(2, [Place(0), NotImplemented, Skeleton("const", [Place(0)]), Place(1), Place(1)], [], -1, NotImplemented))
add("sys_const_functor", 3, Clause(4, [Place(1), Place(2), Skeleton("const", [Skeleton("functor", [Place(1), Place(3)])])], [Skeleton(Cache("sys_const_only"), [Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_const_functor", 3, Clause(2, [Place(0), Place(1), Skeleton("functor", [Place(0), Place(1)])], [], -1, NotImplemented))
add("sys_const_only", 2, Clause(3, [Skeleton(".", [Skeleton("const", [Place(0)]), Place(1)]), Skeleton(".", [Place(0), Place(2)])], [Skeleton(Cache("sys_const_only"), [Place(1), Place(2)])], -1, "."))
add("sys_const_only", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_encode_var", 4, Clause(9, [Place(1), Skeleton("place", [Place(2), Place(3)]), Place(4), Place(5)], [Skeleton(Cache("sys_current_map"), [Place(6), Place(4), Place(7)]), Skeleton(Cache("member"), [Skeleton("v", [Place(8), Place(2), Place(3)]), Place(6)]), Skeleton(Cache("=="), [Place(8), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), 1]), Skeleton(Cache("="), [Place(7), Place(5)])], 0, NotImplemented))
add("sys_encode_var", 4, Clause(7, [Place(0), Skeleton("place", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_map"), [Place(5), Place(3), Place(6)]), Skeleton(Cache("sys_set_map"), [Skeleton(".", [Skeleton("v", [Place(0), Place(1), Place(2)]), Place(5)]), Place(6), Place(4)])], -1, NotImplemented))
add("sys_current_map", 3, Clause(1, [Place(0), Place(0), Place(0)], [], -1, NotImplemented))
add("sys_set_map", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
add("sys_idx_value", 5, Clause(6, [Place(1), 1, Place(2), Place(3), Place(4)], [Skeleton(Cache("arg"), [Place(2), Place(1), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_arg"), [Place(3), Place(5), Place(4)])], 0, NotImplemented))
add("sys_idx_value", 5, Clause(5, [Place(1), NotImplemented, Place(2), NotImplemented, Place(3)], [Skeleton(Cache("arg"), [Place(2), Place(1), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_idx_value_term"), [Place(4), Place(3)])], 0, NotImplemented))
add("sys_idx_value", 5, Clause(0, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, "nothing"], [], -1, NotImplemented))
add("sys_idx_value_arg", 3, Clause(3, [NotImplemented, Place(1), Skeleton("just", [Place(2)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(2), NotImplemented])], 0, NotImplemented))
add("sys_idx_value_arg", 3, Clause(6, [Skeleton(".", [Skeleton("=", [Place(1), Place(2)]), Place(3)]), Place(4), Place(5)], [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(1), Place(2)]), Place(3)]), Place(4), Place(5)], [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("=", [NotImplemented, NotImplemented]), Place(1)]), Place(2), Place(3)], [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, [NotImplemented, NotImplemented, "nothing"], [], -1, NotImplemented))
add("sys_idx_value_term", 2, Clause(3, [Place(1), Skeleton("just", [Place(2)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(2), NotImplemented])], 0, NotImplemented))
add("sys_idx_value_term", 2, Clause(0, [NotImplemented, "nothing"], [], -1, NotImplemented))
add("sys_decode_body", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_decode_body", 2, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("sys_decode_goal"), [Place(0), Place(2)]), Skeleton(Cache("sys_decode_body"), [Place(1), Place(3)])], -1, "."))
add("sys_decode_goal", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("ir_is_site"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_goal"), [Place(3), Place(2)])], 0, NotImplemented))
add("sys_decode_goal", 2, Clause(5, [Place(1), Skeleton("$ALT", [Place(2)])], [Skeleton(Cache("kb_is_link"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("findall"), [Place(3), Skeleton("kb_clause_ref", [Place(1), 0, Place(3)]), Place(4)]), Skeleton(Cache("sys_decode_disj"), [Place(4), NotImplemented, Place(1), Place(2)])], 0, NotImplemented))
add("sys_decode_goal", 2, Clause(4, [Skeleton("is", [Place(1), Place(2)]), Skeleton("is", [Place(1), Place(3)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_expr"), [Place(2), Place(3)])], 0, "is"))
add("sys_decode_goal", 2, Clause(5, [Skeleton("=:=", [Place(1), Place(2)]), Skeleton("=:=", [Place(3), Place(4)])], [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(1), Place(2)]), Skeleton("=\\=", [Place(3), Place(4)])], [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(1), Place(2)]), Skeleton("<", [Place(3), Place(4)])], [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(1), Place(2)]), Skeleton(">", [Place(3), Place(4)])], [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(1), Place(2)]), Skeleton("=<", [Place(3), Place(4)])], [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(1), Place(2)]), Skeleton(">=", [Place(3), Place(4)])], [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(0), Place(0)], [], -1, NotImplemented))
add("sys_decode_disj", 4, Clause(0, ["[]", NotImplemented, NotImplemented, "[]"], [], -1, "[]"))
add("sys_decode_disj", 4, Clause(9, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Skeleton(".", [Skeleton("$SEQ", [Place(4), Place(5)]), Place(6)])], [Skeleton(Cache("kb_clause_arity"), [Place(0), Place(7)]), Skeleton(Cache("functor"), [Place(3), Place(2), Place(7)]), Skeleton(Cache("kb_clause_data"), [Place(0), Place(3), Place(4), Place(8)]), Skeleton(Cache("sys_decode_body"), [Place(8), Place(5)]), Skeleton(Cache("sys_decode_disj"), [Place(1), Place(2), Place(3), Place(6)])], -1, "."))
add("sys_decode_args", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_decode_args", 2, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("sys_decode_expr"), [Place(0), Place(2)]), Skeleton(Cache("sys_decode_args"), [Place(1), Place(3)])], -1, "."))
add("sys_decode_expr", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("ir_is_site"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(1), Place(3)]), Skeleton(Cache("sys_decode_expr"), [Place(3), Place(2)])], 0, NotImplemented))
add("sys_decode_expr", 2, Clause(6, [Place(1), Place(2)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(3), Place(4)])]), Skeleton(Cache("sys_decode_args"), [Place(4), Place(5)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(3), Place(5)])])], 0, NotImplemented))
add("sys_decode_expr", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_source", 3, 1])], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_srcprop", 2, 1])], -1))
add("current_source", 1, Clause(1, [Place(0)], [Skeleton(Cache("sys_source"), [Place(0), NotImplemented, NotImplemented])], -1, NotImplemented))
add("source_property", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_srcprop"), [Place(0), Place(1)])], -1, NotImplemented))
add("discontiguous", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("discontiguous", 1, Clause(4, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("must_be"), ["integer", Place(2)]), Skeleton(Cache("dg_get_partition"), [Place(3)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(1), Place(2), Skeleton("sys_discontiguous", [Place(3)])])])], 0, "/"))
add("discontiguous", 1, Clause(1, [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("multifile", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("multifile", 1, Clause(3, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("must_be"), ["integer", Place(2)]), Skeleton(Cache("sys_multifile_safe"), [Place(1), Place(2)])], 0, "/"))
add("multifile", 1, Clause(1, [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_multifile_safe", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("dg_get_partition"), [Place(2)]), Skeleton(make_defined([Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(4)])]), 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)])]), NotImplemented])])], 0, NotImplemented), Clause(0, [NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented)], 1), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_multifile", [Place(2)])])])], -1, NotImplemented))
add("include", 1, Clause(3, [Place(0)], [Skeleton(Cache("sys_file_relative"), [Place(0), Place(1)]), Skeleton(Cache("file_property"), [Place(1), Skeleton("absolute_path", [Place(2)])]), Skeleton(Cache("sys_include_file"), [Place(2)])], -1, NotImplemented))
add("sys_include_file", 1, Clause(2, ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("sys_include_stream"), ["user", Place(1)])], 0, "user"))
add("sys_include_file", 1, Clause(5, [Place(1)], [Skeleton(Cache("current_prolog_flag"), ["foreign_ext", Place(2)]), Skeleton(Cache("sub_atom"), [Place(1), NotImplemented, NotImplemented, 0, Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_include_native"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_current"), [Place(3), "module", Place(4)]), Skeleton(Cache("os_invoke_main"), [Place(4)])], 0, NotImplemented))
add("sys_include_file", 1, Clause(2, [Place(0)], [Skeleton(Cache("setup_once_cleanup"), [Skeleton("open", [Place(0), "read", Place(1)]), Skeleton("sys_include_stream", [Place(0), Place(1)]), Skeleton("close", [Place(1)])])], -1, NotImplemented))
add("sys_include_native", 2, Clause(4, [Place(1), Place(2)], [Frozen(Cache("current_prolog_flag"), ["import_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_import_promise"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("$YIELD"), [Place(3)])], 0, NotImplemented))
add("sys_include_native", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("os_import_sync"), [Place(0), Place(1)])], -1, NotImplemented))
add(".", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("member"), [Place(2), Skeleton(".", [Place(0), Place(1)])]), Skeleton(Cache("ensure_loaded"), [Place(2)]), Cache("fail")], -1, NotImplemented))
add(".", 2, Clause(0, [NotImplemented, NotImplemented], [], -1, NotImplemented))
add("ensure_loaded", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("ensure_loaded", 1, Clause(1, ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Frozen(Cache("sys_include_file"), ["user"])], 0, "user"))
add("ensure_loaded", 1, Clause(5, [Place(0)], [Skeleton(Cache("sys_file_relative"), [Place(0), Place(1)]), Skeleton(Cache("dg_get_partition"), [Place(2)]), Skeleton(Cache("sys_prop_map"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_current"), [Place(3), "absolute_path", Place(4)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_srcprop"), [Place(1), Skeleton("sys_link", [Place(2)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [Place(0), Place(1)], [Skeleton(Cache("assertz"), [Skeleton("sys_srcprop", [Place(0), Skeleton("sys_link", [Place(1)])])])], -1, NotImplemented)], 1), [Place(2), Place(4)]), Skeleton(Cache("sys_check_file"), [Place(4), Place(3)])], -1, NotImplemented))
add("sys_check_file", 2, Clause(5, [Place(1), Place(2)], [Skeleton(Cache("ir_object_current"), [Place(2), "last_modified", Place(3)]), Skeleton(Cache("shield"), [Skeleton("sys_action_file", [Place(1), Place(3), Place(4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2)], [Skeleton(Cache("="), [Place(1), "replay"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_replay_file"), [Place(2)])], 0, "replay"), Clause(3, [Place(1), Place(2)], [Skeleton(Cache("="), [Place(1), "clear_load"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_clear_file"), [Place(2)]), Skeleton(Cache("sys_load_file"), [Place(2)])], 0, "clear_load"), Clause(0, [NotImplemented, NotImplemented], [], -1, NotImplemented)], 1), [Place(4), Place(1)])], 0, NotImplemented))
add("sys_check_file", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("sys_load_file"), [Place(0)])], -1, NotImplemented))
add("sys_action_file", 3, Clause(6, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_source"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("="), [Place(1), 1]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), "none"])], 0, 1), Clause(5, [NotImplemented, Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("="), [Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "replay"]), Skeleton(Cache("retractall"), [Skeleton("sys_source", [Place(4), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_source", [Place(4), Place(3), 1])])], 0, NotImplemented), Clause(3, [NotImplemented, Place(0), Place(1), NotImplemented, Place(2)], [Skeleton(Cache("="), [Place(0), "clear_load"]), Skeleton(Cache("retractall"), [Skeleton("sys_source", [Place(2), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_source", [Place(2), Place(1), 1])])], -1, NotImplemented)], 1), [Place(5), Place(3), Place(2), Place(4), Place(1)])], 0, NotImplemented))
add("sys_action_file", 3, Clause(2, [Place(0), Place(1), NotImplemented], [Skeleton(Cache("assertz"), [Skeleton("sys_source", [Place(0), Place(1), 1])]), Cache("fail")], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_lastpred", 3, 1])], -1))
add("sys_load_file", 1, Clause(3, [Place(0)], [Skeleton(Cache("setup_once_cleanup"), [Skeleton("sys_loading_begin", [Place(0), Place(1), Place(2)]), Skeleton("sys_include_file", [Place(0)]), Skeleton("sys_loading_end", [Place(1), Place(2)])])], -1, NotImplemented))
add("sys_loading_begin", 3, Clause(6, [Place(1), Place(2), Skeleton("just", [Place(3), Place(4)])], [Skeleton(Cache("current_task"), [Place(5)]), Skeleton(Cache("retract"), [Skeleton("sys_lastpred", [Place(5), Place(3), Place(4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("dg_get_partition"), [Place(2)]), Skeleton(Cache("dg_set_partition"), [Place(1)])], 0, NotImplemented))
add("sys_loading_begin", 3, Clause(2, [Place(0), Place(1), "nothing"], [Skeleton(Cache("dg_get_partition"), [Place(1)]), Skeleton(Cache("dg_set_partition"), [Place(0)])], -1, NotImplemented))
add("sys_loading_end", 2, Clause(4, [Place(0), Skeleton("just", [Place(1), Place(2)])], [Skeleton(Cache("dg_get_partition"), [Place(3)]), Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [NotImplemented, NotImplemented, Skeleton("sys_discontiguous", [Place(3)])])]), Skeleton(Cache("dg_set_partition"), [Place(0)]), Skeleton(Cache("sys_update_last"), [Place(1), Place(2)])], -1, NotImplemented))
add("sys_loading_end", 2, Clause(3, [Place(0), "nothing"], [Skeleton(Cache("dg_get_partition"), [Place(1)]), Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [NotImplemented, NotImplemented, Skeleton("sys_discontiguous", [Place(1)])])]), Skeleton(Cache("dg_set_partition"), [Place(0)]), Skeleton(Cache("current_task"), [Place(2)]), Skeleton(Cache("retractall"), [Skeleton("sys_lastpred", [Place(2), NotImplemented, NotImplemented])])], -1, NotImplemented))
add("sys_update_last", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_task"), [Place(2)]), Skeleton(Cache("retractall"), [Skeleton("sys_lastpred", [Place(2), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_lastpred", [Place(2), Place(0), Place(1)])])], -1, NotImplemented))
add("sys_style_static", 1, Clause(2, [Place(1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_style_static", 1, Clause(1, [Skeleton(":-", [NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, ":-"))
add("sys_style_static", 1, Clause(2, [Skeleton(":-", [Place(1), NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_style_head"), [Place(1)])], 0, ":-"))
add("sys_style_static", 1, Clause(1, [Place(0)], [Skeleton(Cache("sys_style_head"), [Place(0)])], -1, NotImplemented))
add("sys_style_head", 1, Clause(4, [Place(1)], [Skeleton(Cache("callable"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_style_indicator"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_style_head", 1, Clause(0, [NotImplemented], [], -1, NotImplemented))
add("sys_style_indicator", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("current_task"), [Place(3)]), 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(1), Place(2)], [Skeleton(Cache("dg_get_partition"), [Place(3)]), Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_usage", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_discontiguous", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(3, [Place(0), Place(1), NotImplemented], [Skeleton(Cache("="), [Place(2), Skeleton("warning", [Skeleton("syntax_error", ["discontiguous_pred", Skeleton("/", [Place(0), Place(1)])]), NotImplemented])]), Skeleton(Cache("sys_fill_stack"), [Place(2)]), Skeleton(Cache("sys_print_error"), [Place(2)])], -1, NotImplemented)], 1), [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(0), Place(1)], [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(0), Place(1)], [Skeleton(Cache("dg_get_partition"), [Place(2)]), Skeleton(make_defined([Clause(5, [Place(1), Place(2), Place(3)], [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(4)])]), 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)])]), NotImplemented])])], 0, NotImplemented), Clause(0, [NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented)], 1), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton("sys_predprop", [Place(0), Place(1), Skeleton("sys_usage", [Place(2)])])])], -1, NotImplemented))
add("sys_include_stream", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_task"), [Place(2)]), 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(3, [Place(1)], [Cache("repeat"), Skeleton(Cache("catch"), [Skeleton("sys_next_term", [Place(1)]), Place(2), Skeleton(",", [Skeleton("sys_print_error", [Place(2)]), "fail"])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_next_term", 1, Clause(4, [Place(0)], [Skeleton(Cache("read_term"), [Place(0), Place(1), Skeleton(".", [Skeleton("variable_names", [Place(2)]), Skeleton(".", [Skeleton("singletons", [Place(3)]), "[]"])])]), Skeleton(make_defined([Clause(2, [Place(1), NotImplemented, NotImplemented], [Skeleton(Cache("=="), [Place(1), "end_of_file"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_expand_include"), [Place(0), Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_style_static"), [Place(3)]), Skeleton(Cache("sys_handle_static"), [Place(3)]), Cache("fail")], -1, NotImplemented)], 1), [Place(1), Place(2), Place(3)])], -1, NotImplemented))
add("sys_expand_include", 4, Clause(1, [Place(0), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_expand_include", 4, Clause(4, [Skeleton("?-", [Place(1)]), Place(2), NotImplemented, Place(3)], [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(6, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_multiton_keys"), [Place(1), Place(2), Place(4)]), Skeleton(Cache("sys_multiton_check"), [Place(4)]), Skeleton(Cache("sys_singleton_keys"), [Place(2), Place(5)]), Skeleton(Cache("sys_singleton_check"), [Place(5)]), Skeleton(Cache("expand_term"), [Place(0), Place(3)])], -1, NotImplemented))
add("sys_handle_static", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_handle_static", 1, Clause(3, [Place(1)], [Skeleton(Cache("="), [Place(1), Skeleton(":-", [NotImplemented])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_frost_horn"), [Place(1), 1, Place(2)]), Skeleton(make_defined([Clause(2, [Place(1)], [Skeleton(Cache("ir_goal_call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(0, [NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["directive_failed"]), NotImplemented])])], -1, NotImplemented)], 1), [Place(2)])], 0, ":-"))
add("sys_handle_static", 1, Clause(8, [Place(1)], [Skeleton(make_defined([Clause(2, [Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Skeleton(":-", [Place(1), NotImplemented])])], -1, ":-"), Clause(2, [Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(2), Place(3), Place(4)]), Skeleton(Cache("sys_pred_type"), [Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_frost_horn"), [Place(1), Place(5), Place(6)]), Skeleton(Cache("sys_pred_multi"), [Place(3), Place(4), Place(7)]), Skeleton(Cache("ir_clause_add"), [Place(3), Place(4), Place(6), Place(7)])], 0, NotImplemented))
add("sys_pred_type", 3, Clause(5, [Place(1), Place(2), 0], [Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("kb_link_flags"), [Place(3), Place(4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(4), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_pred_type", 3, Clause(0, [NotImplemented, NotImplemented, 1], [], -1, NotImplemented))
add("sys_pred_multi", 3, Clause(4, [Place(1), Place(2), 18], [Skeleton(Cache("dg_get_partition"), [Place(3)]), Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_multifile", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_pred_multi", 3, Clause(0, [NotImplemented, NotImplemented, 2], [], -1, NotImplemented))
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.bad_module", "de", "Fehlerhaftes Modul."], [], -1, "syntax_error.bad_module"))
add("strings", 3, Clause(0, ["syntax_error.discontiguous_pred", "", "Discontiguous predicate $, declare accordingly."], [], -1, "syntax_error.discontiguous_pred"))
add("strings", 3, Clause(0, ["syntax_error.bad_module", "", "Faulty module."], [], -1, "syntax_error.bad_module"))
add("true", 0, Clause(0, [], [], -1, NotImplemented))
add("!", 0, Clause(1, [], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add(",", 2, Clause(6, [Place(0), Place(1)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(2), Place(3), Place(4)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(2), Place(5), Place(4), "[]"]), Skeleton(Cache("$SEQ"), [Place(5), Place(3)])], -1, NotImplemented))
add(";", 2, Clause(7, [Place(0), Place(1)], [Skeleton(Cache("sys_trans_alter"), [Place(0), "nothing", Place(2), Place(3), Place(4)]), Skeleton(Cache("sys_trans_disj"), [Place(1), Place(4), Place(2), Place(5), Place(6)]), Skeleton(Cache("$SEQ"), [Place(5), Skeleton(".", [Skeleton("$ALT", [Skeleton(".", [Place(3), Place(6)])]), "[]"])])], -1, NotImplemented))
add("->", 2, Clause(8, [Place(0), Place(1)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(2), Place(3), Skeleton(".", [Skeleton("$CUT", [Place(4)]), Place(5)])]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(6), Place(5), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(2), Place(7), Place(3)]), Skeleton(Cache("$SEQ"), [Place(6), Skeleton(".", [Skeleton("$ALT", [Skeleton(".", [Skeleton("$SEQ", [Skeleton("just", [Place(4)]), Place(7)]), "[]"])]), "[]"])])], -1, NotImplemented))
add("\\=", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("\\=", 2, Clause(0, [NotImplemented, NotImplemented], [], -1, NotImplemented))
add("\\+", 1, Clause(2, [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, NotImplemented))
add("\\+", 1, Clause(0, [NotImplemented], [], -1, NotImplemented))
add("once", 1, Clause(2, [Place(1)], [Skeleton(Cache("call"), [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(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_trap"), [Place(0), Place(3), Skeleton("sys_error_handler", [Place(3), Place(1), Place(2)])])], -1, NotImplemented))
add("sys_error_handler", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("sys_chain_head"), [Place(0), Skeleton("error", [Skeleton("system_error", [NotImplemented]), NotImplemented])]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_error_handler", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_chain_head"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("call"), [Place(3)])], 0, NotImplemented))
add("sys_error_handler", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_head", 2, Clause(3, [Skeleton("cause", [Place(1), NotImplemented]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "cause"))
add("sys_chain_head", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
add("throw", 1, Clause(1, [Place(0)], [Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_fill_stack", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_fill_stack", 1, Clause(2, [Skeleton("error", [NotImplemented, Place(1)])], [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", [NotImplemented, Place(1)])], [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, [NotImplemented], [], -1, NotImplemented))
add("sys_fetch_stack", 1, Clause(4, [Place(0)], [Skeleton(Cache("current_task"), [Place(1)]), Skeleton(Cache("findall"), [Skeleton("sys_including", [Place(2), Place(3)]), Skeleton("sys_including", [Place(2), Place(1), Place(3)]), Place(0)])], -1, NotImplemented))
add("try_call_finally", 3, Clause(7, [Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("call"), [Place(0)])], -1, NotImplemented), Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("call"), [Place(0)]), Cache("fail")], -1, NotImplemented)], 1), [Place(1), Place(3)]), Skeleton(Cache("$MARK"), [Place(4)]), Skeleton(Cache("sys_trap"), [Place(2), Place(5), Skeleton(",", [Place(3), Skeleton("sys_raise", [Place(5)])])]), Skeleton(Cache("$MARK"), [Place(6)]), Skeleton(make_defined([Clause(5, [Place(1), Place(2), Place(3), Place(4), NotImplemented], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("$CUT"), [Place(3)]), Skeleton(Cache("call"), [Place(4)])], 0, NotImplemented), Clause(1, [NotImplemented, NotImplemented, NotImplemented, Place(0), NotImplemented], [Skeleton(Cache("call"), [Place(0)])], -1, NotImplemented), Clause(1, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0)], [Skeleton(Cache("call"), [Place(0)]), Cache("fail")], -1, NotImplemented)], 1), [Place(4), Place(6), Place(0), Place(3), Place(1)])], 0, NotImplemented))
add("ignore", 1, Clause(2, [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("ignore", 1, Clause(0, [NotImplemented], [], -1, NotImplemented))
add("chain", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_trap"), [Place(0), Place(2), Skeleton("sys_chain_error", [Place(2), Place(1)])]), Skeleton(Cache("call"), [Place(1)])], -1, NotImplemented))
add("sys_chain_error", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_trap"), [Place(1), Place(2), Skeleton("sys_chain_raise", [Place(0), Place(2)])]), Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_error", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("sys_raise"), [Place(0)])], -1, NotImplemented))
add("sys_chain_raise", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_chain_concat"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("sys_raise"), [Place(2)])], -1, NotImplemented))
add("sys_chain_concat", 3, Clause(5, [Skeleton("cause", [Place(1), Place(2)]), Place(3), Skeleton("cause", [Place(1), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_chain_concat"), [Place(2), Place(3), Place(4)])], 0, "cause"))
add("sys_chain_concat", 3, Clause(2, [Place(0), Place(1), Skeleton("cause", [Place(0), Place(1)])], [], -1, NotImplemented))
add("once_cleanup", 2, Clause(3, [Place(1), Place(2)], [Frozen(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(0), Place(1)], [Skeleton(Cache("sys_once_cleanup"), [Place(0), Place(1)])], -1, NotImplemented))
add("setup_once_cleanup", 3, Clause(4, [Place(1), Place(2), Place(3)], [Frozen(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(0), Place(1), Place(2)], [Skeleton(Cache("sys_setup_once_cleanup"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_setup_once_cleanup", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("call"), [Place(0)]), Skeleton(Cache("sys_once_cleanup"), [Place(1), Place(2)])], -1, NotImplemented))
add("sys_once_cleanup", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("chain"), [Place(1), Skeleton("ignore", [Place(2)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_once_cleanup", 2, Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("ignore"), [Place(0)]), Cache("fail")], -1, NotImplemented))
add("sleep", 1, Clause(2, [Place(0)], [Skeleton(Cache("os_sleep_promise"), [Place(0), Place(1)]), Skeleton(Cache("$YIELD"), [Place(1)])], -1, NotImplemented))
add("call_later", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(0)]), 0, Place(2)]), Skeleton(Cache("os_call_later"), [Place(2), Place(1), NotImplemented])], -1, NotImplemented))
add("call_later", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(0)]), 0, Place(3)]), Skeleton(Cache("os_call_later"), [Place(3), Place(1), Place(2)])], -1, NotImplemented))
add("call_with_time_limit", 2, Clause(5, [Place(1), Place(2)], [Frozen(Cache("current_prolog_flag"), ["allow_yield", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_task"), [Place(3)]), Skeleton(Cache("setup_once_cleanup"), [Skeleton("call_later", [Skeleton("sys_timeout_signal", [Place(3)]), Place(1), Place(4)]), Place(2), Skeleton("timer_cancel", [Place(4)])])], 0, NotImplemented))
add("call_with_time_limit", 2, Clause(0, [NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("system_error", ["illegal_yield"]), NotImplemented])])], -1, NotImplemented))
add("sys_timeout_signal", 1, Clause(1, [Place(0)], [Skeleton(Cache("task_abort"), [Place(0), Frozen("system_error", ["timelimit_exceeded"])])], -1, NotImplemented))
add("create_task", 1, Clause(2, [Place(0)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(0)]), 0, Place(1)]), Skeleton(Cache("os_task_create"), [Place(1), NotImplemented])], -1, NotImplemented))
add("create_task", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(0)]), 0, Place(2)]), Skeleton(Cache("os_task_create"), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_frost_horn", 3, Clause(5, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(3)]), Skeleton(Cache("sys_encode_horn"), [Place(3), Place(4), Place(1), 1]), Skeleton(Cache("sys_host_make"), [Place(4), Place(2)])], -1, NotImplemented))
add("member", 2, Clause(3, [Place(0), Skeleton(".", [Place(1), Place(2)])], [Skeleton(Cache("sys_member"), [Place(2), Place(1), Place(0)])], -1, NotImplemented))
add("sys_member", 3, Clause(1, [NotImplemented, Place(0), Place(0)], [], -1, NotImplemented))
add("sys_member", 3, Clause(3, [Skeleton(".", [Place(0), Place(1)]), NotImplemented, Place(2)], [Skeleton(Cache("sys_member"), [Place(1), Place(0), Place(2)])], -1, "."))
add("select", 3, Clause(4, [Place(0), Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("sys_select"), [Place(2), Place(1), Place(0), Place(3)])], -1, NotImplemented))
add("sys_select", 4, Clause(2, [Place(0), Place(1), Place(1), Place(0)], [], -1, NotImplemented))
add("sys_select", 4, Clause(5, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Skeleton(".", [Place(2), Place(4)])], [Skeleton(Cache("sys_select"), [Place(1), Place(0), Place(3), Place(4)])], -1, "."))
add("reverse", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_reverse"), [Place(0), "[]", Place(1)])], -1, NotImplemented))
add("sys_reverse", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
add("sys_reverse", 3, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_reverse"), [Place(1), Skeleton(".", [Place(0), Place(2)]), Place(3)])], -1, "."))
add("append", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
add("append", 3, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Place(2), Skeleton(".", [Place(0), Place(3)])], [Skeleton(Cache("append"), [Place(1), Place(2), Place(3)])], -1, "."))
add("length", 2, Clause(3, [Place(1), Place(2)], [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(0), Place(1)], [Skeleton(Cache("must_be"), ["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(0), Place(0)], [], -1, "[]"))
add("sys_length", 3, Clause(4, [Skeleton(".", [NotImplemented, Place(0)]), Place(1), Place(2)], [Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(1), 1])]), Skeleton(Cache("sys_length"), [Place(0), Place(3), Place(2)])], -1, "."))
add("sys_length", 2, Clause(2, [0, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "[]"])], 0, 0))
add("sys_length", 2, Clause(3, [Place(0), Skeleton(".", [NotImplemented, Place(1)])], [Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(0), 1])]), Skeleton(Cache("sys_length"), [Place(2), Place(1)])], -1, NotImplemented))
add("between", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("var"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["integer", Place(1)]), Skeleton(Cache("must_be"), ["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(0), Place(1), Place(2)], [Skeleton(Cache("must_be"), ["integer", Place(2)]), Skeleton(Cache("must_be"), ["integer", Place(0)]), Skeleton(Cache("must_be"), ["integer", Place(1)]), Skeleton(Cache("=<"), [Place(0), Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_between", 3, Clause(3, [Place(1), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_between", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
add("sys_between", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(0), 1])]), Skeleton(Cache("sys_between"), [Place(3), Place(1), Place(2)])], -1, NotImplemented))
add("findall", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_find_init"), [Place(3)]), Skeleton(make_defined([Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("call"), [Place(0)]), Skeleton(Cache("sys_find_next"), [Place(1), Place(2)]), Cache("fail")], -1, NotImplemented), Clause(0, [NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented)], 1), [Place(1), Place(0), Place(3)]), Skeleton(Cache("sys_find_fini"), [Place(3), Place(2)])], -1, NotImplemented))
add("sys_find_init", 1, Clause(2, [Place(0)], [Skeleton(Cache("=.."), [Place(1), Frozen(".", [".", Frozen(".", ["-", Frozen(".", ["[]", "[]"])])])]), Skeleton(Cache("="), [Place(0), Skeleton("v", [Place(1), Place(1)])])], -1, NotImplemented))
add("sys_find_next", 2, Clause(4, [Place(0), Place(1)], [Skeleton(Cache("copy_term"), [Skeleton(".", [Place(0), "[]"]), Place(2)]), Skeleton(Cache("arg"), [1, Place(1), Place(3)]), Skeleton(Cache("change_arg"), [2, Place(3), Place(2)]), Skeleton(Cache("change_arg"), [1, Place(1), Place(2)])], -1, NotImplemented))
add("sys_find_fini", 2, Clause(1, [Skeleton("v", [NotImplemented, Skeleton(".", [NotImplemented, Place(0)])]), Place(0)], [], -1, "v"))
add("get_message", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("current_prolog_flag"), ["sys_locale", Place(3)]), Skeleton(Cache("get_message"), [Place(0), Place(3), Place(1), Place(2)])], -1, NotImplemented))
add("get_message", 4, Clause(6, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(5), Place(4)])]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("sys_get_string"), [Place(5), Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("get_message", 4, Clause(8, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(5), Skeleton(".", [Place(6), Place(4)])])]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("atom"), [Place(6)]), Skeleton(Cache("atom_join"), [Skeleton(".", [Place(5), Skeleton(".", [".", Skeleton(".", [Place(6), "[]"])])]), Place(7)]), Skeleton(Cache("sys_get_string"), [Place(7), Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("get_message", 4, Clause(9, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(5), Skeleton(".", [Place(6), Skeleton(".", [Place(7), Place(4)])])])]), Skeleton(Cache("atom"), [Place(5)]), Skeleton(Cache("atom"), [Place(6)]), Skeleton(Cache("atom"), [Place(7)]), Skeleton(Cache("atom_join"), [Skeleton(".", [Place(5), Skeleton(".", [".", Skeleton(".", [Place(6), Skeleton(".", [".", Skeleton(".", [Place(7), "[]"])])])])]), Place(8)]), Skeleton(Cache("sys_get_string"), [Place(8), Place(2), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_get_string", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_prolog_flag"), ["sys_locale", Place(2)]), Skeleton(Cache("sys_get_string"), [Place(0), Place(2), Place(1)])], -1, NotImplemented))
add("sys_get_string", 3, Clause(6, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_locale_ancestor"), [Place(2), Place(4)]), Skeleton(Cache("strings"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(5)])], 0, NotImplemented))
add("sys_locale_ancestor", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
add("sys_locale_ancestor", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("last_sub_atom"), [Place(0), Place(2), NotImplemented, NotImplemented, "_"]), Skeleton(Cache("sub_atom"), [Place(0), 0, Place(2), NotImplemented, Place(1)])], -1, NotImplemented))
add("sys_locale_ancestor", 2, Clause(1, [Place(0), ""], [Skeleton(Cache("\\=="), [Place(0), ""])], -1, NotImplemented))
add("sys_multiton_keys", 3, Clause(5, [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("\\+"), [Skeleton("sys_marked_at", [Place(1), 0, Frozen(".", [23, "[]"])])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_multiton_keys"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_multiton_keys", 3, Clause(5, [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("\\+"), [Skeleton("sys_marked_at", [Place(1), 1, Frozen(".", [1, Frozen(".", [3, Frozen(".", [23, "[]"])])])])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_multiton_keys"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_multiton_keys", 3, Clause(5, [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("member"), [Skeleton("=", [Place(1), NotImplemented]), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_multiton_keys"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_multiton_keys", 3, Clause(4, [Skeleton(".", [Skeleton("=", [Place(0), NotImplemented]), Place(1)]), Place(2), Skeleton(".", [Place(0), Place(3)])], [Skeleton(Cache("sys_multiton_keys"), [Place(1), Place(2), Place(3)])], -1, "."))
add("sys_multiton_keys", 3, Clause(0, ["[]", NotImplemented, "[]"], [], -1, "[]"))
add("sys_multiton_check", 1, Clause(3, [Skeleton(".", [Place(0), Place(1)])], [Skeleton(Cache("="), [Place(2), Skeleton("warning", [Skeleton("syntax_error", ["multiton_var", Skeleton(".", [Place(0), Place(1)])]), NotImplemented])]), Skeleton(Cache("sys_fill_stack"), [Place(2)]), Skeleton(Cache("sys_print_error"), [Place(2)])], -1, "."))
add("sys_multiton_check", 1, Clause(0, ["[]"], [], -1, "[]"))
add("sys_singleton_keys", 2, Clause(4, [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3)], [Skeleton(Cache("sys_marked_at"), [Place(1), 0, Frozen(".", [23, "[]"])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_singleton_keys"), [Place(2), Place(3)])], 0, "."))
add("sys_singleton_keys", 2, Clause(3, [Skeleton(".", [Skeleton("=", [Place(0), NotImplemented]), Place(1)]), Skeleton(".", [Place(0), Place(2)])], [Skeleton(Cache("sys_singleton_keys"), [Place(1), Place(2)])], -1, "."))
add("sys_singleton_keys", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_singleton_check", 1, Clause(3, [Skeleton(".", [Place(0), Place(1)])], [Skeleton(Cache("="), [Place(2), Skeleton("warning", [Skeleton("syntax_error", ["singleton_var", Skeleton(".", [Place(0), Place(1)])]), NotImplemented])]), Skeleton(Cache("sys_fill_stack"), [Place(2)]), Skeleton(Cache("sys_print_error"), [Place(2)])], -1, "."))
add("sys_singleton_check", 1, Clause(0, ["[]"], [], -1, "[]"))
add("sys_marked_at", 3, Clause(7, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sub_atom"), [Place(1), Place(2), 1, NotImplemented, Place(4)]), Skeleton(Cache("char_code"), [Place(4), Place(5)]), Skeleton(Cache("code_category"), [Place(5), Place(6)]), Skeleton(Cache("member"), [Place(6), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("expand_term", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("term_expansion"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("expand_term"), [Place(3), Place(2)])], 0, NotImplemented))
add("expand_term", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
add("phrase", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("phrase", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_phrase_expansion"), [Place(0), 0, 0, Place(1), Place(2), Place(3)]), Skeleton(Cache("call"), [Place(3)])], -1, NotImplemented))
add("term_expansion", 2, Clause(9, [Skeleton("-->", [Skeleton(",", [Place(0), Place(1)]), Place(2)]), Skeleton(":-", [Place(3), Skeleton(",", [Place(4), Place(5)])])], [Skeleton(Cache("sys_phrase_expansion"), [Place(0), 0, 0, Place(6), Place(7), Place(3)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), 1, 0, Place(6), Place(8), Place(4)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 0, 0, Place(7), Place(8), Place(5)])], -1, "-->"))
add("term_expansion", 2, Clause(6, [Skeleton("-->", [Place(0), Place(1)]), Skeleton(":-", [Place(2), Place(3)])], [Skeleton(Cache("sys_phrase_expansion"), [Place(0), 0, 0, Place(4), Place(5), Place(2)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 1, 0, Place(4), Place(5), Place(3)])], -1, "-->"))
add("sys_phrase_expansion", 6, Clause(4, [Place(1), NotImplemented, NotImplemented, Place(2), Place(3), Skeleton("phrase", [Place(1), Place(2), Place(3)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_phrase_expansion", 6, Clause(10, [Skeleton(",", [Place(1), Place(2)]), 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), 1, Place(5), Place(9), Place(7)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), 0, Place(4), Place(9), Place(6), Place(8)])], 0, ","))
add("sys_phrase_expansion", 6, Clause(7, [Skeleton(";", [Place(1), Place(2)]), NotImplemented, NotImplemented, Place(3), Place(4), Skeleton(";", [Place(5), Place(6)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 0, 0, Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), 0, 0, Place(3), Place(4), Place(6)])], 0, ";"))
add("sys_phrase_expansion", 6, Clause(10, [Skeleton("->", [Place(1), Place(2)]), 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), 1, Place(5), Place(9), Place(7)]), Skeleton(Cache("sys_phrase_expansion"), [Place(2), 0, Place(4), Place(9), Place(6), Place(8)])], 0, "->"))
add("sys_phrase_expansion", 6, Clause(3, ["[]", 0, NotImplemented, Place(1), Place(2), Skeleton("=", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_phrase_expansion", 6, Clause(3, ["[]", 1, NotImplemented, Place(1), Place(2), "true"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "[]"))
add("sys_phrase_expansion", 6, Clause(6, [Skeleton(".", [Place(1), Place(2)]), 0, NotImplemented, Place(3), Place(4), Skeleton("=", [Place(3), Skeleton(".", [Place(1), Place(5)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_list_expansion"), [Place(2), Place(4), Place(5)])], 0, "."))
add("sys_phrase_expansion", 6, Clause(6, [Skeleton(".", [Place(1), Place(2)]), 1, NotImplemented, Place(3), Place(4), "true"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Place(1), Place(5)])]), Skeleton(Cache("sys_list_expansion"), [Place(2), Place(4), Place(5)])], 0, "."))
add("sys_phrase_expansion", 6, Clause(3, ["!", NotImplemented, 0, Place(1), Place(2), Skeleton(",", ["!", Skeleton("=", [Place(1), Place(2)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "!"))
add("sys_phrase_expansion", 6, Clause(3, ["!", NotImplemented, 1, Place(1), Place(2), "!"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "!"))
add("sys_phrase_expansion", 6, Clause(4, [Skeleton("{}", [Place(1)]), NotImplemented, 0, Place(2), Place(3), Skeleton(",", [Place(1), Skeleton("=", [Place(2), Place(3)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "{}"))
add("sys_phrase_expansion", 6, Clause(4, [Skeleton("{}", [Place(1)]), NotImplemented, 1, Place(2), Place(3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "{}"))
add("sys_phrase_expansion", 6, Clause(5, [Skeleton("\\+", [Place(1)]), NotImplemented, 0, Place(2), Place(3), Skeleton(",", [Skeleton("\\+", [Place(4)]), Skeleton("=", [Place(2), Place(3)])])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 0, 0, Place(2), NotImplemented, Place(4)])], 0, "\\+"))
add("sys_phrase_expansion", 6, Clause(5, [Skeleton("\\+", [Place(1)]), NotImplemented, 1, Place(2), Place(3), Skeleton("\\+", [Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 0, 0, Place(2), NotImplemented, Place(4)])], 0, "\\+"))
add("sys_phrase_expansion", 6, Clause(8, [Place(1), NotImplemented, NotImplemented, Place(2), Place(3), Place(4)], [Skeleton(Cache("callable"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(5), Place(6)])]), Skeleton(Cache("append"), [Place(6), Skeleton(".", [Place(2), Skeleton(".", [Place(3), "[]"])]), Place(7)]), Skeleton(Cache("=.."), [Place(4), Skeleton(".", [Place(5), Place(7)])])], 0, NotImplemented))
add("sys_phrase_expansion", 6, Clause(1, [Place(0), NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["callable", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_list_expansion", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_list_expansion", 3, Clause(2, ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_list_expansion", 3, Clause(5, [Skeleton(".", [Place(1), Place(2)]), Place(3), Skeleton(".", [Place(1), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_list_expansion"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_list_expansion", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sub_atom", 5, Clause(8, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("between"), [0, Place(6), Place(2)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(6), Place(2)])]), Skeleton(Cache("between"), [0, Place(7), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Place(7), Place(3)])])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("sys_atom_match"), [Place(1), Place(5), Place(2)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])])], 0, NotImplemented))
add("sub_atom", 5, Clause(8, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("=<"), [0, Place(4)]), Skeleton(Cache("=<"), [Place(4), Place(6)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(6), Place(4)])]), Skeleton(Cache("between"), [0, Place(7), Place(2)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Place(7), Place(2)])]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(4)]), Place(3)])]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(8, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(6)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(6), Place(2)])]), Skeleton(Cache("between"), [0, Place(7), Place(3)]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Place(7), Place(3)])])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(4)]), Place(2)])]), Skeleton(Cache("sys_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])]), Skeleton(Cache("sys_atom_match"), [Place(1), Place(5), Place(2)])], 0, NotImplemented))
add("sub_atom", 5, Clause(6, [Place(0), Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("atom_length"), [Place(4), Place(2)]), Skeleton(Cache("atom_length"), [Place(0), Place(5)]), Skeleton(Cache("is"), [Place(1), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(5), Place(3)]), Place(2)])]), Skeleton(Cache("sys_atom_match"), [Place(0), Place(4), Place(1)])], -1, NotImplemented))
add("last_sub_atom", 5, Clause(10, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("between"), [0, Place(6), Place(7)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(6), Place(7)])]), Skeleton(Cache("is"), [Place(8), Skeleton(Cache("-"), [Place(6), Place(2)])]), Skeleton(Cache("between"), [0, Place(8), Place(9)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Place(8), Place(9)])]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Place(8), Place(3)])])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("sys_last_atom_match"), [Place(1), Place(5), Place(2)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(9, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("=<"), [0, Place(4)]), Skeleton(Cache("=<"), [Place(4), Place(6)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(6), Place(4)])]), Skeleton(Cache("between"), [0, Place(7), Place(8)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(7), Place(8)])]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Place(7), 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(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(4)]), Place(3)])]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(9, [Place(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("=<"), [Place(2), Place(6)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(6), Place(2)])]), Skeleton(Cache("between"), [0, Place(7), Place(8)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Place(7), Place(8)])]), Skeleton(Cache("sys_last_atom_part"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Place(7), Place(3)])])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(4)]), Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), 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(7, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("var"), [Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_length"), [Place(1), Place(6)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(4)]), 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(1), Place(2), Place(3), Place(4), Place(5)], [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(6)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(6), Place(2)]), Place(3)])]), Skeleton(Cache("sys_last_atom_match"), [Place(1), Place(5), Place(2)])], 0, NotImplemented))
add("last_sub_atom", 5, Clause(6, [Place(0), Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("atom_length"), [Place(4), Place(2)]), Skeleton(Cache("atom_length"), [Place(0), Place(5)]), Skeleton(Cache("is"), [Place(1), Skeleton(Cache("-"), [Skeleton(Cache("-"), [Place(5), Place(3)]), Place(2)])]), Skeleton(Cache("sys_last_atom_match"), [Place(0), Place(4), Place(1)])], -1, NotImplemented))
add("strings", 3, Clause(0, ["instantiation_error", "de", "Argument sollte keine Variable sein."], [], -1, "instantiation_error"))
add("strings", 3, Clause(0, ["domain_error.read_option", "de", "Leseoption erwartet, gefunden $."], [], -1, "domain_error.read_option"))
add("strings", 3, Clause(0, ["domain_error.io_mode", "de", "Eingabe-/Ausgabemodus (read oder write) erwartet, gefunden $."], [], -1, "domain_error.io_mode"))
add("strings", 3, Clause(0, ["domain_error.write_option", "de", "Schreiboption erwartet, gefunden $."], [], -1, "domain_error.write_option"))
add("strings", 3, Clause(0, ["domain_error.open_option", "de", "Öffnenoption erwartet, gefunden $."], [], -1, "domain_error.open_option"))
add("strings", 3, Clause(0, ["type_error.character_code", "de", "Unerlaubter Kodepunkt $, nicht zwischen 0 und 0x10FFFF."], [], -1, "type_error.character_code"))
add("strings", 3, Clause(0, ["existence_error.source_sink", "de", "Datei $ nicht gefunden."], [], -1, "existence_error.source_sink"))
add("strings", 3, Clause(0, ["existence_error.module", "de", "Modul $ nicht gefunden."], [], -1, "existence_error.module"))
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, ["permission_error.modify.compound", "de", "Kann Verbund $ nicht ändern."], [], -1, "permission_error.modify.compound"))
add("strings", 3, Clause(0, ["resource_error.socket_timeout", "de", "Ein-/Ausgabeauszeit."], [], -1, "resource_error.socket_timeout"))
add("strings", 3, Clause(0, ["resource_error.port_error", "de", "Fehler bei Verwendung eines Port."], [], -1, "resource_error.port_error"))
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.io_exception", "de", "Datei nicht erstellt oder nicht zugreifbar."], [], -1, "resource_error.io_exception"))
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.stack_overflow", "de", "Ausführung wegen Stapelüberlauf abgebrochen."], [], -1, "system_error.stack_overflow"))
add("strings", 3, Clause(0, ["system_error.out_of_memory", "de", "Ausführung wegen aufgebrauchtem Speicherplatz abgebrochen."], [], -1, "system_error.out_of_memory"))
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.user_exit", "de", "System auf Benutzerwunsch beendet."], [], -1, "system_error.user_exit"))
add("strings", 3, Clause(0, ["syntax_error.directive_failed", "de", "Direktive fehlgeschlagen."], [], -1, "syntax_error.directive_failed"))
add("strings", 3, Clause(0, ["instantiation_error", "", "Argument should not be a variable."], [], -1, "instantiation_error"))
add("strings", 3, Clause(0, ["domain_error.read_option", "", "Read option expected, found $."], [], -1, "domain_error.read_option"))
add("strings", 3, Clause(0, ["domain_error.io_mode", "", "Input/output mode (read or write) expected, found $."], [], -1, "domain_error.io_mode"))
add("strings", 3, Clause(0, ["domain_error.write_option", "", "Write option expected, found $."], [], -1, "domain_error.write_option"))
add("strings", 3, Clause(0, ["domain_error.open_option", "", "Open option expected, found $."], [], -1, "domain_error.open_option"))
add("strings", 3, Clause(0, ["type_error.character_code", "", "Illegal code point $, not between 0 and 0x10FFFF."], [], -1, "type_error.character_code"))
add("strings", 3, Clause(0, ["existence_error.source_sink", "", "File $ not found."], [], -1, "existence_error.source_sink"))
add("strings", 3, Clause(0, ["existence_error.module", "", "Module $ not found."], [], -1, "existence_error.module"))
add("strings", 3, Clause(0, ["permission_error.open.source_sink", "", "Cannot open file $."], [], -1, "permission_error.open.source_sink"))
add("strings", 3, Clause(0, ["permission_error.modify.compound", "", "Cannot modify compound $."], [], -1, "permission_error.modify.compound"))
add("strings", 3, Clause(0, ["resource_error.socket_timeout", "", "Input/output timeout."], [], -1, "resource_error.socket_timeout"))
add("strings", 3, Clause(0, ["resource_error.port_error", "", "Error using a port."], [], -1, "resource_error.port_error"))
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.io_exception", "", "File not created or not accessible."], [], -1, "resource_error.io_exception"))
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.stack_overflow", "", "Execution aborted because of stack overflow."], [], -1, "system_error.stack_overflow"))
add("strings", 3, Clause(0, ["system_error.out_of_memory", "", "Execution aborted because out of memory."], [], -1, "system_error.out_of_memory"))
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.user_exit", "", "System ended on user request."], [], -1, "system_error.user_exit"))
add("strings", 3, Clause(0, ["syntax_error.directive_failed", "", "Directive failed."], [], -1, "syntax_error.directive_failed"))
add("dynamic", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("dynamic", 1, Clause(3, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("must_be"), ["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(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("asserta", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("asserta", 1, Clause(6, [Skeleton(":-", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(1), Place(2)]), 0, Place(3)]), Skeleton(Cache("functor"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("ir_clause_add"), [Place(4), Place(5), Place(3), 1])], 0, ":-"))
add("asserta", 1, Clause(4, [Place(0)], [Skeleton(Cache("sys_frost_horn"), [Place(0), 0, Place(1)]), Skeleton(Cache("functor"), [Place(0), Place(2), Place(3)]), Skeleton(Cache("ir_clause_add"), [Place(2), Place(3), Place(1), 1])], -1, NotImplemented))
add("assertz", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("assertz", 1, Clause(6, [Skeleton(":-", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(1), Place(2)]), 0, Place(3)]), Skeleton(Cache("functor"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("ir_clause_add"), [Place(4), Place(5), Place(3), 3])], 0, ":-"))
add("assertz", 1, Clause(4, [Place(0)], [Skeleton(Cache("sys_frost_horn"), [Place(0), 0, Place(1)]), Skeleton(Cache("functor"), [Place(0), Place(2), Place(3)]), Skeleton(Cache("ir_clause_add"), [Place(2), Place(3), Place(1), 3])], -1, NotImplemented))
add("clause", 2, Clause(6, [Place(0), Place(1)], [Skeleton(Cache("kb_clause_ref"), [Place(0), 2, Place(2)]), Skeleton(Cache("kb_clause_data"), [Place(2), Place(0), Place(3), Place(4)]), Skeleton(Cache("sys_untrans_body"), [Place(4), Place(3), Place(5)]), Skeleton(Cache("="), [Place(5), Place(1)])], -1, NotImplemented))
add("retract", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("retract", 1, Clause(9, [Skeleton(":-", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(1), Place(3), Place(4)]), Skeleton(Cache("kb_clause_ref"), [Place(1), 3, Place(5)]), Skeleton(Cache("kb_clause_data"), [Place(5), Place(1), Place(6), Place(7)]), Skeleton(Cache("sys_untrans_body"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("="), [Place(8), Place(2)]), Skeleton(Cache("kb_clause_remove"), [Place(3), Place(4), 0, Place(5)])], 0, ":-"))
add("retract", 1, Clause(7, [Place(0)], [Skeleton(Cache("functor"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("kb_clause_ref"), [Place(0), 3, Place(3)]), Skeleton(Cache("kb_clause_data"), [Place(3), Place(0), Place(4), Place(5)]), Skeleton(Cache("sys_untrans_body"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("="), [Place(6), "true"]), Skeleton(Cache("kb_clause_remove"), [Place(1), Place(2), 0, Place(3)])], -1, NotImplemented))
add("retractall", 1, Clause(4, [Place(0)], [Skeleton(Cache("functor"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("kb_clause_ref"), [Place(0), 7, Place(3)]), 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, [NotImplemented], [], -1, NotImplemented))
add("abolish", 1, Clause(1, [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("abolish", 1, Clause(3, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_abolish"), [Place(1), Place(2)])], 0, "/"))
add("abolish", 1, Clause(1, [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_abolish", 2, Clause(4, [Place(0), Place(1)], [Skeleton(Cache("kb_pred_link"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("kb_link_flags"), [Place(2), Place(3)]), Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(3), 1]), 0]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["modify", "static_procedure", Skeleton("/", [Place(0), Place(1)])]), NotImplemented])])], -1, NotImplemented))
add("sys_abolish", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("retractall"), [Skeleton("sys_predprop", [Place(0), Place(1), NotImplemented])]), Skeleton(Cache("kb_pred_destroy"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_predprop", 3, 1])], -1))
add("current_predicate", 1, Clause(4, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(make_defined([Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)])], -1, NotImplemented), Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("var"), [Place(0)])], -1, NotImplemented)], 1), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("kb_pred_list"), [Place(3)]), Skeleton(Cache("member"), [Skeleton("/", [Place(1), Place(2)]), Place(3)])], 0, "/"))
add("current_predicate", 1, Clause(3, [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), NotImplemented])], 0, "/"))
add("current_predicate", 1, Clause(1, [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("predicate_property", 2, Clause(4, [Skeleton("/", [Place(1), Place(2)]), Place(3)], [Skeleton(make_defined([Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)])], -1, NotImplemented), Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("var"), [Place(0)])], -1, NotImplemented)], 1), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_predicate"), [Skeleton("/", [Place(1), Place(2)])]), Skeleton(Cache("sys_predprop_get"), [Place(1), Place(2), Place(3)])], 0, "/"))
add("predicate_property", 2, Clause(4, [Skeleton("/", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_predprop_get"), [Place(1), Place(2), Place(3)])], 0, "/"))
add("predicate_property", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_predprop_pattern", 2, Clause(3, [Skeleton("/", [Place(0), Place(1)]), Place(2)], [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(6, [Place(0), Place(1), Place(2)], [Skeleton(Cache("kb_pred_link"), [Place(0), Place(1), Place(3)]), Skeleton(Cache("kb_link_flags"), [Place(3), Place(4)]), Skeleton(Cache("sys_predprop_flag"), [Place(4), Place(5)]), Skeleton(Cache("="), [Place(2), Place(5)])], -1, NotImplemented))
add("sys_predprop_get", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
add("sys_predprop_flag", 2, Clause(1, [0, "static"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, 0))
add("sys_predprop_flag", 2, Clause(1, [1, "dynamic"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, 1))
add("sys_predprop_flag", 2, Clause(0, [NotImplemented, "built_in"], [], -1, NotImplemented))
add("sys_host_make", 2, Clause(10, [Skeleton("ir_clause", [Place(0), Place(1), Place(2), Place(3)]), Place(4)], [Skeleton(Cache("is"), [Place(5), Skeleton(Cache("+"), [Place(2), 1])]), Skeleton(Cache("sys_host_instrs"), [Place(0), Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_host_instrs"), [Place(1), Place(8), Place(7), Place(9)]), Skeleton(Cache("ir_clause_new"), [Place(9), Place(6), Place(8), Place(2), Place(3), Place(4)])], -1, "ir_clause"))
add("sys_host_make", 2, Clause(6, [Skeleton("ir_goal", [Place(0), Place(1)]), Place(2)], [Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(1), 1])]), Skeleton(Cache("sys_host_instrs"), [Place(0), Place(4), Place(3), Place(5)]), Skeleton(Cache("ir_goal_new"), [Place(5), Place(4), Place(1), Place(2)])], -1, "ir_goal"))
add("sys_host_instrs", 4, Clause(1, ["[]", "[]", Place(0), Place(0)], [], -1, "[]"))
add("sys_host_instrs", 4, Clause(7, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Place(4), Place(5)], [Skeleton(Cache("sys_host_instr"), [Place(0), Place(2), Place(4), Place(6)]), Skeleton(Cache("sys_host_instrs"), [Place(1), Place(3), Place(6), Place(5)])], -1, "."))
add("sys_host_instr", 4, Clause(5, [Skeleton("place", [NotImplemented, Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_anon_new"), [Place(2)]), Skeleton(Cache("="), [Place(3), Place(4)])], 0, "place"))
add("sys_host_instr", 4, Clause(8, [Skeleton("place", [Place(1), NotImplemented]), Place(2), Place(3), Place(4)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_current_max"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("is"), [Place(6), Skeleton(Cache("+"), [Place(1), 1])]), Skeleton(Cache("sys_host_set_max"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("ir_place_new"), [Place(1), Place(2)]), Skeleton(Cache("="), [Place(7), Place(4)])], 0, "place"))
add("sys_host_instr", 4, Clause(4, [Skeleton("place", [Place(0), NotImplemented]), Place(1), Place(2), Place(3)], [Skeleton(Cache("ir_place_new"), [Place(0), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "place"))
add("sys_host_instr", 4, Clause(8, [Skeleton("functor", [Place(0), Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_host_const"), [Place(0), Place(5)]), Skeleton(Cache("sys_host_instrs"), [Place(1), Place(6), Place(3), Place(7)]), Skeleton(Cache("ir_skeleton_new"), [Place(5), Place(6), Place(2)]), Skeleton(Cache("="), [Place(7), Place(4)])], -1, "functor"))
add("sys_host_instr", 4, Clause(4, [Skeleton("const", [Place(0)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_host_const"), [Place(0), Place(1)]), Skeleton(Cache("="), [Place(2), Place(3)])], -1, "const"))
add("sys_host_current_max", 3, Clause(1, [Place(0), Place(0), Place(0)], [], -1, NotImplemented))
add("sys_host_set_max", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
add("sys_host_const", 2, Clause(6, [Skeleton("functor", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_const"), [Place(1), Place(4)]), Skeleton(Cache("sys_host_args"), [Place(2), Place(5)]), Skeleton(Cache("ir_make_frozen"), [Place(4), Place(5), Place(3)])], 0, "functor"))
add("sys_host_const", 2, Clause(5, [Skeleton("link", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_host_alternatives"), [Place(1), Place(4)]), Skeleton(Cache("kb_make_defined"), [Place(4), Place(2), Place(3)])], 0, "link"))
add("sys_host_const", 2, Clause(3, [Skeleton("site", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_pred_site"), [Place(1), Place(2)])], 0, "site"))
add("sys_host_const", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
add("sys_host_args", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_host_args", 2, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("sys_host_const"), [Place(0), Place(2)]), Skeleton(Cache("sys_host_args"), [Place(1), Place(3)])], -1, "."))
add("sys_host_alternatives", 2, Clause(0, ["[]", "[]"], [], -1, "[]"))
add("sys_host_alternatives", 2, Clause(4, [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("sys_host_make"), [Place(0), Place(2)]), Skeleton(Cache("sys_host_alternatives"), [Place(1), Place(3)])], -1, "."))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_emulated", 2, 1])], -1))
add("sys_emulated", 2, Clause(0, ["argv", "[]"], [], -1, "argv"))
add("sys_emulated", 2, Clause(0, ["sys_locale", "en_GB"], [], -1, "sys_locale"))
add("sys_emulated", 2, Clause(0, ["sys_color", "normal"], [], -1, "sys_color"))
add("set_prolog_flag", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("must_be"), ["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(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_prolog_flag_set", 2, Clause(1, ["argv", Place(0)], [Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["argv", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["argv", Place(0)])])], -1, "argv"))
add("sys_prolog_flag_set", 2, Clause(1, ["sys_locale", Place(0)], [Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["sys_locale", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["sys_locale", Place(0)])])], -1, "sys_locale"))
add("sys_prolog_flag_set", 2, Clause(1, ["sys_color", Place(0)], [Skeleton(Cache("retractall"), [Skeleton("sys_emulated", ["sys_color", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton("sys_emulated", ["sys_color", Place(0)])])], -1, "sys_color"))
add("sys_prolog_flag_set", 2, Clause(1, ["base_url", Place(0)], [Skeleton(Cache("os_set_workdir"), [Place(0)])], -1, "base_url"))
add("sys_prolog_flag_set", 2, Clause(1, ["stage", Place(0)], [Skeleton(Cache("dg_set_stage"), [Place(0)])], -1, "stage"))
add("sys_prolog_flag_set", 2, Clause(1, ["partition", Place(0)], [Skeleton(Cache("dg_set_partition"), [Place(0)])], -1, "partition"))
add("sys_prolog_flag_set", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("sys_prolog_flag_get"), [Place(0), NotImplemented]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["modify", "flag", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("current_prolog_flag", 2, Clause(3, [Place(1), Place(2)], [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(4, [Place(1), Place(2)], [Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("sys_prolog_flag_get"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, NotImplemented))
add("current_prolog_flag", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_prolog_flag_get", 2, Clause(1, ["argv", Place(0)], [Skeleton(Cache("sys_emulated"), ["argv", Place(0)])], -1, "argv"))
add("sys_prolog_flag_get", 2, Clause(1, ["sys_locale", Place(0)], [Skeleton(Cache("sys_emulated"), ["sys_locale", Place(0)])], -1, "sys_locale"))
add("sys_prolog_flag_get", 2, Clause(1, ["sys_color", Place(0)], [Skeleton(Cache("sys_emulated"), ["sys_color", Place(0)])], -1, "sys_color"))
add("sys_prolog_flag_get", 2, Clause(1, ["base_url", Place(0)], [Skeleton(Cache("os_get_workdir"), [Place(0)])], -1, "base_url"))
add("sys_prolog_flag_get", 2, Clause(1, ["stage", Place(0)], [Skeleton(Cache("dg_get_stage"), [Place(0)])], -1, "stage"))
add("sys_prolog_flag_get", 2, Clause(1, ["partition", Place(0)], [Skeleton(Cache("dg_get_partition"), [Place(0)])], -1, "partition"))
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, ["dialect", "dogelog"], [], -1, "dialect"))
add("sys_prolog_flag_get", 2, Clause(0, ["version", 20105], [], -1, "version"))
add("sys_prolog_flag_get", 2, Clause(0, ["version_data", Frozen("dogelog", [2, 1, 5, Frozen(".", [Frozen("build", ["20260223"]), "[]"])])], [], -1, "version_data"))
add("sys_prolog_flag_get", 2, Clause(0, ["use_strict", "off"], [], -1, "use_strict"))
add("sys_prolog_flag_get", 2, Clause(0, ["max_code", 1114111], [], -1, "max_code"))
add("sys_prolog_flag_get", 2, Clause(0, ["max_arity", 2147483647], [], -1, "max_arity"))
add("sys_prolog_flag_get", 2, Clause(2, ["async_mode", Place(0)], [Skeleton(Cache("sys_flags_get"), [Place(1)]), 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(0)], [Skeleton(Cache("sys_flags_get"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 8, Place(0)])], -1, "allow_yield"))
add("sys_prolog_flag_get", 2, Clause(0, ["import_async", "on"], [], -1, "import_async"))
add("sys_prolog_flag_get", 2, Clause(0, ["prop_async", "on"], [], -1, "prop_async"))
add("sys_prolog_flag_get", 2, Clause(0, ["read_async", "on"], [], -1, "read_async"))
add("sys_prolog_flag_get", 2, Clause(2, ["state_async", Place(0)], [Skeleton(Cache("sys_flags_get"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 128, Place(0)])], -1, "state_async"))
add("sys_prolog_flag_get", 2, Clause(5, [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_flag_map"), [Place(3)]), Skeleton(Cache("ir_object_keys"), [Place(3), Place(4)]), Skeleton(Cache("member"), [Place(1), Place(4)]), Skeleton(Cache("ir_object_current"), [Place(3), Place(1), Place(2)])], 0, NotImplemented))
add("sys_prolog_flag_get", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_flag_map"), [Place(2)]), Skeleton(Cache("ir_object_current"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
add("sys_prolog_flag_decode", 3, Clause(4, [Place(1), Place(2), Place(3)], [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, [NotImplemented, NotImplemented, "off"], [], -1, NotImplemented))
add("vars_intersection", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("vars_subtract"), [Place(0), Place(1), Place(3)]), Skeleton(Cache("vars_subtract"), [Place(0), Place(3), Place(2)])], -1, NotImplemented))
add("vars_subtract", 3, Clause(5, [Place(0), Place(1), Place(2)], [Skeleton(Cache("term_variables"), [Place(1), Place(3)]), Skeleton(Cache("term_variables"), [Skeleton("+", [Place(1), Place(0)]), Place(4)]), Skeleton(Cache("append"), [Place(3), Place(2), Place(4)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_including", 3, 1])], -1))
run(Goal(4, [Skeleton(Cache("os_get_gestalt"), [Place(0)]), Skeleton(Cache("ir_object_current"), [Place(0), "sys_color", Place(1)]), Skeleton(Cache("set_prolog_flag"), ["sys_color", Place(1)]), Skeleton(Cache("ir_object_current"), [Place(0), "sys_locale", Place(2)]), Skeleton(Cache("set_prolog_flag"), ["sys_locale", Place(2)]), Skeleton(Cache("ir_object_current"), [Place(0), "argv", Place(3)]), Skeleton(Cache("set_prolog_flag"), ["argv", Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["term_expansion", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_horn", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_body", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_cut", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_disj", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_alter", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_mark", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_body", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_rest", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_goal", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_disj", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_more", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_alter", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_split", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_ambiguity", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_horn", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_body", 6])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_goal", 7])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_disj", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_invoke", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_args", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_expr", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_list", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_term", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_const_functor", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_const_only", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_var", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_map", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_set_map", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_idx_value", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_idx_value_arg", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_idx_value_term", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_body", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_goal", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_disj", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_args", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_expr", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_source", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_srcprop", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["current_source", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["source_property", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["discontiguous", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["multifile", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_multifile_safe", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["include", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_include_file", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_include_native", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), [".", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["ensure_loaded", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_check_file", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_action_file", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_lastpred", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_load_file", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_loading_begin", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_loading_end", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_update_last", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_style_static", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_style_head", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_style_indicator", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_usage_predicate", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_include_stream", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_include_lines", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_next_term", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_expand_include", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_handle_static", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_pred_type", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_pred_multi", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["true", 0])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["!", 0])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), [",", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), [";", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["->", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["\\=", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["\\+", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["once", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["repeat", 0])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["catch", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_error_handler", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_chain_head", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["throw", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_fill_stack", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_fetch_stack", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["try_call_finally", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["ignore", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["chain", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_chain_error", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_chain_raise", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_chain_concat", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["once_cleanup", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["setup_once_cleanup", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_setup_once_cleanup", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_once_cleanup", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sleep", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["call_later", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["call_later", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["call_with_time_limit", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_timeout_signal", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["create_task", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["create_task", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_frost_horn", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["member", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_member", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["select", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_select", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["reverse", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_reverse", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["append", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["length", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_length", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_length", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["between", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_between", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["findall", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_init", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_next", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_fini", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_message", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_message", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_string", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_string", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_locale_ancestor", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_multiton_keys", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_multiton_check", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_singleton_keys", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_singleton_check", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_marked_at", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["expand_term", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["phrase", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["term_expansion", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_phrase_expansion", 6])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_list_expansion", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sub_atom", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["last_sub_atom", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["dynamic", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["asserta", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["assertz", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["clause", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["retract", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["retractall", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["abolish", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_abolish", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_predprop", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["current_predicate", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["predicate_property", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_predprop_pattern", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_predprop_get", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_predprop_flag", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_make", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_instrs", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_instr", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_current_max", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_set_max", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_const", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_args", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_host_alternatives", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_emulated", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["set_prolog_flag", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prolog_flag_set", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["current_prolog_flag", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prolog_flag_get", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prolog_flag_decode", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["vars_intersection", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["vars_subtract", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_including", 3])], -1))

import math

run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_infix", 3])], -1))
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, [Frozen(Cache("sys_usage_predicate"), ["sys_is_prefix", 2])], -1))
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, [Frozen(Cache("sys_usage_predicate"), ["sys_is_postfix", 2])], -1))
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, [Frozen(Cache("sys_usage_predicate"), ["sys_op", 5])], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_op", 5, 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["current_op", 3])], -1))
add("current_op", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_op"), [Place(2), Place(1), Place(0), NotImplemented, NotImplemented])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["op", 3])], -1))
add("op", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("must_be"), ["integer", Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("must_be"), ["atom", Place(2)]), Skeleton(Cache("sys_check_priority"), [Place(0)]), Skeleton(Cache("sys_op_retract"), [Place(2), Place(1)]), Skeleton(Cache("sys_op_assert"), [Place(2), Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_check_priority", 1])], -1))
add("sys_check_priority", 1, Clause(1, [Place(0)], [Skeleton(Cache("<"), [Place(0), 0]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["not_less_than_zero", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_check_priority", 1, Clause(1, [Place(0)], [Skeleton(Cache(">"), [Place(0), 1200]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_priority", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_check_priority", 1, Clause(0, [NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_retract", 2])], -1))
add("sys_op_retract", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_is_prefix"), [Place(2), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(0)], [Skeleton(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_prefix"), [Place(1), NotImplemented]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1, NotImplemented), Clause(0, [NotImplemented], [], -1, NotImplemented)], 1), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_is_postfix"), [Place(2), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(0)], [Skeleton(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_postfix"), [Place(1), NotImplemented]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1, NotImplemented), Clause(0, [NotImplemented], [], -1, NotImplemented)], 1), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_is_infix"), [Place(2), NotImplemented, NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(make_defined([Clause(3, [Place(0)], [Skeleton(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_infix"), [Place(1), NotImplemented, NotImplemented]), Skeleton(Cache("retract"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1, NotImplemented), Clause(0, [NotImplemented], [], -1, NotImplemented)], 1), [Place(1)])], 0, NotImplemented))
add("sys_op_retract", 2, Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_specifier", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_assert", 3])], -1))
add("sys_op_assert", 3, Clause(1, [NotImplemented, NotImplemented, 0], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_assert", 3, Clause(3, [Place(0), Place(1), NotImplemented], [Skeleton(Cache("sys_is_infix"), [Place(1), NotImplemented, NotImplemented]), Skeleton(Cache("sys_op"), [Place(0), Place(2), NotImplemented, NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_postfix"), [Place(2), NotImplemented]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["create", "operator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_op_assert", 3, Clause(3, [Place(0), Place(1), NotImplemented], [Skeleton(Cache("sys_is_postfix"), [Place(1), NotImplemented]), Skeleton(Cache("sys_op"), [Place(0), Place(2), NotImplemented, NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_infix"), [Place(2), NotImplemented, NotImplemented]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["create", "operator", Place(0)]), NotImplemented])])], -1, NotImplemented))
add("sys_op_assert", 3, Clause(8, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_op_punct"), [Place(0), Place(3)]), Skeleton(Cache("sys_op_space"), [Place(1), Place(2), Place(4)]), Skeleton(Cache("sys_op_format"), [Place(1), Place(2), Place(5)]), Skeleton(Cache("is"), [Place(6), Skeleton(Cache("\\/"), [Skeleton(Cache("\\/"), [Place(3), Place(4)]), Place(5)])]), Skeleton(Cache("dg_get_partition"), [Place(7)]), Skeleton(Cache("assertz"), [Skeleton("sys_op", [Place(0), Place(1), Place(2), Place(6), Place(7)])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_punct", 2])], -1))
add("sys_op_punct", 2, Clause(1, [";", 2], [Skeleton(Cache("$CUT"), [Place(0)])], 0, ";"))
add("sys_op_punct", 2, Clause(1, [",", 2], [Skeleton(Cache("$CUT"), [Place(0)])], 0, ","))
add("sys_op_punct", 2, Clause(0, [NotImplemented, 0], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_space", 3])], -1))
add("sys_op_space", 3, Clause(2, [NotImplemented, Place(1), 0], [Skeleton(Cache(">"), [Place(1), 699]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(2, [Place(1), NotImplemented, 1], [Skeleton(Cache("sys_is_prefix"), [Place(1), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(2, [Place(1), NotImplemented, 2], [Skeleton(Cache("sys_is_postfix"), [Place(1), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_space", 3, Clause(0, [NotImplemented, NotImplemented, 3], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format", 3])], -1))
add("sys_op_format", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_is_infix"), [Place(1), NotImplemented, NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_op_format2"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_op_format", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_is_prefix"), [Place(1), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_op_format3"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_op_format", 3, Clause(0, [NotImplemented, NotImplemented, 0], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format2", 2])], -1))
add("sys_op_format2", 2, Clause(2, [Place(1), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(2, [Place(1), 8], [Skeleton(Cache(">"), [Place(1), 1049]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(2, [Place(1), 4], [Skeleton(Cache(">"), [Place(1), 949]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format2", 2, Clause(0, [NotImplemented, 0], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format3", 2])], -1))
add("sys_op_format3", 2, Clause(2, [Place(1), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_op_format3", 2, Clause(0, [NotImplemented, 0], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("op"), [1200, "fx", ":-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1200, "xfx", ":-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1200, "fx", "?-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1200, "xfx", "-->"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1150, "fx", "dynamic"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1150, "fx", "discontiguous"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1150, "fx", "multifile"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1150, "fx", "initialization"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1100, "xfy", ";"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1050, "xfy", "->"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1000, "xfy", ","])], -1))
run(Goal(0, [Frozen(Cache("op"), [900, "fy", "\\+"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "is"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "\\="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "=.."])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "<"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "=<"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "=\\="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", ">="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", ">"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "=:="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "@<"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "@=<"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "\\=="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "@>="])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "@>"])], -1))
run(Goal(0, [Frozen(Cache("op"), [700, "xfx", "=="])], -1))
run(Goal(0, [Frozen(Cache("op"), [600, "xfy", ":"])], -1))
run(Goal(0, [Frozen(Cache("op"), [500, "yfx", "+"])], -1))
run(Goal(0, [Frozen(Cache("op"), [500, "yfx", "-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [500, "yfx", "/\\"])], -1))
run(Goal(0, [Frozen(Cache("op"), [500, "yfx", "\\/"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "*"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "/"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "//"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "rem"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "div"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "mod"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "xor"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", ">>"])], -1))
run(Goal(0, [Frozen(Cache("op"), [400, "yfx", "<<"])], -1))
run(Goal(0, [Frozen(Cache("op"), [200, "fy", "-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [200, "fy", "\\"])], -1))
run(Goal(0, [Frozen(Cache("op"), [200, "xfx", "**"])], -1))
run(Goal(0, [Frozen(Cache("op"), [200, "xfy", "^"])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_init_goal", 1])], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_init_goal", 1, 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["initialization", 1])], -1))
add("initialization", 1, Clause(1, [Place(0)], [Skeleton(Cache("assertz"), [Skeleton("sys_init_goal", [Place(0)])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_init_goals", 0])], -1))
add("sys_init_goals", 0, Clause(2, [], [Skeleton(Cache("retract"), [Skeleton("sys_init_goal", [Place(0)])]), Skeleton(Cache("catch"), [Skeleton("sys_must", [Place(0)]), Place(1), Skeleton("sys_print_error", [Place(1)])]), Cache("fail")], -1, NotImplemented))
add("sys_init_goals", 0, Clause(0, [], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_must", 1])], -1))
add("sys_must", 1, Clause(2, [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_must", 1, Clause(0, [NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["directive_failed"]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_baseline", 0])], -1))
add("sys_baseline", 0, Clause(1, [], [Skeleton(Cache("current_prolog_flag"), ["argv", Place(0)]), Skeleton(Cache("sys_baseline"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_baseline", 1])], -1))
add("sys_baseline", 1, Clause(2, [Skeleton(".", ["-h", NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("sys_print_message"), [Frozen("command", ["runtime"]), Place(1)]), Cache("nl")], 0, "."))
add("sys_baseline", 1, Clause(1, [Skeleton(".", [Place(0), NotImplemented])], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "-"]), Skeleton(Cache("throw"), [Skeleton("error", [Frozen("system_error", ["option_command"]), NotImplemented])])], -1, "."))
add("sys_baseline", 1, Clause(0, [NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_launch", 0])], -1))
add("sys_launch", 0, Clause(1, [], [Skeleton(Cache("current_prolog_flag"), ["argv", Place(0)]), Skeleton(Cache("sys_launch"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_launch", 1])], -1))
add("sys_launch", 1, Clause(1, [Skeleton(".", ["-h", NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("sys_launch", 1, Clause(0, ["[]"], [Frozen(Cache("ensure_loaded"), [Frozen("library", [Frozen("/", ["tester", "session"])])]), Cache("version"), Cache("prolog")], -1, "[]"))
add("sys_launch", 1, Clause(1, [Skeleton(".", [Place(0), NotImplemented])], [Skeleton(Cache("ensure_loaded"), [Place(0)]), Cache("sys_init_goals")], -1, "."))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_net_request", 1])], -1))
add("sys_net_request", 1, Clause(1, [Place(0)], [Skeleton(Cache("sys_net_path"), [Place(0)])], -1, NotImplemented))
add("sys_net_request", 1, Clause(1, [NotImplemented], [Skeleton(Cache("current_prolog_flag"), ["base_url", Place(0)]), Skeleton(Cache("sys_net_path"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_net_path", 1])], -1))
add("sys_net_path", 1, Clause(1, [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "http:"])], -1, NotImplemented))
add("sys_net_path", 1, Clause(1, [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "https:"])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["open", 3])], -1))
add("open", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("open"), [Place(0), Place(1), Place(2), "[]"])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["open", 4])], -1))
add("open", 4, Clause(6, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_net_request"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_object_new"), [Place(5)]), Skeleton(Cache("sys_open_opts"), [Place(4), Place(5)]), Skeleton(Cache("sys_open_http"), [Place(1), Place(2), Place(5), Place(3)]), Skeleton(Cache("sys_open_results"), [Place(4), Place(5)])], 0, NotImplemented))
add("open", 4, Clause(5, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("ir_object_new"), [Place(4)]), Skeleton(Cache("sys_stream_opts"), [Place(3), Place(4)]), Skeleton(Cache("sys_open_file"), [Place(0), Place(1), Place(4), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_file", 4])], -1))
add("sys_open_file", 4, Clause(5, [Place(1), "read", Place(2), Place(3)], [Frozen(Cache("current_prolog_flag"), ["read_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_open_promise_opts"), [Place(1), Place(2), Place(3), Place(4)]), Skeleton(Cache("$YIELD"), [Place(4)])], 0, NotImplemented))
add("sys_open_file", 4, Clause(4, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("os_open_sync_opts"), [Place(0), Place(1), Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_http", 4])], -1))
add("sys_open_http", 4, Clause(5, [Place(1), "read", Place(2), Place(3)], [Frozen(Cache("current_prolog_flag"), ["read_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("net_open_promise_opts"), [Place(1), Place(2), Place(3), Place(4)]), Skeleton(Cache("$YIELD"), [Place(4)])], 0, NotImplemented))
add("sys_open_http", 4, Clause(4, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("net_open_sync_opts"), [Place(0), Place(1), Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["close", 1])], -1))
add("close", 1, Clause(4, [Place(1)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(2)]), 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(3)])], 0, NotImplemented))
add("close", 1, Clause(1, [Place(0)], [Skeleton(Cache("os_close_sync"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["nl", 0])], -1))
add("nl", 0, Clause(1, [], [Skeleton(Cache("current_output"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(0), "\n"]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["nl", 1])], -1))
add("nl", 1, Clause(1, [Place(0)], [Skeleton(Cache("put_atom"), [Place(0), "\n"]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["flush_output", 0])], -1))
add("flush_output", 0, Clause(1, [], [Skeleton(Cache("current_output"), [Place(0)]), Skeleton(Cache("flush_output"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_code", 1])], -1))
add("put_code", 1, Clause(3, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("char_code"), [Place(2), Place(0)]), Skeleton(Cache("put_atom"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_code", 2])], -1))
add("put_code", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("char_code"), [Place(2), Place(1)]), Skeleton(Cache("put_atom"), [Place(0), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_code", 1])], -1))
add("get_code", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("get_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_code", 2])], -1))
add("get_code", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("os_get_code"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, NotImplemented))
add("get_code", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("sys_read_buffer"), [Place(1)]), Skeleton(Cache("os_get_code"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, NotImplemented))
add("get_code", 2, Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("="), [-1, Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["peek_code", 1])], -1))
add("peek_code", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["peek_code", 2])], -1))
add("peek_code", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("os_peek_code"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, NotImplemented))
add("peek_code", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("sys_read_buffer"), [Place(1)]), Skeleton(Cache("os_peek_code"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, NotImplemented))
add("peek_code", 2, Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("="), [-1, Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_buffer", 1])], -1))
add("sys_read_buffer", 1, Clause(4, [Place(1)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(2)]), 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(3)])], 0, NotImplemented))
add("sys_read_buffer", 1, Clause(1, [Place(0)], [Skeleton(Cache("os_read_sync"), [Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_atom", 1])], -1))
add("put_atom", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("put_atom"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_atom", 2])], -1))
add("get_atom", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_input"), [Place(2)]), Skeleton(Cache("get_atom"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_atom", 3])], -1))
add("get_atom", 3, Clause(8, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_atom_opts"), [Place(2), Frozen("v", [10, 1, 0]), Skeleton("v", [Place(3), Place(4), Place(5)])]), Skeleton(Cache("sys_get_code"), [Place(0), Place(6), Place(4)]), Skeleton(Cache("sys_get_code_list"), [Place(6), Place(3), Place(5), Place(0), Place(7), Place(4)]), Skeleton(Cache("atom_codes"), [Place(1), Place(7)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code_list", 6])], -1))
add("sys_get_code_list", 6, Clause(1, [-1, NotImplemented, NotImplemented, NotImplemented, "[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, -1))
add("sys_get_code_list", 6, Clause(2, [Place(1), Place(1), NotImplemented, NotImplemented, Skeleton(".", [Place(1), "[]"]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_get_code_list", 6, Clause(2, [Place(1), NotImplemented, 1, NotImplemented, Skeleton(".", [Place(1), "[]"]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_get_code_list", 6, Clause(7, [Place(1), Place(2), 0, Place(3), Skeleton(".", [Place(1), Place(4)]), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_get_code"), [Place(3), Place(6), Place(5)]), Skeleton(Cache("sys_get_code_list"), [Place(6), Place(2), 0, Place(3), Place(4), Place(5)])], 0, NotImplemented))
add("sys_get_code_list", 6, Clause(8, [Place(0), Place(1), Place(2), Place(3), Skeleton(".", [Place(0), Place(4)]), Place(5)], [Skeleton(Cache("sys_get_code"), [Place(3), Place(6), Place(5)]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("-"), [Place(2), 1])]), Skeleton(Cache("sys_get_code_list"), [Place(6), Place(1), Place(7), Place(3), Place(4), Place(5)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code", 3])], -1))
add("sys_get_code", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(3), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("get_code"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_get_code", 3, Clause(5, [Place(0), Place(1), Place(2)], [Skeleton(Cache("os_stream_flags"), [Place(0), Place(3)]), Skeleton(Cache("get_code"), [Place(0), Place(4)]), Skeleton(Cache("sys_get_code_more"), [Place(4), Place(3), Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code_more", 5])], -1))
add("sys_get_code_more", 5, Clause(1, [13, NotImplemented, NotImplemented, 10, NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, 13))
add("sys_get_code_more", 5, Clause(5, [10, Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(1), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_get_code"), [Place(2), Place(3), Place(4)])], 0, 10))
add("sys_get_code_more", 5, Clause(1, [Place(0), NotImplemented, NotImplemented, Place(0), NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_opts", 3])], -1))
add("sys_atom_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_atom_opts", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_atom_opt"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_atom_opts"), [Place(2), Place(5), Place(4)])], 0, "."))
add("sys_atom_opts", 3, Clause(2, ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_atom_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_opt", 3])], -1))
add("sys_atom_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_atom_opt", 3, Clause(4, [Skeleton("stop", [Place(1)]), Skeleton("v", [NotImplemented, Place(2), Place(3)]), Skeleton("v", [Place(1), Place(2), Place(3)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "stop"))
add("sys_atom_opt", 3, Clause(6, [Skeleton("compress", [Place(1)]), Skeleton("v", [Place(2), Place(3), Place(4)]), Skeleton("v", [Place(2), Place(5), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 1, Place(3), Place(5)])], 0, "compress"))
add("sys_atom_opt", 3, Clause(4, [Skeleton("max", [Place(1)]), Skeleton("v", [Place(2), Place(3), NotImplemented]), Skeleton("v", [Place(2), Place(3), Place(1)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "max"))
add("sys_atom_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["atom_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write", 1])], -1))
add("write", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("write_term"), [Place(1), Place(0), Frozen(".", [Frozen("numbervars", ["true"]), "[]"])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write", 2])], -1))
add("write", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("numbervars", ["true"]), "[]"])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["writeq", 1])], -1))
add("writeq", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("write_term"), [Place(1), Place(0), Frozen(".", [Frozen("numbervars", ["true"]), Frozen(".", [Frozen("quoted", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["writeq", 2])], -1))
add("writeq", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("numbervars", ["true"]), Frozen(".", [Frozen("quoted", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_canonical", 1])], -1))
add("write_canonical", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("write_term"), [Place(1), Place(0), Frozen(".", [Frozen("quoted", ["true"]), Frozen(".", [Frozen("ignore_ops", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_canonical", 2])], -1))
add("write_canonical", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("quoted", ["true"]), Frozen(".", [Frozen("ignore_ops", ["true"]), "[]"])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_term", 2])], -1))
add("write_term", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_output"), [Place(2)]), Skeleton(Cache("write_term"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_error", 1])], -1))
add("sys_print_error", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_error"), [Place(1)]), Skeleton(Cache("sys_print_error"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_error", 2])], -1))
add("sys_print_error", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(3)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fancy_problem"), [Place(2), Place(1)])], 0, NotImplemented))
add("sys_print_error", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_print_problem"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_problem", 2])], -1))
add("sys_print_problem", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["unknown", Place(1)]), Place(2)]), Skeleton(Cache("nl"), [Place(2)])], 0, NotImplemented))
add("sys_print_problem", 2, Clause(4, [Skeleton("cause", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_problem"), [Place(1), Place(3)]), Skeleton(Cache("sys_print_problem"), [Place(2), Place(3)])], 0, "cause"))
add("sys_print_problem", 2, Clause(4, [Skeleton("error", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), [Frozen("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_problem", 2, Clause(4, [Skeleton("warning", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), [Frozen("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_problem", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["unknown", Place(0)]), Place(1)]), Skeleton(Cache("nl"), [Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_trace", 2])], -1))
add("sys_print_trace", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["context", Place(1)]), Place(2)]), Skeleton(Cache("nl"), [Place(2)])], 0, NotImplemented))
add("sys_print_trace", 2, Clause(4, [Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_frame"), [Place(1), Place(3)]), Skeleton(Cache("nl"), [Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0, "."))
add("sys_print_trace", 2, Clause(1, ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_print_trace", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["context", Place(0)]), Place(1)]), Skeleton(Cache("nl"), [Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_frame", 2])], -1))
add("sys_print_frame", 2, Clause(6, [Skeleton("sys_including", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("file_base_name"), [Place(1), Place(4)]), Skeleton(Cache("ir_object_current"), [Place(2), "lineno", Place(5)]), Skeleton(Cache("sys_print_message"), [Skeleton("file_line", [Place(4), Place(5)]), Place(3)])], 0, "sys_including"))
add("sys_print_frame", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_print_message"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_message", 1])], -1))
add("sys_print_message", 1, Clause(2, [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("sys_print_message"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_message", 2])], -1))
add("sys_print_message", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("current_prolog_flag"), ["sys_locale", Place(2)]), Skeleton(Cache("sys_print_message"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_message", 3])], -1))
add("sys_print_message", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["template", Place(1)]), Place(2), Place(3)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(6, [Place(1), Place(2), Place(3)], [Skeleton(Cache("get_message"), [Place(1), Place(3), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_template"), [Place(2), Place(4), Place(5)])], 0, NotImplemented))
add("sys_print_message", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_print_message"), [Skeleton("exception", ["template", Place(0)]), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read", 1])], -1))
add("read", 1, Clause(3, [Place(0)], [Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("get_code"), [Place(1), Place(2)]), Skeleton(Cache("sys_read_term"), [Place(2), Place(1), "[]", Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read", 2])], -1))
add("read", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("get_code"), [Place(0), Place(2)]), Skeleton(Cache("sys_read_term"), [Place(2), Place(0), "[]", Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read_term", 2])], -1))
add("read_term", 2, Clause(4, [Place(0), Place(1)], [Skeleton(Cache("current_input"), [Place(2)]), Skeleton(Cache("get_code"), [Place(2), Place(3)]), Skeleton(Cache("sys_read_term"), [Place(3), Place(2), Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read_term", 3])], -1))
add("read_term", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("get_code"), [Place(0), Place(3)]), Skeleton(Cache("sys_read_term"), [Place(3), Place(0), Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_property", 2])], -1))
add("file_property", 2, Clause(7, [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prop_map"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_keys"), [Place(3), Place(4)]), Skeleton(Cache("member"), [Place(5), Place(4)]), Skeleton(Cache("ir_object_current"), [Place(3), Place(5), Place(6)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(5), Skeleton(".", [Place(6), "[]"])])])], 0, NotImplemented))
add("file_property", 2, Clause(7, [Place(1), Place(2)], [Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(3), Skeleton(".", [Place(4), "[]"])])]), Skeleton(Cache("sys_prop_map"), [Place(1), Place(5)]), Skeleton(Cache("ir_object_current"), [Place(5), Place(3), Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(6)])], 0, NotImplemented))
add("file_property", 2, Clause(2, [NotImplemented, Place(0)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(1), Skeleton(".", [NotImplemented, "[]"])])]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(1)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_map", 2])], -1))
add("sys_prop_map", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_net_request"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prop_http"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_prop_map", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_prop_file"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_file", 2])], -1))
add("sys_prop_file", 2, Clause(4, [Place(1), Place(2)], [Frozen(Cache("current_prolog_flag"), ["prop_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_prop_promise"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("$YIELD"), [Place(3)])], 0, NotImplemented))
add("sys_prop_file", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("os_prop_sync"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_http", 2])], -1))
add("sys_prop_http", 2, Clause(4, [Place(1), Place(2)], [Frozen(Cache("current_prolog_flag"), ["prop_async", "on"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("net_prop_promise"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("$YIELD"), [Place(3)])], 0, NotImplemented))
add("sys_prop_http", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("net_prop_sync"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["set_file_property", 2])], -1))
add("set_file_property", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("sys_net_request"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("net_cntrl_sync"), [Place(1), Place(2)])], 0, NotImplemented))
add("set_file_property", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("os_cntrl_sync"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_directory_name", 2])], -1))
add("file_directory_name", 2, Clause(6, [Place(0), Place(1)], [Skeleton(make_defined([Clause(3, [Place(1), Place(2)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(2), NotImplemented, NotImplemented, "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("="), [Place(0), -1])], -1, NotImplemented)], 1), [Place(0), Place(2)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2)], [Skeleton(Cache("last_sub_atom"), [Place(1), Place(2), NotImplemented, NotImplemented, "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(1, [NotImplemented, Place(0)], [Skeleton(Cache("="), [Place(0), -1])], -1, NotImplemented)], 1), [Place(0), Place(3)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("max"), [Place(2), Place(3)])]), Skeleton(Cache("is"), [Place(5), Skeleton(Cache("+"), [Place(4), 1])]), Skeleton(Cache("sub_atom"), [Place(0), 0, Place(5), NotImplemented, Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_base_name", 2])], -1))
add("file_base_name", 2, Clause(6, [Place(0), Place(1)], [Skeleton(Cache("atom_length"), [Place(0), Place(2)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented], [Skeleton(Cache("last_sub_atom"), [Place(1), NotImplemented, NotImplemented, Place(2), "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(0), Place(3), Place(2)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented], [Skeleton(Cache("last_sub_atom"), [Place(1), NotImplemented, NotImplemented, Place(2), "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(0), Place(4), Place(2)]), Skeleton(Cache("is"), [Place(5), Skeleton(Cache("min"), [Place(3), Place(4)])]), Skeleton(Cache("sub_atom"), [Place(0), NotImplemented, Place(5), 0, Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["absolute_file_name", 2])], -1))
add("absolute_file_name", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("absolute_file_name"), [Place(0), Place(1), "[]"])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["absolute_file_name", 3])], -1))
add("absolute_file_name", 3, Clause(7, [Place(0), Place(1), Place(2)], [Skeleton(Cache("current_prolog_flag"), ["base_url", Place(3)]), Skeleton(Cache("sys_absolute_opts"), [Place(2), Skeleton("v", ["", Place(3)]), Skeleton("v", [Place(4), Place(5)])]), Skeleton(Cache("sys_file_complete"), [Place(4), Place(0), Place(6)]), Skeleton(Cache("sys_file_combine"), [Place(5), Place(6), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_absolute_opts", 3])], -1))
add("sys_absolute_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_absolute_opts", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_absolute_opt"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_absolute_opts"), [Place(2), Place(5), Place(4)])], 0, "."))
add("sys_absolute_opts", 3, Clause(2, ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_absolute_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_absolute_opt", 3])], -1))
add("sys_absolute_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_absolute_opt", 3, Clause(3, [Skeleton("relative_to", [Place(1)]), Skeleton("v", [Place(2), NotImplemented]), Skeleton("v", [Place(2), Place(1)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "relative_to"))
add("sys_absolute_opt", 3, Clause(3, [Skeleton("extension", [Place(1)]), Skeleton("v", [NotImplemented, Place(2)]), Skeleton("v", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "extension"))
add("sys_absolute_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["absolute_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_complete", 3])], -1))
add("sys_file_complete", 3, Clause(2, ["", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, ""))
add("sys_file_complete", 3, Clause(3, [NotImplemented, Place(1), Place(1)], [Skeleton(Cache("file_base_name"), [Place(1), Place(2)]), Skeleton(Cache("sub_atom"), [Place(2), NotImplemented, NotImplemented, NotImplemented, "."]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_file_complete", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("atom_concat"), [Place(1), Place(0), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_combine", 3])], -1))
add("sys_file_combine", 3, Clause(3, [NotImplemented, Place(1), Place(2)], [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(7, [Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(1, [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "../"])], -1, NotImplemented), Clause(1, [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "..\\"])], -1, NotImplemented)], 1), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sub_atom"), [Place(2), 3, NotImplemented, 0, Place(4)]), Skeleton(Cache("file_directory_name"), [Place(1), Place(5)]), Skeleton(Cache("sub_atom"), [Place(5), 0, NotImplemented, 1, Place(6)]), Skeleton(Cache("sys_file_combine"), [Place(6), Place(4), Place(3)])], 0, NotImplemented))
add("sys_file_combine", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("file_directory_name"), [Place(0), Place(3)]), Skeleton(Cache("atom_concat"), [Place(3), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["is_absolute_file_name", 1])], -1))
add("is_absolute_file_name", 1, Clause(5, [Place(0)], [Skeleton(Cache("atom_length"), [Place(0), Place(1)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented], [Skeleton(Cache("sub_atom"), [Place(1), Place(2), NotImplemented, NotImplemented, "/"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(0), Place(2), Place(1)]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented], [Skeleton(Cache("sub_atom"), [Place(1), Place(2), NotImplemented, NotImplemented, "\\"]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented), Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(0), Place(3), Place(1)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("min"), [Place(2), Place(3)])]), Skeleton(make_defined([Clause(3, [Place(1), Place(2), NotImplemented], [Skeleton(Cache("=="), [Place(1), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("<"), [Place(1), Place(2)])], 0, NotImplemented), Clause(4, [Place(1), NotImplemented, Place(2)], [Skeleton(Cache("sub_atom"), [Place(2), Place(3), NotImplemented, NotImplemented, ":"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("<"), [Place(3), Place(1)])], 0, NotImplemented)], 1), [Place(4), Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_relative", 2])], -1))
add("sys_file_relative", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_file_relative", 2, Clause(3, [Skeleton("library", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_compound"), [Place(1), "liblet/", ".p", Place(2)])], 0, "library"))
add("sys_file_relative", 2, Clause(4, [Skeleton("foreign", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_prolog_flag"), ["foreign_ext", Place(3)]), Skeleton(Cache("sys_file_compound"), [Place(1), "foreign/", Place(3), Place(2)])], 0, "foreign"))
add("sys_file_relative", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("sys_file_including"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("absolute_file_name"), [Place(1), Place(2), Skeleton(".", [Skeleton("relative_to", [Place(3)]), Frozen(".", [Frozen("extension", [".p"]), "[]"])])])], 0, NotImplemented))
add("sys_file_relative", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("absolute_file_name"), [Place(0), Place(1), Frozen(".", [Frozen("extension", [".p"]), "[]"])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_compound", 4])], -1))
add("sys_file_compound", 4, Clause(7, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_file_struct"), [Place(0), Place(4)]), Skeleton(Cache("atom_join"), [Skeleton(".", [Place(1), Skeleton(".", [Place(4), Skeleton(".", [Place(2), "[]"])])]), Place(5)]), Skeleton(Cache("current_prolog_flag"), ["system_url", Place(6)]), Skeleton(Cache("sys_file_combine"), [Place(6), Place(5), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_including", 1])], -1))
add("sys_file_including", 1, Clause(3, [Place(1)], [Skeleton(Cache("current_task"), [Place(2)]), Skeleton(Cache("sys_including"), [Place(1), Place(2), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("\\=="), [Place(1), "user"])], 0, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_struct", 2])], -1))
add("sys_file_struct", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_file_struct", 2, Clause(5, [Skeleton("/", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_struct"), [Place(1), Place(4)]), Skeleton(Cache("atom_join"), [Skeleton(".", [Place(4), Skeleton(".", ["/", Skeleton(".", [Place(2), "[]"])])]), Place(3)])], 0, "/"))
add("sys_file_struct", 2, Clause(3, [Place(1), Place(2)], [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(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["atom", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
add("strings", 3, Clause(0, ["exception.unknown", "de", "Ausnahme unbekannt: $"], [], -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.template", "de", "Vorlage unbekannt: $"], [], -1, "exception.template"))
add("strings", 3, Clause(0, ["exception.context", "de", "    Kontext unbekannt: $"], [], -1, "exception.context"))
add("strings", 3, Clause(0, ["file_line", "de", "    $ auf $"], [], -1, "file_line"))
add("strings", 3, Clause(0, ["command.runtime", "de", "Benutzung: opt_1 .. opt_m [text arg_1 .. arg_n]\nFalls kein text spezifiziert ist, wird Banner gezeigt und dann\nTop-Level ausgeführt, andernfalls wird text ausgeführt.\n-h                   Diesen Hilfetext anzeigen und Vorgang beenden"], [], -1, "command.runtime"))
add("strings", 3, Clause(0, ["system_error.option_command", "de", "Ungültige Befehlzeilenoption, -h für weitere Informationen."], [], -1, "system_error.option_command"))
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.template", "", "Unknown template: $"], [], -1, "exception.template"))
add("strings", 3, Clause(0, ["exception.context", "", "    Unknown context: $"], [], -1, "exception.context"))
add("strings", 3, Clause(0, ["file_line", "", "    $ at $"], [], -1, "file_line"))
add("strings", 3, Clause(0, ["command.runtime", "", "Usage: opt_1 ... opt_m [text arg_1 ... arg_n]\nIf no text is specified, banner is shown and then top-level\nis executed, otherwise text is executed.\n-h                   Display this help and exit."], [], -1, "command.runtime"))
add("strings", 3, Clause(0, ["system_error.option_command", "", "Invalid command line option, -h for more information."], [], -1, "system_error.option_command"))
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, ["resource_error.not_supported", "", "Operation nicht unterstützt."], [], -1, "resource_error.not_supported"))
add("strings", 3, Clause(0, ["representation_error.int", "de", "Unerlaubte Ganzzahl (nicht zwischen - 2^31 und 2^31-1)."], [], -1, "representation_error.int"))
add("strings", 3, Clause(0, ["representation_error.max_arity", "de", "Unerlaubte Stelligkeit (nicht kleiner oder gleich 2^31-1)."], [], -1, "representation_error.max_arity"))
add("strings", 3, Clause(0, ["domain_error.prolog_flag", "de", "Flag erwartet, gefunden $."], [], -1, "domain_error.prolog_flag"))
add("strings", 3, Clause(0, ["domain_error.flag_value", "de", "Flagwert erwartet, gefunden $."], [], -1, "domain_error.flag_value"))
add("strings", 3, Clause(0, ["domain_error.not_less_than_zero", "de", "Positiv oder 0 erwartet, gefunden $."], [], -1, "domain_error.not_less_than_zero"))
add("strings", 3, Clause(0, ["domain_error.operator_priority", "de", "Operatorlevel (kleiner oder gleich 1200) erwartet, gefunden $."], [], -1, "domain_error.operator_priority"))
add("strings", 3, Clause(0, ["domain_error.operator_specifier", "de", "Operatormode (fx, fy, xfx, yfx, xfy, xf, yf) erwartet, gefunden $."], [], -1, "domain_error.operator_specifier"))
add("strings", 3, Clause(0, ["domain_error.time_format", "de", "Zeitformat erwartet, gefunden $."], [], -1, "domain_error.time_format"))
add("strings", 3, Clause(0, ["type_error.atom", "de", "Atom erwartet, gefunden $."], [], -1, "type_error.atom"))
add("strings", 3, Clause(0, ["type_error.number", "de", "Zahl erwartet, gefunden $."], [], -1, "type_error.number"))
add("strings", 3, Clause(0, ["type_error.integer", "de", "Ganzzahl erwartet, gefunden $."], [], -1, "type_error.integer"))
add("strings", 3, Clause(0, ["type_error.float", "de", "Gleitzahl erwartet, gefunden $."], [], -1, "type_error.float"))
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", "Liste ([] oder [_|_]) erwartet, gefunden $."], [], -1, "type_error.list"))
add("strings", 3, Clause(0, ["type_error.evaluable", "de", "Berechenbaren Funktion erwartet, gefunden $."], [], -1, "type_error.evaluable"))
add("strings", 3, Clause(0, ["type_error.character", "de", "Zeichen erwartet, gefunden $."], [], -1, "type_error.character"))
add("strings", 3, Clause(0, ["type_error.pair", "de", "Paar (_-_) erwartet, gefunden $."], [], -1, "type_error.pair"))
add("strings", 3, Clause(0, ["type_error.predicate_indicator", "de", "Prädikatindikator (_/_) erwartet, gefunden $."], [], -1, "type_error.predicate_indicator"))
add("strings", 3, Clause(0, ["type_error.maybe", "de", "Option (nothing oder just(_)) erwartet, gefunden $."], [], -1, "type_error.maybe"))
add("strings", 3, Clause(0, ["permission_error.modify.flag", "de", "Kann schreibgeschütztes Flag $ nicht aktualisieren."], [], -1, "permission_error.modify.flag"))
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, ["resource_error.not_supported", "", "Operation not supported."], [], -1, "resource_error.not_supported"))
add("strings", 3, Clause(0, ["representation_error.int", "", "Illegal integer (not between - 2^31 and 2^31-1)."], [], -1, "representation_error.int"))
add("strings", 3, Clause(0, ["representation_error.max_arity", "", "Illegal arity (not less or equal 2^31-1)."], [], -1, "representation_error.max_arity"))
add("strings", 3, Clause(0, ["domain_error.prolog_flag", "", "Flag expected, found $."], [], -1, "domain_error.prolog_flag"))
add("strings", 3, Clause(0, ["domain_error.flag_value", "", "Flag value expected, found $."], [], -1, "domain_error.flag_value"))
add("strings", 3, Clause(0, ["domain_error.not_less_than_zero", "", "Positive or 0 expected, found $."], [], -1, "domain_error.not_less_than_zero"))
add("strings", 3, Clause(0, ["domain_error.operator_priority", "", "Operator level (less or equal 1200) expected, found $."], [], -1, "domain_error.operator_priority"))
add("strings", 3, Clause(0, ["domain_error.operator_specifier", "", "Operator mode (fx, fy, xfx, yfx, xfy, xf, yf) expected, found $."], [], -1, "domain_error.operator_specifier"))
add("strings", 3, Clause(0, ["domain_error.time_format", "", "Time format expected, found $."], [], -1, "domain_error.time_format"))
add("strings", 3, Clause(0, ["type_error.atom", "", "Atom expected, found $."], [], -1, "type_error.atom"))
add("strings", 3, Clause(0, ["type_error.number", "", "Number expected, found $."], [], -1, "type_error.number"))
add("strings", 3, Clause(0, ["type_error.integer", "", "Integer expected, found $."], [], -1, "type_error.integer"))
add("strings", 3, Clause(0, ["type_error.float", "", "Float expected, found $."], [], -1, "type_error.float"))
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", "", "List ([] or [_|_]) expected, found $."], [], -1, "type_error.list"))
add("strings", 3, Clause(0, ["type_error.evaluable", "", "Evaluable functor expected, found $."], [], -1, "type_error.evaluable"))
add("strings", 3, Clause(0, ["type_error.character", "", "Character expected, found $."], [], -1, "type_error.character"))
add("strings", 3, Clause(0, ["type_error.pair", "", "Pair (_-_) expected, found $."], [], -1, "type_error.pair"))
add("strings", 3, Clause(0, ["type_error.predicate_indicator", "", "Predicate indicator (_/_) expected, found $."], [], -1, "type_error.predicate_indicator"))
add("strings", 3, Clause(0, ["type_error.maybe", "", "Maybe (nothing or just(_)) expected, found $."], [], -1, "type_error.maybe"))
add("strings", 3, Clause(0, ["permission_error.modify.flag", "", "Can\'t modify read-only flag $."], [], -1, "permission_error.modify.flag"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_code_class", 2])], -1))
add("sys_code_class", 2, Clause(2, [44, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 44))
add("sys_code_class", 2, Clause(2, [40, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 40))
add("sys_code_class", 2, Clause(2, [41, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 41))
add("sys_code_class", 2, Clause(2, [124, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 124))
add("sys_code_class", 2, Clause(2, [91, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 91))
add("sys_code_class", 2, Clause(2, [93, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 93))
add("sys_code_class", 2, Clause(2, [123, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 123))
add("sys_code_class", 2, Clause(2, [125, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0, 125))
add("sys_code_class", 2, Clause(2, [59, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 59))
add("sys_code_class", 2, Clause(2, [33, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 33))
add("sys_code_class", 2, Clause(2, [39, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 39))
add("sys_code_class", 2, Clause(2, [96, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 96))
add("sys_code_class", 2, Clause(2, [34, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 34))
add("sys_code_class", 2, Clause(2, [37, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0, 37))
add("sys_code_class", 2, Clause(2, [8205, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_graphic"])], 0, 8205))
add("sys_code_class", 2, Clause(2, [65039, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_graphic"])], 0, 65039))
add("sys_code_class", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("code_category"), [Place(0), Place(2)]), Skeleton(Cache("sys_type_class"), [Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_type_class", 2])], -1))
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, [Frozen(Cache("sys_usage_predicate"), ["sys_name_class", 1])], -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, [Frozen(Cache("sys_usage_predicate"), ["sys_white_class", 1])], -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, [Frozen(Cache("sys_usage_predicate"), ["sys_get_token", 3])], -1))
add("sys_get_token", 3, Clause(6, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_code"), [Place(3), Place(1), Place(4)]), Skeleton(Cache("sys_code_class"), [Place(3), Place(5)]), Skeleton(Cache("sys_get_class"), [Place(5), Place(3), Place(0), Place(4), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_class", 5])], -1))
add("sys_get_class", 5, Clause(7, ["is_ident", Place(0), Skeleton("atom", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_name"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("atom_codes"), [Place(1), Skeleton(".", [Place(0), Place(5)])]), Skeleton(Cache("="), [Place(6), Place(3)])], -1, "is_ident"))
add("sys_get_class", 5, Clause(7, ["is_upper", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_name"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_make_variable"), [Skeleton(".", [Place(0), Place(5)]), Place(1)]), Skeleton(Cache("="), [Place(6), Place(3)])], -1, "is_upper"))
add("sys_get_class", 5, Clause(7, ["is_score", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_name"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_make_variable"), [Skeleton(".", [Place(0), Place(5)]), Place(1)]), Skeleton(Cache("="), [Place(6), Place(3)])], -1, "is_score"))
add("sys_get_class", 5, Clause(4, ["is_digit", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_get_number"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_digit"))
add("sys_get_class", 5, Clause(5, ["is_punct", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("char_code"), [Place(1), Place(0)]), Skeleton(Cache("="), [Place(4), Place(3)])], -1, "is_punct"))
add("sys_get_class", 5, Clause(5, ["is_graphic", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_block_or_symbol"), [Place(0), Place(1), Place(4), Place(3)])], -1, "is_graphic"))
add("sys_get_class", 5, Clause(4, ["is_solo", Place(0), Place(1), Place(2), Place(3)], [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(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_get_eof_or_error"), [Place(0), Place(1), Place(2), Place(3)])], -1, "is_invalid"))
add("sys_get_class", 5, Clause(4, ["is_blank", NotImplemented, Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(3)]), Skeleton(Cache("sys_get_token"), [Place(0), Place(3), Place(2)])], -1, "is_blank"))
add("sys_get_class", 5, Clause(4, ["is_cntrl", NotImplemented, Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(3)]), Skeleton(Cache("sys_get_token"), [Place(0), Place(3), Place(2)])], -1, "is_cntrl"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_eof_or_error", 4])], -1))
add("sys_get_eof_or_error", 4, Clause(3, [-1, "end_of_file", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_get_eof_or_error", 4, Clause(2, [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_unicode"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_name", 3])], -1))
add("sys_get_name", 3, Clause(8, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_code_class"), [Place(1), Place(6)]), Skeleton(Cache("sys_name_class"), [Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(7)]), Skeleton(Cache("sys_get_name"), [Place(2), Place(7), Place(4)])], 0, "."))
add("sys_get_name", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_make_variable", 2])], -1))
add("sys_make_variable", 2, Clause(2, [Skeleton(".", [Place(1), "[]"]), "anon"], [Skeleton(Cache("code_category"), [Place(1), 23]), Skeleton(Cache("$CUT"), [Place(0)])], 0, "."))
add("sys_make_variable", 2, Clause(2, [Place(0), Skeleton("var", [Place(1)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_number", 4])], -1))
add("sys_get_number", 4, Clause(7, [48, Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_special"), [Place(5), Place(1), Place(6), Place(3)])], 0, 48))
add("sys_get_number", 4, Clause(5, [Place(0), Skeleton("decimal", [Skeleton(".", [Place(0), Place(1)])]), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_decimal"), [Place(1), Place(4), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_special", 4])], -1))
add("sys_get_special", 4, Clause(5, [120, Skeleton("radix", [Place(1), 16]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 16, Place(4), Place(3)])], 0, 120))
add("sys_get_special", 4, Clause(5, [111, Skeleton("radix", [Place(1), 8]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 8, Place(4), Place(3)])], 0, 111))
add("sys_get_special", 4, Clause(5, [98, Skeleton("radix", [Place(1), 2]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_radix"), [Place(1), "[]", 2, Place(4), Place(3)])], 0, 98))
add("sys_get_special", 4, Clause(5, [114, Skeleton("exotic", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_name"), [Place(1), Place(4), Place(3)])], 0, 114))
add("sys_get_special", 4, Clause(7, [39, Skeleton("code", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_code"), [Place(5), Place(1), Place(6), Place(3)])], 0, 39))
add("sys_get_special", 4, Clause(3, [NotImplemented, Skeleton("decimal", [Skeleton(".", [48, Place(0)])]), Place(1), Place(2)], [Skeleton(Cache("sys_get_decimal"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_decimal", 3])], -1))
add("sys_get_decimal", 3, Clause(7, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("code_category"), [Place(1), 9]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_decimal"), [Place(2), Place(6), Place(4)])], 0, "."))
add("sys_get_decimal", 3, Clause(8, [Skeleton(".", [46, Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_current_code"), [46, Place(2), Place(4)]), Skeleton(Cache("sys_at_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("code_category"), [Place(5), 9]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(6), Place(7)]), Skeleton(Cache("sys_get_fraction"), [Place(1), Place(7), Place(3)])], 0, "."))
add("sys_get_decimal", 3, Clause(9, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_is_expo"), [Place(1)]), Skeleton(Cache("sys_at_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_is_sign_digit"), [Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(7), Place(8)]), Skeleton(Cache("sys_get_exponent"), [Place(2), Place(8), Place(4)])], 0, "."))
add("sys_get_decimal", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_fraction", 3])], -1))
add("sys_get_fraction", 3, Clause(7, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("code_category"), [Place(1), 9]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_fraction"), [Place(2), Place(6), Place(4)])], 0, "."))
add("sys_get_fraction", 3, Clause(9, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_is_expo"), [Place(1)]), Skeleton(Cache("sys_at_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_is_sign_digit"), [Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(7), Place(8)]), Skeleton(Cache("sys_get_exponent"), [Place(2), Place(8), Place(4)])], 0, "."))
add("sys_get_fraction", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_exponent", 3])], -1))
add("sys_get_exponent", 3, Clause(7, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_is_sign"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_rest"), [Place(2), Place(6), Place(4)])], 0, "."))
add("sys_get_exponent", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_get_rest"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_rest", 3])], -1))
add("sys_get_rest", 3, Clause(7, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("code_category"), [Place(1), 9]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_rest"), [Place(2), Place(6), Place(4)])], 0, "."))
add("sys_get_rest", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_expo", 1])], -1))
add("sys_is_expo", 1, Clause(0, [69], [], -1, 69))
add("sys_is_expo", 1, Clause(0, [101], [], -1, 101))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_sign_digit", 1])], -1))
add("sys_is_sign_digit", 1, Clause(1, [Place(0)], [Skeleton(Cache("sys_is_sign"), [Place(0)])], -1, NotImplemented))
add("sys_is_sign_digit", 1, Clause(1, [Place(0)], [Skeleton(Cache("code_category"), [Place(0), 9])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_sign", 1])], -1))
add("sys_is_sign", 1, Clause(0, [45], [], -1, 45))
add("sys_is_sign", 1, Clause(0, [43], [], -1, 43))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_block_or_symbol", 4])], -1))
add("sys_get_block_or_symbol", 4, Clause(7, [47, Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_code"), [42, Place(2), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(4), Place(5)]), Skeleton(Cache("sys_skip_block"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_token"), [Place(1), Place(6), Place(3)])], 0, 47))
add("sys_get_block_or_symbol", 4, Clause(8, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_get_symbol"), [Place(4), Place(2), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_make_period"), [Place(6), Skeleton(".", [Place(0), Place(4)]), Place(1)]), Skeleton(Cache("="), [Place(7), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_symbol", 3])], -1))
add("sys_get_symbol", 3, Clause(7, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_code_class"), [Place(1), "is_graphic"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(5), Place(6)]), Skeleton(Cache("sys_get_symbol"), [Place(2), Place(6), Place(4)])], 0, "."))
add("sys_get_symbol", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_block", 2])], -1))
add("sys_skip_block", 2, Clause(5, [Place(1), Place(2)], [Skeleton(Cache("sys_current_code"), [42, Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(4)]), Skeleton(Cache("sys_skip_end"), [Place(4), Place(2)])], 0, NotImplemented))
add("sys_skip_block", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_current_code"), [-1, Place(0), Place(2)]), Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["end_of_file_in_block_comment"]), NotImplemented])]), Skeleton(Cache("="), [Place(2), Place(1)])], -1, NotImplemented))
add("sys_skip_block", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(2)]), Skeleton(Cache("sys_skip_block"), [Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_end", 2])], -1))
add("sys_skip_end", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("sys_current_code"), [47, Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(2)])], 0, NotImplemented))
add("sys_skip_end", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_skip_block"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_make_period", 3])], -1))
add("sys_make_period", 3, Clause(1, [37, Frozen(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0, 37))
add("sys_make_period", 3, Clause(1, [-1, Frozen(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0, -1))
add("sys_make_period", 3, Clause(3, [Place(1), Frozen(".", [46, "[]"]), "."], [Skeleton(Cache("sys_code_class"), [Place(1), Place(2)]), Skeleton(Cache("sys_white_class"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_make_period", 3, Clause(2, [NotImplemented, Place(0), Skeleton("atom", [Place(1)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_line_or_solo", 4])], -1))
add("sys_get_line_or_solo", 4, Clause(7, [39, Skeleton("single", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_quote"), [Place(5), Place(1), 39, Place(6), Place(3)])], 0, 39))
add("sys_get_line_or_solo", 4, Clause(7, [34, Skeleton("codes", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_quote"), [Place(5), Place(1), 34, Place(6), Place(3)])], 0, 34))
add("sys_get_line_or_solo", 4, Clause(7, [96, Skeleton("back", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_quote"), [Place(5), Place(1), 96, Place(6), Place(3)])], 0, 96))
add("sys_get_line_or_solo", 4, Clause(8, [37, Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_skip_line"), [Place(5), Place(6), Place(7)]), Skeleton(Cache("sys_get_token"), [Place(1), Place(7), Place(3)])], 0, 37))
add("sys_get_line_or_solo", 4, Clause(5, [Place(0), Skeleton("atom", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("char_code"), [Place(1), Place(0)]), Skeleton(Cache("="), [Place(4), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_line", 3])], -1))
add("sys_skip_line", 3, Clause(3, [10, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 10))
add("sys_skip_line", 3, Clause(3, [13, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 13))
add("sys_skip_line", 3, Clause(3, [-1, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_skip_line", 3, Clause(5, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(2)]), Skeleton(Cache("sys_current_code"), [Place(3), Place(2), Place(4)]), Skeleton(Cache("sys_skip_line"), [Place(3), Place(4), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_quote", 5])], -1))
add("sys_get_quote", 5, Clause(8, [Place(1), Place(2), Place(1), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_get_more"), [Place(6), Place(2), Place(1), Place(7), Place(4)])], 0, NotImplemented))
add("sys_get_quote", 5, Clause(8, [92, Skeleton(".", [92, Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_get_cont"), [Place(6), Place(1), Place(2), Place(7), Place(4)])], 0, 92))
add("sys_get_quote", 5, Clause(3, [10, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 10))
add("sys_get_quote", 5, Clause(3, [13, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 13))
add("sys_get_quote", 5, Clause(3, [-1, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_get_quote", 5, Clause(8, [Place(0), Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_get_quote"), [Place(6), Place(1), Place(2), Place(7), Place(4)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_more", 5])], -1))
add("sys_get_more", 5, Clause(8, [Place(1), Skeleton(".", [Place(1), Skeleton(".", [Place(1), Place(2)])]), Place(1), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_get_quote"), [Place(6), Place(2), Place(1), Place(7), Place(4)])], 0, NotImplemented))
add("sys_get_more", 5, Clause(1, [NotImplemented, "[]", NotImplemented, Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code", 4])], -1))
add("sys_get_code", 4, Clause(5, [39, Skeleton(".", [39, Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_get_double"), [Place(1), Place(4), Place(3)])], 0, 39))
add("sys_get_code", 4, Clause(7, [92, Skeleton(".", [92, Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(2), Place(4)]), Skeleton(Cache("sys_current_code"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_get_escape"), [Place(5), Place(1), "[]", Place(6), Place(3)])], 0, 92))
add("sys_get_code", 4, Clause(3, [10, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 10))
add("sys_get_code", 4, Clause(3, [13, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, 13))
add("sys_get_code", 4, Clause(3, [-1, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, -1))
add("sys_get_code", 4, Clause(3, [Place(0), Skeleton(".", [Place(0), "[]"]), Place(1), Place(2)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_double", 3])], -1))
add("sys_get_double", 3, Clause(4, [Frozen(".", [39, "[]"]), Place(1), Place(2)], [Skeleton(Cache("sys_current_code"), [39, Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(2)])], 0, "."))
add("sys_get_double", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_cont", 5])], -1))
add("sys_get_cont", 5, Clause(8, [10, Skeleton(".", [10, Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_current_code"), [Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_get_quote"), [Place(6), Place(1), Place(2), Place(7), Place(4)])], 0, 10))
add("sys_get_cont", 5, Clause(10, [13, Skeleton(".", [13, Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_get_skip"), [Place(1), Place(6), Place(5), Place(7)]), Skeleton(Cache("sys_current_code"), [Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_get_quote"), [Place(8), Place(6), Place(2), Place(9), Place(4)])], 0, 13))
add("sys_get_cont", 5, Clause(9, [Place(0), Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_get_escape"), [Place(0), Place(1), Place(5), Place(3), Place(6)]), Skeleton(Cache("sys_current_code"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_get_quote"), [Place(7), Place(5), Place(2), Place(8), Place(4)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_skip", 4])], -1))
add("sys_get_skip", 4, Clause(5, [Skeleton(".", [10, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_code"), [10, Place(2), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(4), Place(3)])], 0, "."))
add("sys_get_skip", 4, Clause(2, [Place(0), Place(0), Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_escape", 5])], -1))
add("sys_get_escape", 5, Clause(8, [120, Skeleton(".", [120, Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(3), Place(5)]), Skeleton(Cache("sys_get_radix"), [Place(1), Place(6), 16, Place(5), Place(7)]), Skeleton(Cache("sys_get_backslash"), [Place(6), Place(2), Place(7), Place(4)])], 0, 120))
add("sys_get_escape", 5, Clause(9, [Place(1), Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4), Place(5)], [Skeleton(Cache("sys_is_radix"), [Place(1), 8]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(4), Place(6)]), Skeleton(Cache("sys_get_radix"), [Place(2), Place(7), 8, Place(6), Place(8)]), Skeleton(Cache("sys_get_backslash"), [Place(7), Place(3), Place(8), Place(5)])], 0, NotImplemented))
add("sys_get_escape", 5, Clause(4, [10, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, 10))
add("sys_get_escape", 5, Clause(4, [13, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, 13))
add("sys_get_escape", 5, Clause(4, [-1, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, -1))
add("sys_get_escape", 5, Clause(4, [Place(0), Skeleton(".", [Place(0), Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_backslash", 4])], -1))
add("sys_get_backslash", 4, Clause(5, [Skeleton(".", [92, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_code"), [92, Place(2), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(4), Place(3)])], 0, "."))
add("sys_get_backslash", 4, Clause(2, [Place(0), Place(0), Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_radix", 5])], -1))
add("sys_get_radix", 5, Clause(9, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("sys_current_code"), [Place(1), Place(5), Place(7)]), Skeleton(Cache("sys_is_radix"), [Place(1), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_code"), [Place(7), Place(8)]), Skeleton(Cache("sys_get_radix"), [Place(2), Place(3), Place(4), Place(8), Place(6)])], 0, "."))
add("sys_get_radix", 5, Clause(2, [Place(0), Place(0), NotImplemented, Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_radix", 2])], -1))
add("sys_is_radix", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("code_numeric"), [Place(0), Place(2)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("<"), [Place(2), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_meta", 1])], -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, [Frozen(Cache("sys_usage_predicate"), ["sys_is_escape", 2])], -1))
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, [Frozen(Cache("sys_usage_predicate"), ["sys_current_code", 3])], -1))
add("sys_current_code", 3, Clause(2, [Place(0), Skeleton("-", [Place(1), Place(0)]), Skeleton("-", [Place(1), Place(0)])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_next_code", 2])], -1))
add("sys_next_code", 2, Clause(2, [Skeleton("-", [Place(0), NotImplemented]), Skeleton("-", [Place(0), Place(1)])], [Skeleton(Cache("get_code"), [Place(0), Place(1)])], -1, "-"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_at_code", 3])], -1))
add("sys_at_code", 3, Clause(3, [Place(0), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [Place(1), Place(2)])], [Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_space", 3])], -1))
add("sys_safe_space", 3, Clause(8, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sub_atom"), [Place(2), 0, 1, NotImplemented, Place(4)]), Skeleton(Cache("char_code"), [Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_object_current"), [Place(1), "last", Place(6)]), Skeleton(Cache("sys_code_class"), [Place(6), Place(7)]), Skeleton(Cache("sys_safe_cases"), [Place(7), Place(1), Place(6), Place(5), Place(3)])], 0, NotImplemented))
add("sys_safe_space", 3, Clause(0, [NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_cases", 5])], -1))
add("sys_safe_cases", 5, Clause(5, [Place(1), Place(2), Place(3), Place(4), NotImplemented], [Skeleton(Cache("sys_name_class"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_name"), [Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_safe_cases", 5, Clause(5, ["is_graphic", Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_symbol"), [Place(1), Place(2), Place(3), Place(4)])], 0, "is_graphic"))
add("sys_safe_cases", 5, Clause(3, ["is_solo", Place(1), Place(2), Place(2), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_quote"), [Place(1), Place(2)])], 0, "is_solo"))
add("sys_safe_cases", 5, Clause(0, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_name", 3])], -1))
add("sys_safe_name", 3, Clause(4, [Place(1), NotImplemented, Place(2)], [Skeleton(Cache("sys_code_class"), [Place(2), Place(3)]), Skeleton(Cache("sys_name_class"), [Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_name", 3, Clause(2, [Place(1), 48, 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_name", 3, Clause(0, [NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_symbol", 4])], -1))
add("sys_safe_symbol", 4, Clause(3, [Place(1), NotImplemented, Place(2), NotImplemented], [Skeleton(Cache("sys_code_class"), [Place(2), "is_graphic"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_symbol", 4, Clause(4, [Place(1), 45, Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 4]), 0]), Skeleton(Cache("code_category"), [Place(2), 9]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_symbol", 4, Clause(0, [NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_quote", 2])], -1))
add("sys_safe_quote", 2, Clause(2, [Place(1), 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(2, [Place(1), 96], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(2, [Place(1), 34], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_safe_quote", 2, Clause(0, [NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_atom", 3])], -1))
add("sys_put_atom", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fancy_atom"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_put_atom", 3, Clause(2, [Place(0), Place(1), NotImplemented], [Skeleton(Cache("put_atom"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_token", 2])], -1))
add("sys_convert_token", 2, Clause(4, [Skeleton("single", [Place(1)]), Skeleton("atom", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(3), 39, Place(1), "[]"]), Skeleton(Cache("atom_codes"), [Place(2), Place(3)])], 0, "single"))
add("sys_convert_token", 2, Clause(4, [Skeleton("back", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(3), 96, Place(1), "[]"]), Skeleton(Cache("sys_make_variable"), [Place(3), Place(2)])], 0, "back"))
add("sys_convert_token", 2, Clause(4, [Skeleton("decimal", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(3), Place(1)]), Skeleton(Cache("atom_number"), [Place(3), Place(2)])], 0, "decimal"))
add("sys_convert_token", 2, Clause(5, [Skeleton("radix", [Place(1), Place(2)]), Skeleton("const", [Place(3)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(4), Place(1)]), Skeleton(Cache("atom_integer"), [Place(4), Place(2), Place(3)])], 0, "radix"))
add("sys_convert_token", 2, Clause(4, [Skeleton("exotic", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(3), Place(1)]), Skeleton(Cache("atom_exotic"), [Place(3), Place(2)])], 0, "exotic"))
add("sys_convert_token", 2, Clause(3, [Skeleton("codes", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(2), 34, Place(1), "[]"])], 0, "codes"))
add("sys_convert_token", 2, Clause(3, [Skeleton("code", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_code"), [Place(2), Place(1), "[]"])], 0, "code"))
add("sys_convert_token", 2, Clause(1, [Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_quote", 4])], -1))
add("sys_convert_quote", 4, Clause(6, [Place(1), Place(2), Skeleton(".", [92, Place(3)]), Place(4)], [Skeleton(Cache("sys_convert_sep"), [Place(3), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(1), Place(2), Place(5), Place(4)])], 0, NotImplemented))
add("sys_convert_quote", 4, Clause(5, [Skeleton(".", [Place(1), Place(2)]), Place(1), Skeleton(".", [Place(1), Skeleton(".", [Place(1), Place(3)])]), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(2), Place(1), Place(3), Place(4)])], 0, "."))
add("sys_convert_quote", 4, Clause(2, [NotImplemented, NotImplemented, Skeleton(".", [-1, Place(0)]), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["unbalanced_quoted"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_convert_quote", 4, Clause(9, [Skeleton(".", [Place(1), Place(2)]), Place(3), Skeleton(".", [Place(4), Place(5)]), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_code_class"), [Place(4), Place(7)]), Skeleton(Cache("sys_convert_char"), [Place(7), Place(4), Place(1), Place(5), Place(8)]), Skeleton(Cache("sys_convert_quote"), [Place(2), Place(3), Place(8), Place(6)])], 0, "."))
add("sys_convert_quote", 4, Clause(1, ["[]", NotImplemented, Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_sep", 2])], -1))
add("sys_convert_sep", 2, Clause(1, [Skeleton(".", [13, Skeleton(".", [10, Place(0)])]), Place(0)], [], -1, "."))
add("sys_convert_sep", 2, Clause(1, [Skeleton(".", [10, Place(0)]), Place(0)], [], -1, "."))
add("sys_convert_sep", 2, Clause(1, [Skeleton(".", [13, Place(0)]), Place(0)], [], -1, "."))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_code", 3])], -1))
add("sys_convert_code", 3, Clause(3, [39, Skeleton(".", [39, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_double"), [Place(1), Place(2)])], 0, 39))
add("sys_convert_code", 3, Clause(2, [NotImplemented, Skeleton(".", [-1, Place(0)]), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["missing_char"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
add("sys_convert_code", 3, Clause(5, [Place(0), Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("sys_code_class"), [Place(1), Place(4)]), Skeleton(Cache("sys_convert_char"), [Place(4), Place(1), Place(0), Place(2), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_double", 2])], -1))
add("sys_convert_double", 2, Clause(3, [Skeleton(".", [39, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_convert_double", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["doubling_missing"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_char", 5])], -1))
add("sys_convert_char", 5, Clause(4, ["is_graphic", 92, Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_escape"), [Place(1), Place(2), Place(3)])], 0, "is_graphic"))
add("sys_convert_char", 5, Clause(2, ["is_cntrl", NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_layout"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, "is_cntrl"))
add("sys_convert_char", 5, Clause(2, ["is_invalid", NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_unicode"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, "is_invalid"))
add("sys_convert_char", 5, Clause(2, [NotImplemented, Place(0), Place(0), Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_escape", 3])], -1))
add("sys_convert_escape", 3, Clause(5, [Place(1), Skeleton(".", [Place(2), Place(3)]), Place(4)], [Skeleton(Cache("sys_is_escape"), [Place(2), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(4)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(8, [Place(1), Skeleton(".", [Place(2), Place(3)]), Place(4)], [Skeleton(Cache("sys_is_radix"), [Place(2), 8]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_radix"), [Place(5), 8, Place(3), Place(6)]), Skeleton(Cache("atom_codes"), [Place(7), Skeleton(".", [Place(2), Place(5)])]), Skeleton(Cache("atom_integer"), [Place(7), 8, Place(1)]), Skeleton(Cache("sys_convert_backslash"), [Place(6), Place(4)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(7, [Place(1), Skeleton(".", [120, Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_radix"), [Place(4), 16, Place(2), Place(5)]), Skeleton(Cache("atom_codes"), [Place(6), Place(4)]), Skeleton(Cache("atom_integer"), [Place(6), 16, Place(1)]), Skeleton(Cache("sys_convert_backslash"), [Place(5), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(4, [Place(1), Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("sys_is_meta"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_convert_escape", 3, Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_escape"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_backslash", 2])], -1))
add("sys_convert_backslash", 2, Clause(3, [Skeleton(".", [92, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_convert_backslash", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["unbalanced_escape"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_radix", 4])], -1))
add("sys_convert_radix", 4, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Skeleton(".", [Place(1), Place(4)]), Place(5)], [Skeleton(Cache("sys_is_radix"), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_radix"), [Place(2), Place(3), Place(4), Place(5)])], 0, "."))
add("sys_convert_radix", 4, Clause(1, ["[]", NotImplemented, Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_stream_opts", 2])], -1))
add("sys_stream_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_stream_opts", 2, Clause(4, [Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_stream_opt"), [Place(1), Place(3)]), Skeleton(Cache("sys_stream_opts"), [Place(2), Place(3)])], 0, "."))
add("sys_stream_opts", 2, Clause(1, ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_stream_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_stream_opt", 2])], -1))
add("sys_stream_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_stream_opt", 2, Clause(4, [Skeleton("type", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_type"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_set"), [Place(2), "encoding", Place(3)])], 0, "type"))
add("sys_stream_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["open_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_check_type", 2])], -1))
add("sys_check_type", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_check_type", 2, Clause(1, ["text", "utf8"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "text"))
add("sys_check_type", 2, Clause(1, ["binary", "latin1"], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "binary"))
add("sys_check_type", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["type", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_opts", 2])], -1))
add("sys_open_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_open_opts", 2, Clause(4, [Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_open_opt"), [Place(1), Place(3)]), Skeleton(Cache("sys_open_opts"), [Place(2), Place(3)])], 0, "."))
add("sys_open_opts", 2, Clause(1, ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_open_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_opt", 2])], -1))
add("sys_open_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_open_opt", 2, Clause(3, [Skeleton("method", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("ir_object_set"), [Place(2), "method", Place(1)])], 0, "method"))
add("sys_open_opt", 2, Clause(4, [Skeleton("headers", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_object_new"), [Place(3)]), Skeleton(Cache("sys_header_opts"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_set"), [Place(2), "headers", Place(3)])], 0, "headers"))
add("sys_open_opt", 2, Clause(4, [Skeleton("body", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("ir_object_new"), [Place(3)]), Skeleton(Cache("ir_object_set"), [Place(3), "text", Place(1)]), Skeleton(Cache("ir_object_set"), [Place(2), "body", Place(3)])], 0, "body"))
add("sys_open_opt", 2, Clause(5, [Skeleton("body", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("ir_object_new"), [Place(4)]), Skeleton(Cache("ir_object_set"), [Place(4), "text", Place(1)]), Skeleton(Cache("sys_stream_opts"), [Place(2), Place(4)]), Skeleton(Cache("ir_object_set"), [Place(3), "body", Place(4)])], 0, "body"))
add("sys_open_opt", 2, Clause(4, [Skeleton("type", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_check_type"), [Place(1), Place(3)]), Skeleton(Cache("ir_object_set"), [Place(2), "encoding", Place(3)])], 0, "type"))
add("sys_open_opt", 2, Clause(1, [Skeleton("uri", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "uri"))
add("sys_open_opt", 2, Clause(1, [Skeleton("status", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "status"))
add("sys_open_opt", 2, Clause(1, [Skeleton("fields", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "fields"))
add("sys_open_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["open_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_opts", 2])], -1))
add("sys_header_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_header_opts", 2, Clause(4, [Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_header_opt"), [Place(1), Place(3)]), Skeleton(Cache("sys_header_opts"), [Place(2), Place(3)])], 0, "."))
add("sys_header_opts", 2, Clause(1, ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_header_opts", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_opt", 2])], -1))
add("sys_header_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_header_opt", 2, Clause(4, [Skeleton("-", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["atom", Place(1)]), Skeleton(Cache("must_be"), ["atom", Place(2)]), Skeleton(Cache("ir_object_set"), [Place(3), Place(1), Place(2)])], 0, "-"))
add("sys_header_opt", 2, Clause(1, [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["pair", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_results", 2])], -1))
add("sys_open_results", 2, Clause(3, [Skeleton(".", [Place(0), Place(1)]), Place(2)], [Skeleton(Cache("sys_open_result"), [Place(0), Place(2)]), Skeleton(Cache("sys_open_results"), [Place(1), Place(2)])], -1, "."))
add("sys_open_results", 2, Clause(0, ["[]", NotImplemented], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_result", 2])], -1))
add("sys_open_result", 2, Clause(0, [Skeleton("method", [NotImplemented]), NotImplemented], [], -1, "method"))
add("sys_open_result", 2, Clause(0, [Skeleton("headers", [NotImplemented]), NotImplemented], [], -1, "headers"))
add("sys_open_result", 2, Clause(1, [Skeleton("body", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "body"))
add("sys_open_result", 2, Clause(0, [Skeleton("body", [NotImplemented, NotImplemented]), NotImplemented], [], -1, "body"))
add("sys_open_result", 2, Clause(0, [Skeleton("type", [NotImplemented]), NotImplemented], [], -1, "type"))
add("sys_open_result", 2, Clause(2, [Skeleton("uri", [Place(0)]), Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "uri", Place(0)])], -1, "uri"))
add("sys_open_result", 2, Clause(2, [Skeleton("status", [Place(0)]), Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "status", Place(0)])], -1, "status"))
add("sys_open_result", 2, Clause(3, [Skeleton("fields", [Place(0)]), Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "fields", Place(2)]), Skeleton(Cache("sys_header_results"), [Place(2), Place(0)])], -1, "fields"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_results", 2])], -1))
add("sys_header_results", 2, Clause(3, [Place(0), Place(1)], [Skeleton(Cache("ir_object_keys"), [Place(0), Place(2)]), Skeleton(Cache("sys_header_results"), [Place(2), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_results", 3])], -1))
add("sys_header_results", 3, Clause(0, ["[]", NotImplemented, "[]"], [], -1, "[]"))
add("sys_header_results", 3, Clause(5, [Skeleton(".", [Place(0), Place(1)]), Place(2), Skeleton(".", [Skeleton("-", [Place(0), Place(3)]), Place(4)])], [Skeleton(Cache("ir_object_current"), [Place(2), Place(0), Place(3)]), Skeleton(Cache("sys_header_results"), [Place(1), Place(2), Place(4)])], -1, "."))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_opts", 3])], -1))
add("sys_write_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_write_opts", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_opt"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_write_opts"), [Place(2), Place(5), Place(4)])], 0, "."))
add("sys_write_opts", 3, Clause(2, ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_write_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_opt", 3])], -1))
add("sys_write_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_write_opt", 3, Clause(5, [Skeleton("variable_names", [Place(1)]), Skeleton("h", [NotImplemented, Place(2), Place(3), Place(4)]), Skeleton("h", [Place(1), Place(2), Place(3), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "variable_names"))
add("sys_write_opt", 3, Clause(5, [Skeleton("anonymous", [Place(1)]), Skeleton("h", [Place(2), NotImplemented, Place(3), Place(4)]), Skeleton("h", [Place(2), Place(1), Place(3), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "anonymous"))
add("sys_write_opt", 3, Clause(7, [Skeleton("quoted", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 1, Place(4), Place(6)])], 0, "quoted"))
add("sys_write_opt", 3, Clause(7, [Skeleton("ignore_ops", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 2, Place(4), Place(6)])], 0, "ignore_ops"))
add("sys_write_opt", 3, Clause(7, [Skeleton("numbervars", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 8, Place(4), Place(6)])], 0, "numbervars"))
add("sys_write_opt", 3, Clause(5, [Skeleton("priority", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), NotImplemented]), Skeleton("h", [Place(2), Place(3), Place(4), Place(1)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "priority"))
add("sys_write_opt", 3, Clause(7, [Skeleton("format", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 4, Place(4), Place(6)])], 0, "format"))
add("sys_write_opt", 3, Clause(7, [Skeleton("colorize", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 16, Place(4), Place(6)])], 0, "colorize"))
add("sys_write_opt", 3, Clause(7, [Skeleton("hint", [Place(1)]), Skeleton("h", [Place(2), Place(3), Place(4), Place(5)]), Skeleton("h", [Place(2), Place(3), Place(6), Place(5)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 32, Place(4), Place(6)])], 0, "hint"))
add("sys_write_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["write_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_opts", 3])], -1))
add("sys_read_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_read_opts", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_read_opt"), [Place(1), Place(3), Place(5)]), Skeleton(Cache("sys_read_opts"), [Place(2), Place(5), Place(4)])], 0, "."))
add("sys_read_opts", 3, Clause(2, ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_read_opts", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_opt", 3])], -1))
add("sys_read_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_read_opt", 3, Clause(2, [Skeleton("variable_names", [NotImplemented]), Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "variable_names"))
add("sys_read_opt", 3, Clause(2, [Skeleton("singletons", [NotImplemented]), Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "singletons"))
add("sys_read_opt", 3, Clause(3, [Skeleton("priority", [Place(1)]), Skeleton("z", [NotImplemented, Place(2)]), Skeleton("z", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "priority"))
add("sys_read_opt", 3, Clause(5, [Skeleton("end_of_file", [Place(1)]), Skeleton("z", [Place(2), Place(3)]), Skeleton("z", [Place(2), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 1, Place(3), Place(4)])], 0, "end_of_file"))
add("sys_read_opt", 3, Clause(5, [Skeleton("hint", [Place(1)]), Skeleton("z", [Place(2), Place(3)]), Skeleton("z", [Place(2), Place(4)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_opt_boolean"), [Place(1), 32, Place(3), Place(4)])], 0, "hint"))
add("sys_read_opt", 3, Clause(1, [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["read_option", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_results", 2])], -1))
add("sys_read_results", 2, Clause(3, [Skeleton(".", [Place(0), Place(1)]), Place(2)], [Skeleton(Cache("sys_read_result"), [Place(0), Place(2)]), Skeleton(Cache("sys_read_results"), [Place(1), Place(2)])], -1, "."))
add("sys_read_results", 2, Clause(0, ["[]", NotImplemented], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_result", 2])], -1))
add("sys_read_result", 2, Clause(2, [Skeleton("variable_names", [Place(0)]), Skeleton("s", [Place(1), NotImplemented])], [Skeleton(Cache("reverse"), [Place(1), Place(0)])], -1, "variable_names"))
add("sys_read_result", 2, Clause(2, [Skeleton("singletons", [Place(0)]), Skeleton("s", [NotImplemented, Place(1)])], [Skeleton(Cache("reverse"), [Place(1), Place(0)])], -1, "singletons"))
add("sys_read_result", 2, Clause(0, [Skeleton("priority", [NotImplemented]), NotImplemented], [], -1, "priority"))
add("sys_read_result", 2, Clause(0, [Skeleton("end_of_file", [NotImplemented]), NotImplemented], [], -1, "end_of_file"))
add("sys_read_result", 2, Clause(0, [Skeleton("hint", [NotImplemented]), NotImplemented], [], -1, "hint"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_opt_boolean", 4])], -1))
add("sys_opt_boolean", 4, Clause(1, [Place(0), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1, NotImplemented))
add("sys_opt_boolean", 4, Clause(4, ["true", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("\\/"), [Place(2), Place(1)])])], 0, "true"))
add("sys_opt_boolean", 4, Clause(4, ["false", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("/\\"), [Place(2), Skeleton(Cache("\\"), [Place(1)])])])], 0, "false"))
add("sys_opt_boolean", 4, Clause(1, [Place(0), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["boolean", Place(0)]), NotImplemented])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom", 1])], -1))
add("sys_proper_atom", 1, Clause(3, [Skeleton(".", [Place(0), Place(1)])], [Skeleton(Cache("sys_code_class"), [Place(0), Place(2)]), Skeleton(Cache("sys_proper_atom"), [Place(2), Skeleton(".", [Place(0), Place(1)])])], -1, "."))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom", 2])], -1))
add("sys_proper_atom", 2, Clause(1, ["is_ident", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_ident"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Frozen(".", [46, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Skeleton(".", [47, Skeleton(".", [42, NotImplemented])])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_graphic", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_graphic"), [Place(0)])], -1, "is_graphic"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Frozen(".", [39, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Frozen(".", [96, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Frozen(".", [34, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_solo", Frozen(".", [37, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0, "is_solo"))
add("sys_proper_atom", 2, Clause(0, ["is_solo", Skeleton(".", [NotImplemented, "[]"])], [], -1, "is_solo"))
add("sys_proper_atom", 2, Clause(1, ["is_punct", Frozen(".", [91, Frozen(".", [93, "[]"])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "is_punct"))
add("sys_proper_atom", 2, Clause(0, ["is_punct", Frozen(".", [123, Frozen(".", [125, "[]"])])], [], -1, "is_punct"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom_name", 1])], -1))
add("sys_proper_atom_name", 1, Clause(4, [Skeleton(".", [Place(1), Place(2)])], [Skeleton(Cache("sys_code_class"), [Place(1), Place(3)]), Skeleton(Cache("sys_name_class"), [Place(3)]), 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, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom_graphic", 1])], -1))
add("sys_proper_atom_graphic", 1, Clause(3, [Skeleton(".", [Place(1), Place(2)])], [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, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_codes", 3])], -1))
add("sys_escape_codes", 3, Clause(6, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_code_class"), [Place(0), Place(4)]), Skeleton(Cache("sys_escape_code"), [Place(4), Place(0), Place(2), Place(5)]), Skeleton(Cache("sys_escape_codes"), [Place(1), Place(5), Place(3)])], -1, "."))
add("sys_escape_codes", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_code", 4])], -1))
add("sys_escape_code", 4, Clause(5, ["is_cntrl", Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_is_escape"), [Place(4), Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Skeleton(".", [Place(4), Place(3)])])])], 0, "is_cntrl"))
add("sys_escape_code", 4, Clause(4, ["is_cntrl", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_code2"), [Place(1), Place(2), Place(3)])], 0, "is_cntrl"))
add("sys_escape_code", 4, Clause(4, ["is_solo", Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_is_meta"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Skeleton(".", [Place(1), Place(3)])])])], 0, "is_solo"))
add("sys_escape_code", 4, Clause(4, ["is_graphic", Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_is_meta"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Skeleton(".", [Place(1), Place(3)])])])], 0, "is_graphic"))
add("sys_escape_code", 4, Clause(4, ["is_invalid", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_code2"), [Place(1), Place(2), Place(3)])], 0, "is_invalid"))
add("sys_escape_code", 4, Clause(2, [NotImplemented, Place(0), Skeleton(".", [Place(0), Place(1)]), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_code2", 3])], -1))
add("sys_escape_code2", 3, Clause(8, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=<"), [Place(1), 511]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_integer"), [Place(4), 8, Place(1)]), Skeleton(Cache("atom_codes"), [Place(4), Place(5)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [92, Place(6)])]), Skeleton(Cache("sys_escape_codes2"), [Place(5), Place(6), Place(7)]), Skeleton(Cache("="), [Place(7), Skeleton(".", [92, Place(3)])])], 0, NotImplemented))
add("sys_escape_code2", 3, Clause(7, [Place(0), Place(1), Place(2)], [Skeleton(Cache("atom_integer"), [Place(3), 16, Place(0)]), Skeleton(Cache("atom_codes"), [Place(3), Place(4)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [92, Skeleton(".", [120, Place(5)])])]), Skeleton(Cache("sys_escape_codes2"), [Place(4), Place(5), Place(6)]), Skeleton(Cache("="), [Place(6), Skeleton(".", [92, Place(2)])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_codes2", 3])], -1))
add("sys_escape_codes2", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Skeleton(".", [Place(1), Place(5)])]), Skeleton(Cache("sys_escape_codes2"), [Place(2), Place(5), Place(4)])], 0, "."))
add("sys_escape_codes2", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_template", 3])], -1))
add("sys_print_template", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("atom_codes"), [Place(1), Place(3)]), Skeleton(Cache("sys_print_args"), [Place(2), Place(0), Place(3), "[]"])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_args", 4])], -1))
add("sys_print_args", 4, Clause(7, [Place(1), Place(2), Skeleton(".", [36, Skeleton(".", [36, Place(3)])]), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(5), Place(6)])]), Skeleton(Cache("write"), [Place(2), Place(5)]), Skeleton(Cache("sys_print_args"), [Place(6), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_print_args", 4, Clause(7, [Place(1), Place(2), Skeleton(".", [36, Place(3)]), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(5), Place(6)])]), Skeleton(Cache("sys_print_quote"), [Place(2), Place(5)]), Skeleton(Cache("sys_print_args"), [Place(6), Place(2), Place(3), Place(4)])], 0, NotImplemented))
add("sys_print_args", 4, Clause(9, [Place(1), Place(2), Skeleton(".", [Place(3), Place(4)]), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_text"), [Place(6), Place(4), Place(7)]), Skeleton(Cache("atom_codes"), [Place(8), Skeleton(".", [Place(3), Place(6)])]), Skeleton(Cache("put_atom"), [Place(2), Place(8)]), Skeleton(Cache("sys_print_args"), [Place(1), Place(2), Place(7), Place(5)])], 0, NotImplemented))
add("sys_print_args", 4, Clause(1, ["[]", NotImplemented, Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_text", 3])], -1))
add("sys_print_text", 3, Clause(5, [Skeleton(".", [Place(1), Place(2)]), Skeleton(".", [Place(1), Place(3)]), Place(4)], [Skeleton(Cache("\\=="), [Place(1), 36]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_print_text"), [Place(2), Place(3), Place(4)])], 0, "."))
add("sys_print_text", 3, Clause(1, ["[]", Place(0), Place(0)], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_quote", 2])], -1))
add("sys_print_quote", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("os_stream_flags"), [Place(1), Place(3)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("display_term"), [Place(1), Place(2), Frozen(".", [Frozen("numbervars", ["true"]), Frozen(".", [Frozen("quoted", ["true"]), "[]"])])])], 0, NotImplemented))
add("sys_print_quote", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("writeq"), [Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_numbervars_name", 2])], -1))
add("sys_numbervars_name", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("<"), [Place(1), 26]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(1), 65])]), Skeleton(Cache("char_code"), [Place(2), Place(3)])], 0, NotImplemented))
add("sys_numbervars_name", 2, Clause(6, [Place(0), Place(1)], [Skeleton(Cache("is"), [Place(2), Skeleton(Cache("+"), [Skeleton(Cache("rem"), [Place(0), 26]), 65])]), Skeleton(Cache("char_code"), [Place(3), Place(2)]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("+"), [Skeleton(Cache("//"), [Place(0), 26]), 1])]), Skeleton(Cache("atom_integer"), [Place(5), 10, Place(4)]), Skeleton(Cache("atom_concat"), [Place(3), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
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_exotic", "de", "Keine Exot."], [], -1, "syntax_error.illegal_exotic"))
add("strings", 3, Clause(0, ["syntax_error.illegal_date", "de", "Kein Datum."], [], -1, "syntax_error.illegal_date"))
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) $."], [], -1, "syntax_error.singleton_var"))
add("strings", 3, Clause(0, ["syntax_error.multiton_var", "de", "Mehrfache markierte Variable(n) $."], [], -1, "syntax_error.multiton_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, ["syntax_error.illegal_number", "", "Not a number."], [], -1, "syntax_error.illegal_number"))
add("strings", 3, Clause(0, ["syntax_error.illegal_exotic", "", "Not an exotic."], [], -1, "syntax_error.illegal_exotic"))
add("strings", 3, Clause(0, ["syntax_error.illegal_date", "", "Not a date."], [], -1, "syntax_error.illegal_date"))
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) $."], [], -1, "syntax_error.singleton_var"))
add("strings", 3, Clause(0, ["syntax_error.multiton_var", "", "Multiton marked variable(s) $."], [], -1, "syntax_error.multiton_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"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_term", 3])], -1))
add("write_term", 3, Clause(7, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_write_opts"), [Place(2), Frozen("h", ["[]", "[]", 0, 1200]), Skeleton("h", [Place(3), Place(4), Place(5), Place(6)])]), Skeleton(Cache("ir_object_set"), [Place(0), "last", -1]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, Place(6), 0]), Skeleton("v", [Place(0), Place(5), Place(3), Place(4)])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_priority", 3])], -1))
add("sys_write_priority", 3, Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("ir_is_site"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(1), Place(4)]), Skeleton(Cache("sys_write_priority"), [Place(4), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_var"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(4, [Place(1), Place(2), Place(3)], [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(1), Place(2), Place(3)], [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(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("reference"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_exotic"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(5, [Skeleton("$VAR", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_current_flags"), [Place(3), Place(4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(4), 8]), 0]), Skeleton(Cache("integer"), [Place(1)]), Skeleton(Cache(">="), [Place(1), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_numbervars"), [Place(1), Place(2), Place(3)])], 0, "$VAR"))
add("sys_write_priority", 3, Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_flags"), [Place(3), Place(4)]), 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(6, [Skeleton(".", [Place(1), Place(2)]), Skeleton("w", [NotImplemented, NotImplemented, Place(3)]), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(5)]), Skeleton(Cache("put_atom"), [Place(5), "["]), 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_atom"), [Place(5), "]"])], 0, "."))
add("sys_write_priority", 3, Clause(5, [Skeleton("{}", [Place(1)]), Skeleton("w", [NotImplemented, NotImplemented, Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(4)]), Skeleton(Cache("put_atom"), [Place(4), "{"]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 1200, Place(2)]), Place(3)]), Skeleton(Cache("put_atom"), [Place(4), "}"])], 0, "{}"))
add("sys_write_priority", 3, Clause(9, [Place(1), Place(2), Place(3)], [Skeleton(Cache("functor"), [Place(1), Place(4), 1]), Skeleton(Cache("sys_op"), [Place(4), Place(5), Place(6), Place(7), NotImplemented]), Skeleton(Cache("sys_is_prefix"), [Place(5), Place(8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_prefix"), [Place(1), Place(2), Place(3), Place(6), Place(7), Place(8)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(9, [Place(1), Place(2), Place(3)], [Skeleton(Cache("functor"), [Place(1), Place(4), 1]), Skeleton(Cache("sys_op"), [Place(4), Place(5), Place(6), Place(7), NotImplemented]), Skeleton(Cache("sys_is_postfix"), [Place(5), Place(8)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_postfix"), [Place(1), Place(2), Place(3), Place(6), Place(7), Place(8)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(10, [Place(1), Place(2), Place(3)], [Skeleton(Cache("functor"), [Place(1), Place(4), 2]), Skeleton(Cache("sys_op"), [Place(4), Place(5), Place(6), Place(7), NotImplemented]), Skeleton(Cache("sys_is_infix"), [Place(5), Place(8), Place(9)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_infix"), [Place(1), Place(2), Place(3), Place(6), Place(7), Place(8), Place(9)])], 0, NotImplemented))
add("sys_write_priority", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_write_compound"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_number", 3])], -1))
add("sys_write_number", 3, Clause(3, [math.inf, Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_exotic"), [math.inf, Place(1), Place(2)])], 0, math.inf))
add("sys_write_number", 3, Clause(4, [-math.inf, Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(3)]), Skeleton(Cache("put_atom"), [Place(3), "-"]), Skeleton(Cache("sys_put_exotic"), [math.inf, Place(1), Place(2)])], 0, -math.inf))
add("sys_write_number", 3, Clause(6, [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("atom_number"), [Place(3), Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(4)]), Skeleton(Cache("sys_safe_space"), [Place(4), Place(3), Place(1)]), Skeleton(Cache("sys_current_flags"), [Place(2), Place(5)]), Skeleton(Cache("sys_put_atom"), [Place(4), Place(3), Place(5)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_atom", 3])], -1))
add("sys_write_atom", 3, Clause(6, [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("sys_op"), [Place(1), Place(4), NotImplemented, NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_prefix"), [Place(4), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(5)]), Skeleton(Cache("sys_put_lparen"), [Place(5), 1, 0, 1200, Place(2), NotImplemented]), Skeleton(Cache("sys_write_ident"), [Place(1), 0, Place(3), NotImplemented]), Skeleton(Cache("put_atom"), [Place(5), ")"])], 0, NotImplemented))
add("sys_write_atom", 3, Clause(3, [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("sys_write_ident"), [Place(0), Place(1), Place(2), NotImplemented])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_exotic", 3])], -1))
add("sys_write_exotic", 3, Clause(3, [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("sys_put_exotic"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_numbervars", 3])], -1))
add("sys_write_numbervars", 3, Clause(6, [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("sys_numbervars_name"), [Place(0), Place(3)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(4)]), Skeleton(Cache("sys_safe_space"), [Place(4), Place(3), Place(1)]), Skeleton(Cache("sys_current_flags"), [Place(2), Place(5)]), Skeleton(Cache("sys_put_atom"), [Place(4), Place(3), Place(5)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_prefix", 6])], -1))
add("sys_write_prefix", 6, Clause(18, [Place(0), Skeleton("w", [Place(1), Place(2), Place(3)]), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(8), Skeleton(".", [Place(9), "[]"])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(10)]), Skeleton(Cache("sys_current_flags"), [Place(4), Place(11)]), Skeleton(Cache("sys_put_lparen"), [Place(10), Place(7), Place(2), Place(5), Place(1), Place(12)]), Skeleton(Cache("sys_put_adjust"), [Place(3), Place(11), Place(6), Place(13)]), Skeleton(Cache("sys_oper_minus"), [Place(8), Place(12), Place(14)]), Skeleton(Cache("sys_write_ident"), [Place(8), Place(12), Place(4), NotImplemented]), Skeleton(Cache("sys_put_rspace"), [Place(10), Place(6), Place(14), Place(15)]), Skeleton(Cache("is"), [Place(16), Skeleton(Cache("-"), [Place(5), Place(7)])]), Skeleton(Cache("is"), [Place(17), Skeleton(Cache("/\\"), [Place(15), Frozen(Cache("\\"), [8])])]), Skeleton(Cache("sys_write_priority"), [Place(9), Skeleton("w", [Place(17), Place(16), Place(13)]), Place(4)]), Skeleton(Cache("sys_put_rparen"), [Place(10), Place(7), Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_postfix", 6])], -1))
add("sys_write_postfix", 6, Clause(15, [Place(0), Skeleton("w", [Place(1), Place(2), Place(3)]), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(8), Skeleton(".", [Place(9), "[]"])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(10)]), Skeleton(Cache("sys_put_lparen"), [Place(10), 1, Place(2), Place(5), Place(1), Place(11)]), Skeleton(Cache("sys_oper_escape"), [Place(8), Place(11), Place(12)]), Skeleton(Cache("sys_oper_side"), [Place(7), Place(12), Place(13)]), Skeleton(Cache("is"), [Place(14), Skeleton(Cache("-"), [Place(5), Place(7)])]), Skeleton(Cache("sys_write_priority"), [Place(9), Skeleton("w", [Place(13), Place(14), Place(3)]), Place(4)]), Skeleton(Cache("sys_put_lspace"), [Place(10), Place(6)]), Skeleton(Cache("sys_write_oper"), [Place(8), Place(4), NotImplemented]), Skeleton(Cache("sys_put_rparen"), [Place(10), 1, Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_infix", 7])], -1))
add("sys_write_infix", 7, Clause(22, [Place(0), Skeleton("w", [Place(1), Place(2), Place(3)]), Place(4), Place(5), Place(6), Place(7), Place(8)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(9), Skeleton(".", [Place(10), Skeleton(".", [Place(11), "[]"])])])]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(12)]), Skeleton(Cache("sys_current_flags"), [Place(4), Place(13)]), Skeleton(Cache("sys_put_lparen"), [Place(12), Place(8), Place(2), Place(5), Place(1), Place(14)]), Skeleton(Cache("sys_put_indent"), [Place(12), Place(3), Place(13), Place(6), Place(8), Place(2), Place(5), Place(1), Place(15)]), Skeleton(Cache("sys_oper_escape"), [Place(9), Place(14), Place(16)]), Skeleton(Cache("sys_oper_side"), [Place(7), Place(16), Place(17)]), Skeleton(Cache("is"), [Place(18), Skeleton(Cache("-"), [Place(5), Place(7)])]), Skeleton(Cache("sys_write_priority"), [Place(10), Skeleton("w", [Place(17), Place(18), Place(15)]), Place(4)]), Skeleton(Cache("sys_put_lformat"), [Place(12), Place(15), Place(13), Place(6)]), Skeleton(Cache("sys_write_oper"), [Place(9), Place(4), Place(19)]), Skeleton(Cache("sys_put_rformat"), [Place(12), Place(15), Place(13), Place(6), Place(19), Place(14)]), Skeleton(Cache("is"), [Place(20), Skeleton(Cache("-"), [Place(5), Place(8)])]), Skeleton(Cache("is"), [Place(21), Skeleton(Cache("/\\"), [Place(14), Frozen(Cache("\\"), [14])])]), Skeleton(Cache("sys_write_priority"), [Place(11), Skeleton("w", [Place(21), Place(20), Place(15)]), Place(4)]), Skeleton(Cache("sys_put_rparen"), [Place(12), Place(8), Place(2), Place(5), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_oper", 3])], -1))
add("sys_write_oper", 3, Clause(3, [",", Place(1), ","], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), ","])], 0, ","))
add("sys_write_oper", 3, Clause(3, ["|", Place(1), "|"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), "|"])], 0, "|"))
add("sys_write_oper", 3, Clause(3, [".", Place(1), "."], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), "."])], 0, "."))
add("sys_write_oper", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_write_ident"), [Place(0), 0, Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_list", 3])], -1))
add("sys_write_list", 3, Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(4)]), Skeleton(Cache("put_atom"), [Place(4), "|"]), Skeleton(Cache("sys_write_priority"), [Place(1), Skeleton("w", [1, 999, Place(2)]), Place(3)])], 0, NotImplemented))
add("sys_write_list", 3, Clause(6, [Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(4), Place(5)]), Skeleton(Cache("put_atom"), [Place(5), ", "]), 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, ["[]", NotImplemented, NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0, "[]"))
add("sys_write_list", 3, Clause(4, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_stream"), [Place(2), Place(3)]), Skeleton(Cache("put_atom"), [Place(3), "|"]), Skeleton(Cache("sys_write_priority"), [Place(0), Skeleton("w", [1, 999, Place(1)]), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_compound", 3])], -1))
add("sys_write_compound", 3, Clause(8, [Place(0), Skeleton("w", [Place(1), NotImplemented, Place(2)]), Place(3)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(4), Skeleton(".", [Place(5), Place(6)])])]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(7)]), Skeleton(Cache("sys_put_symbol"), [Place(4), Place(1), Place(3)]), Skeleton(Cache("put_atom"), [Place(7), "("]), Skeleton(Cache("sys_write_priority"), [Place(5), Skeleton("w", [1, 999, Place(2)]), Place(3)]), Skeleton(Cache("sys_write_args"), [Place(6), Place(2), Place(3)]), Skeleton(Cache("put_atom"), [Place(7), ")"])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_symbol", 3])], -1))
add("sys_put_symbol", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("reference"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_exotic"), [Place(1), Place(2), Place(3)])], 0, NotImplemented))
add("sys_put_symbol", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_write_ident"), [Place(0), Place(1), Place(2), NotImplemented])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_args", 3])], -1))
add("sys_write_args", 3, Clause(5, [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_current_stream"), [Place(3), Place(4)]), 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, ["[]", NotImplemented, NotImplemented], [], -1, "[]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_var", 3])], -1))
add("sys_write_var", 3, Clause(6, [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("sys_current_names"), [Place(3), Place(4)]), Skeleton(Cache("sys_find_var"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_name"), [Place(5), Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_var", 3, Clause(5, [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("sys_current_anons"), [Place(3), Place(4)]), Skeleton(Cache("sys_find_sing"), [Place(1), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_name"), ["_", Place(2), Place(3)])], 0, NotImplemented))
add("sys_write_var", 3, Clause(8, [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("hash_code"), [Place(0), Place(3)]), Skeleton(Cache("atom_integer"), [Place(4), 10, Place(3)]), Skeleton(Cache("atom_concat"), ["_", Place(4), Place(5)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(6)]), Skeleton(Cache("sys_safe_space"), [Place(6), Place(5), Place(1)]), Skeleton(Cache("sys_current_flags"), [Place(2), Place(7)]), Skeleton(Cache("sys_put_atom"), [Place(6), Place(5), Place(7)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_var", 3])], -1))
add("sys_find_var", 3, Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("member"), [Skeleton("=", [Place(3), Place(4)]), Place(2)]), Skeleton(Cache("=="), [Place(1), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_sing", 2])], -1))
add("sys_find_sing", 2, Clause(4, [Place(1), Place(2)], [Skeleton(Cache("member"), [Place(3), Place(2)]), Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_name", 3])], -1))
add("sys_write_name", 3, Clause(6, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_flags"), [Place(2), Place(3)]), Skeleton(Cache("sys_var_quoted"), [Place(0), Place(3), Place(4)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(5)]), Skeleton(Cache("sys_safe_space"), [Place(5), Place(4), Place(1)]), Skeleton(Cache("sys_put_atom"), [Place(5), Place(4), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_var_quoted", 3])], -1))
add("sys_var_quoted", 3, Clause(6, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("atom_codes"), [Place(1), Place(4)]), Skeleton(Cache("\\+"), [Skeleton("sys_proper_var", [Place(4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_codes"), [Place(4), Place(5), Frozen(".", [96, "[]"])]), Skeleton(Cache("atom_codes"), [Place(3), Skeleton(".", [96, Place(5)])])], 0, NotImplemented))
add("sys_var_quoted", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_var", 1])], -1))
add("sys_proper_var", 1, Clause(3, [Skeleton(".", [Place(0), Place(1)])], [Skeleton(Cache("sys_code_class"), [Place(0), Place(2)]), Skeleton(Cache("sys_proper_var"), [Place(2), Skeleton(".", [Place(0), Place(1)])])], -1, "."))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_var", 2])], -1))
add("sys_proper_var", 2, Clause(1, ["is_upper", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_upper"))
add("sys_proper_var", 2, Clause(1, ["is_score", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1, "is_score"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_adjust", 4])], -1))
add("sys_put_adjust", 4, Clause(3, [Place(1), Place(2), NotImplemented, 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(1), NotImplemented, Place(2), Place(3)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 12]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(1), 3])])], 0, NotImplemented))
add("sys_put_adjust", 4, Clause(1, [Place(0), NotImplemented, NotImplemented, Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_indent", 9])], -1))
add("sys_put_indent", 9, Clause(3, [NotImplemented, Place(1), Place(2), NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(3, [NotImplemented, Place(1), NotImplemented, Place(2), NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(4, [NotImplemented, Place(1), NotImplemented, Place(2), NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(3)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 12]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("+"), [Place(1), 3])])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(8, [Place(1), Place(2), NotImplemented, NotImplemented, Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("sys_needs_paren"), [Place(3), Place(4), Place(5), Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("tab"), [Place(1), 2]), Skeleton(Cache("is"), [Place(7), Skeleton(Cache("+"), [Place(2), 3])])], 0, NotImplemented))
add("sys_put_indent", 9, Clause(1, [NotImplemented, Place(0), NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lparen", 6])], -1))
add("sys_put_lparen", 6, Clause(7, [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6)], [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, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lparen2", 3])], -1))
add("sys_put_lparen2", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " ("]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("\\/"), [Skeleton(Cache("/\\"), [Place(2), Frozen(Cache("\\"), [6])]), 1])])], 0, NotImplemented))
add("sys_put_lparen2", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("put_atom"), [Place(0), "("]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rparen", 5])], -1))
add("sys_put_rparen", 5, Clause(6, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("sys_needs_paren"), [Place(2), Place(3), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), ")"])], 0, NotImplemented))
add("sys_put_rparen", 5, Clause(0, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_needs_paren", 4])], -1))
add("sys_needs_paren", 4, Clause(3, [NotImplemented, Place(1), Place(2), NotImplemented], [Skeleton(Cache("<"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0, NotImplemented))
add("sys_needs_paren", 4, Clause(2, [0, Place(0), Place(0), Place(1)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(1), 8]), 0])], -1, 0))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lformat", 4])], -1))
add("sys_put_lformat", 4, Clause(4, [Place(1), NotImplemented, Place(2), Place(3)], [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(1), NotImplemented, NotImplemented, Place(2)], [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(3, [Place(0), Place(1), NotImplemented, NotImplemented], [Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(1), 3])]), Skeleton(Cache("nl"), [Place(0)]), Skeleton(Cache("tab"), [Place(0), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rformat", 6])], -1))
add("sys_put_rformat", 6, Clause(5, [Place(1), NotImplemented, Place(2), Place(3), NotImplemented, Place(4)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_rspace"), [Place(1), Place(3), Place(4), NotImplemented])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(4, [Place(1), NotImplemented, NotImplemented, Place(2), NotImplemented, Place(3)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_rspace"), [Place(1), Place(2), Place(3), NotImplemented])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(4, [Place(1), Place(2), NotImplemented, Place(3), NotImplemented, NotImplemented], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 12]), 8]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("nl"), [Place(1)]), Skeleton(Cache("tab"), [Place(1), Place(2)])], 0, NotImplemented))
add("sys_put_rformat", 6, Clause(4, [Place(0), NotImplemented, NotImplemented, NotImplemented, Place(1), NotImplemented], [Skeleton(Cache("atom_length"), [Place(1), Place(2)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("-"), [3, Place(2)])]), Skeleton(Cache("tab"), [Place(0), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lspace", 2])], -1))
add("sys_put_lspace", 2, Clause(3, [Place(1), Place(2)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0, NotImplemented))
add("sys_put_lspace", 2, Clause(0, [NotImplemented, NotImplemented], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rspace", 4])], -1))
add("sys_put_rspace", 4, Clause(5, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "]), Skeleton(Cache("is"), [Place(4), Skeleton(Cache("/\\"), [Place(3), Frozen(Cache("\\"), [6])])])], 0, NotImplemented))
add("sys_put_rspace", 4, Clause(2, [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("\\/"), [Place(0), 2])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_side", 3])], -1))
add("sys_oper_side", 3, Clause(3, [0, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 8])])], 0, 0))
add("sys_oper_side", 3, Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [8])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_minus", 3])], -1))
add("sys_oper_minus", 3, Clause(3, ["-", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 4])])], 0, "-"))
add("sys_oper_minus", 3, Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [4])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_escape", 3])], -1))
add("sys_oper_escape", 3, Clause(3, [",", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], 0, ","))
add("sys_oper_escape", 3, Clause(3, ["|", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], 0, "|"))
add("sys_oper_escape", 3, Clause(2, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [1])])])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_stream", 2])], -1))
add("sys_current_stream", 2, Clause(1, [Skeleton("v", [Place(0), NotImplemented, NotImplemented, NotImplemented]), Place(0)], [], -1, "v"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_flags", 2])], -1))
add("sys_current_flags", 2, Clause(1, [Skeleton("v", [NotImplemented, Place(0), NotImplemented, NotImplemented]), Place(0)], [], -1, "v"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_names", 2])], -1))
add("sys_current_names", 2, Clause(1, [Skeleton("v", [NotImplemented, NotImplemented, Place(0), NotImplemented]), Place(0)], [], -1, "v"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_anons", 2])], -1))
add("sys_current_anons", 2, Clause(1, [Skeleton("v", [NotImplemented, NotImplemented, NotImplemented, Place(0)]), Place(0)], [], -1, "v"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_ident", 4])], -1))
add("sys_write_ident", 4, Clause(6, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_flags"), [Place(2), Place(4)]), Skeleton(Cache("sys_atom_quoted"), [Place(0), Place(4), Place(3)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(5)]), Skeleton(Cache("sys_safe_space"), [Place(5), Place(3), Place(1)]), Skeleton(Cache("sys_put_atom"), [Place(5), Place(3), Place(4)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_quoted", 3])], -1))
add("sys_atom_quoted", 3, Clause(6, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("atom_codes"), [Place(1), Place(4)]), Skeleton(Cache("\\+"), [Skeleton("sys_proper_atom", [Place(4)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_escape_codes"), [Place(4), Place(5), Frozen(".", [39, "[]"])]), Skeleton(Cache("atom_codes"), [Place(3), Skeleton(".", [39, Place(5)])])], 0, NotImplemented))
add("sys_atom_quoted", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_exotic", 3])], -1))
add("sys_put_exotic", 3, Clause(7, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_flags"), [Place(2), Place(3)]), Skeleton(Cache("atom_exotic"), [Place(4), Place(0)]), Skeleton(Cache("sys_exotic_quoted"), [Place(4), Place(3), Place(5)]), Skeleton(Cache("sys_current_stream"), [Place(2), Place(6)]), Skeleton(Cache("sys_safe_space"), [Place(6), Place(5), Place(1)]), Skeleton(Cache("sys_put_atom"), [Place(6), Place(5), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_exotic_quoted", 3])], -1))
add("sys_exotic_quoted", 3, Clause(4, [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_concat"), ["0r", Place(1), Place(3)])], 0, NotImplemented))
add("sys_exotic_quoted", 3, Clause(1, [Place(0), NotImplemented, Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_term", 4])], -1))
add("sys_read_term", 4, Clause(9, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_read_opts"), [Place(2), Frozen("z", [1200, 0]), Skeleton("z", [Place(4), Place(5)])]), Skeleton(Cache("sys_next_token"), [Skeleton("t", ["-", Place(5), Skeleton("r", [Place(1), Place(0)]), Frozen("s", ["[]", "[]"])]), Place(6)]), Skeleton(Cache("sys_read_optional"), [Place(7), Place(4), Place(6), Skeleton("t", [NotImplemented, NotImplemented, NotImplemented, Place(8)])]), Skeleton(Cache("sys_read_results"), [Place(2), Place(8)]), Skeleton(Cache("="), [Place(3), Place(7)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_optional", 4])], -1))
add("sys_read_optional", 4, Clause(4, ["end_of_file", NotImplemented, Place(1), Place(2)], [Skeleton(Cache("sys_current_token"), ["end_of_file", Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(3), Place(2)])], 0, "end_of_file"))
add("sys_read_optional", 4, Clause(5, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_read_priority"), [Place(0), Place(1), Place(2), Place(4)]), Skeleton(Cache("sys_read_end_of_term"), [Place(4), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_end_of_term", 2])], -1))
add("sys_read_end_of_term", 2, Clause(5, [Place(1), Place(2)], [Skeleton(Cache("sys_current_options"), [Place(3), Place(1), Place(4)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 1]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_read_end"), ["end_of_file", Place(4), Place(2)])], 0, NotImplemented))
add("sys_read_end_of_term", 2, Clause(2, [Place(0), Place(1)], [Skeleton(Cache("sys_read_end"), [".", Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_priority", 4])], -1))
add("sys_read_priority", 4, Clause(11, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_token"), [Place(4), Place(2), Place(5)]), Skeleton(Cache("sys_read_factor"), [Place(4), Place(6), Place(1), Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_current_token"), [Place(9), Place(8), Place(10)]), Skeleton(Cache("sys_read_secondary"), [Place(9), Place(6), Place(0), Place(1), Place(7), Place(10), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_secondary", 7])], -1))
add("sys_read_secondary", 7, Clause(8, [Skeleton("atom", [Place(1)]), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("$CUT"), [Place(0)]), 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(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("="), [Place(1), ","]), Skeleton(Cache("$CUT"), [Place(0)]), 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(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("="), [Place(1), "|"]), Skeleton(Cache("$CUT"), [Place(0)]), 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, [NotImplemented, Place(0), Place(0), NotImplemented, NotImplemented, Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_infix", 7])], -1))
add("sys_read_infix", 7, Clause(20, [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("sys_op"), [Place(1), Place(8), Place(9), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_infix"), [Place(8), Place(10), Place(11)]), Skeleton(Cache(">="), [Place(4), Place(9)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(6), Place(12)]), Skeleton(make_defined([Clause(6, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("<"), [Skeleton(Cache("-"), [Place(1), Place(2)]), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["operator_clash"]), NotImplemented]), Place(4), Place(5)])], 0, NotImplemented), Clause(2, [NotImplemented, NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(9), Place(10), Place(5), Place(12), Place(13)]), Skeleton(Cache("is"), [Place(14), Skeleton(Cache("-"), [Place(9), Place(11)])]), Skeleton(Cache("sys_read_priority"), [Place(15), Place(14), Place(13), Place(16)]), Skeleton(Cache("=.."), [Place(17), Skeleton(".", [Place(1), Skeleton(".", [Place(2), Skeleton(".", [Place(15), "[]"])])])]), Skeleton(Cache("sys_current_token"), [Place(18), Place(16), Place(19)]), Skeleton(Cache("sys_read_secondary"), [Place(18), Place(17), Place(3), Place(4), Place(9), Place(19), Place(7)])], 0, NotImplemented))
add("sys_read_infix", 7, Clause(16, [Place(1), Place(2), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("sys_op"), [Place(1), Place(8), Place(9), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_postfix"), [Place(8), Place(10)]), Skeleton(Cache(">="), [Place(4), Place(9)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(6), Place(11)]), Skeleton(make_defined([Clause(6, [Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("<"), [Skeleton(Cache("-"), [Place(1), Place(2)]), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["operator_clash"]), NotImplemented]), Place(4), Place(5)])], 0, NotImplemented), Clause(2, [NotImplemented, NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(9), Place(10), Place(5), Place(11), Place(12)]), Skeleton(Cache("=.."), [Place(13), Skeleton(".", [Place(1), Skeleton(".", [Place(2), "[]"])])]), Skeleton(Cache("sys_current_token"), [Place(14), Place(12), Place(15)]), Skeleton(Cache("sys_read_secondary"), [Place(14), Place(13), Place(3), Place(4), Place(9), Place(15), Place(7)])], 0, NotImplemented))
add("sys_read_infix", 7, Clause(2, [NotImplemented, Place(0), Place(0), NotImplemented, NotImplemented, Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_lookup_var", 4])], -1))
add("sys_lookup_var", 4, Clause(7, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_current_vars"), [Place(5), Place(3), Place(6)]), Skeleton(Cache("member"), [Skeleton("=", [Place(1), Place(2)]), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_remove_anon"), [Place(1), Place(6), Place(4)])], 0, NotImplemented))
add("sys_lookup_var", 4, Clause(9, [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_vars"), [Place(4), Place(2), Place(5)]), Skeleton(Cache("sys_set_vars"), [Skeleton(".", [Skeleton("=", [Place(0), Place(1)]), Place(4)]), Place(5), Place(6)]), Skeleton(Cache("sys_current_sings"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_set_sings"), [Skeleton(".", [Skeleton("=", [Place(0), Place(1)]), Place(7)]), Place(8), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_remove_anon", 3])], -1))
add("sys_remove_anon", 3, Clause(7, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_sings"), [Place(4), Place(2), Place(5)]), Skeleton(Cache("select"), [Skeleton("=", [Place(1), NotImplemented]), Place(4), Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_set_sings"), [Place(6), Place(5), Place(3)])], 0, NotImplemented))
add("sys_remove_anon", 3, Clause(1, [NotImplemented, Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_token", 3])], -1))
add("sys_current_token", 3, Clause(4, [Place(0), Skeleton("t", [Place(0), Place(1), Place(2), Place(3)]), Skeleton("t", [Place(0), Place(1), Place(2), Place(3)])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_options", 3])], -1))
add("sys_current_options", 3, Clause(4, [Place(0), Skeleton("t", [Place(1), Place(0), Place(2), Place(3)]), Skeleton("t", [Place(1), Place(0), Place(2), Place(3)])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_reach_code", 3])], -1))
add("sys_reach_code", 3, Clause(5, [Place(0), Skeleton("t", [Place(1), Place(2), Skeleton("r", [Place(3), Place(0)]), Place(4)]), Skeleton("t", [Place(1), Place(2), Skeleton("r", [Place(3), Place(0)]), Place(4)])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_vars", 3])], -1))
add("sys_current_vars", 3, Clause(5, [Place(0), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(0), Place(4)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(0), Place(4)])])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_set_vars", 3])], -1))
add("sys_set_vars", 3, Clause(5, [Place(0), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [NotImplemented, Place(4)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(0), Place(4)])])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_sings", 3])], -1))
add("sys_current_sings", 3, Clause(5, [Place(0), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), Place(0)])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), Place(0)])])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_set_sings", 3])], -1))
add("sys_set_sings", 3, Clause(5, [Place(0), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), NotImplemented])]), Skeleton("t", [Place(1), Place(2), Place(3), Skeleton("s", [Place(4), Place(0)])])], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_factor", 6])], -1))
add("sys_read_factor", 6, Clause(10, [Skeleton("atom", [Place(1)]), Place(2), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_reach_code"), [Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_next_token"), [Place(8), Place(9)]), Skeleton(Cache("sys_read_atom"), [Place(7), Place(1), Place(2), Place(3), Place(4), Place(9), Place(6)])], 0, "atom"))
add("sys_read_factor", 6, Clause(3, ["anon", NotImplemented, NotImplemented, 0, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0, "anon"))
add("sys_read_factor", 6, Clause(6, [Skeleton("var", [Place(1)]), Place(2), NotImplemented, 0, Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_lookup_var"), [Place(1), Place(2), Place(3), Place(5)]), Skeleton(Cache("sys_next_token"), [Place(5), Place(4)])], 0, "var"))
add("sys_read_factor", 6, Clause(9, ["[", Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(6)]), Skeleton(Cache("sys_current_token"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_read_list"), [Place(7), Place(1), Place(2), Place(3), Place(8), Place(5)])], 0, "["))
add("sys_read_factor", 6, Clause(9, ["{", Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(6)]), Skeleton(Cache("sys_current_token"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_read_set"), [Place(7), Place(1), Place(2), Place(3), Place(8), Place(5)])], 0, "{"))
add("sys_read_factor", 6, Clause(7, ["(", Place(1), NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(4)]), Skeleton(Cache("sys_read_priority"), [Place(1), 1200, Place(4), Place(5)]), Skeleton(Cache("sys_read_end"), [")", Place(5), Place(6)]), Skeleton(Cache("sys_next_token"), [Place(6), Place(3)])], 0, "("))
add("sys_read_factor", 6, Clause(4, [Skeleton("const", [Place(1)]), Place(1), NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(3)])], 0, "const"))
add("sys_read_factor", 6, Clause(2, [NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["cannot_start_term"]), NotImplemented]), Place(0), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_atom", 7])], -1))
add("sys_read_atom", 7, Clause(13, [40, Place(1), Place(2), NotImplemented, 0, Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(5)]), Skeleton(Cache("sys_read_priority"), [Place(6), 999, Place(5), Place(7)]), Skeleton(Cache("sys_current_token"), [Place(8), Place(7), Place(9)]), Skeleton(Cache("sys_read_args"), [Place(8), Place(10), Place(9), Place(11)]), Skeleton(Cache("sys_read_end"), [")", Place(11), Place(12)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(1), Skeleton(".", [Place(6), Place(10)])])]), Skeleton(Cache("sys_next_token"), [Place(12), Place(4)])], 0, 40))
add("sys_read_atom", 7, Clause(11, [Place(1), "-", Place(2), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("sys_code_class"), [Place(1), "is_digit"]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_token"), [Place(7), Place(5), Place(8)]), Skeleton(Cache("sys_read_factor"), [Place(7), Place(9), Place(3), Place(4), Place(8), Place(10)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(9)])]), Skeleton(Cache("="), [Place(10), Place(6)])], 0, NotImplemented))
add("sys_read_atom", 7, Clause(12, [NotImplemented, Place(1), Place(2), Place(3), Place(4), Place(5), Place(6)], [Skeleton(Cache("sys_op"), [Place(1), Place(7), Place(8), NotImplemented, NotImplemented]), Skeleton(Cache("sys_is_prefix"), [Place(7), Place(9)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_token"), [Place(10), Place(5), Place(11)]), Skeleton(Cache("sys_read_prefix"), [Place(10), Place(2), Place(1), Place(3), Place(8), Place(9), Place(4), Place(11), Place(6)])], 0, NotImplemented))
add("sys_read_atom", 7, Clause(2, [NotImplemented, Place(0), Place(0), NotImplemented, 0, Place(1), Place(1)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_prefix", 9])], -1))
add("sys_read_prefix", 9, Clause(4, [",", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, ","))
add("sys_read_prefix", 9, Clause(4, ["|", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "|"))
add("sys_read_prefix", 9, Clause(4, [")", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, ")"))
add("sys_read_prefix", 9, Clause(4, ["]", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "]"))
add("sys_read_prefix", 9, Clause(4, ["}", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "}"))
add("sys_read_prefix", 9, Clause(4, [".", Place(1), Place(1), NotImplemented, NotImplemented, NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "."))
add("sys_read_prefix", 9, Clause(11, [NotImplemented, Place(0), Place(1), Place(2), Place(3), Place(4), Place(3), Place(5), Place(6)], [Skeleton(make_defined([Clause(5, [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("<"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["operator_clash"]), NotImplemented]), Place(3), Place(4)])], 0, NotImplemented), Clause(2, [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -1, NotImplemented)], 1), [Place(2), Place(3), Place(5), Place(7)]), Skeleton(Cache("is"), [Place(8), Skeleton(Cache("-"), [Place(3), Place(4)])]), Skeleton(Cache("sys_read_priority"), [Place(9), Place(8), Place(7), Place(10)]), Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(1), Skeleton(".", [Place(9), "[]"])])]), Skeleton(Cache("="), [Place(10), Place(6)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_args", 4])], -1))
add("sys_read_args", 4, Clause(9, [",", Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(5)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(5), Place(6)]), Skeleton(Cache("sys_current_token"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_read_args"), [Place(7), Place(2), Place(8), Place(4)])], 0, ","))
add("sys_read_args", 4, Clause(1, [NotImplemented, "[]", Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_list", 6])], -1))
add("sys_read_list", 6, Clause(9, ["]", Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_reach_code"), [Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_next_token"), [Place(7), Place(8)]), Skeleton(Cache("sys_read_atom"), [Place(6), "[]", Place(1), Place(2), Place(3), Place(8), Place(5)])], 0, "]"))
add("sys_read_list", 6, Clause(9, [NotImplemented, Skeleton(".", [Place(0), Place(1)]), NotImplemented, 0, Place(2), Place(3)], [Skeleton(Cache("sys_read_priority"), [Place(0), 999, Place(2), Place(4)]), Skeleton(Cache("sys_current_token"), [Place(5), Place(4), Place(6)]), Skeleton(Cache("sys_read_rest"), [Place(5), Place(1), Place(6), Place(7)]), Skeleton(Cache("sys_read_end"), ["]", Place(7), Place(8)]), Skeleton(Cache("sys_next_token"), [Place(8), Place(3)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_rest", 4])], -1))
add("sys_read_rest", 4, Clause(9, [",", Skeleton(".", [Place(1), Place(2)]), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(3), Place(5)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(5), Place(6)]), Skeleton(Cache("sys_current_token"), [Place(7), Place(6), Place(8)]), Skeleton(Cache("sys_read_rest"), [Place(7), Place(2), Place(8), Place(4)])], 0, ","))
add("sys_read_rest", 4, Clause(5, ["|", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(2), Place(4)]), Skeleton(Cache("sys_read_priority"), [Place(1), 999, Place(4), Place(3)])], 0, "|"))
add("sys_read_rest", 4, Clause(1, [NotImplemented, "[]", Place(0), Place(0)], [], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_set", 6])], -1))
add("sys_read_set", 6, Clause(9, ["}", Place(1), Place(2), Place(3), Place(4), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_reach_code"), [Place(6), Place(4), Place(7)]), Skeleton(Cache("sys_next_token"), [Place(7), Place(8)]), Skeleton(Cache("sys_read_atom"), [Place(6), "{}", Place(1), Place(2), Place(3), Place(8), Place(5)])], 0, "}"))
add("sys_read_set", 6, Clause(5, [NotImplemented, Skeleton("{}", [Place(0)]), NotImplemented, 0, Place(1), Place(2)], [Skeleton(Cache("sys_read_priority"), [Place(0), 1200, Place(1), Place(3)]), Skeleton(Cache("sys_read_end"), ["}", Place(3), Place(4)]), Skeleton(Cache("sys_next_token"), [Place(4), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_end", 3])], -1))
add("sys_read_end", 3, Clause(5, [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_current_token"), [Place(1), Place(2), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(4), Place(3)])], 0, NotImplemented))
add("sys_read_end", 3, Clause(3, [".", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["end_of_clause_expected"]), NotImplemented]), Place(1), Place(2)])], 0, "."))
add("sys_read_end", 3, Clause(3, ["end_of_file", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["end_of_clause_expected"]), NotImplemented]), Place(1), Place(2)])], 0, "end_of_file"))
add("sys_read_end", 3, Clause(3, [")", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["parenthesis_balance"]), NotImplemented]), Place(1), Place(2)])], 0, ")"))
add("sys_read_end", 3, Clause(3, ["}", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["brace_balance"]), NotImplemented]), Place(1), Place(2)])], 0, "}"))
add("sys_read_end", 3, Clause(2, ["]", Place(0), Place(1)], [Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["bracket_balance"]), NotImplemented]), Place(0), Place(1)])], -1, "]"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_next_token", 2])], -1))
add("sys_next_token", 2, Clause(8, [Skeleton("t", [NotImplemented, Place(0), Skeleton("r", [Place(1), Place(2)]), Place(3)]), Skeleton("t", [Place(4), Place(0), Skeleton("r", [Place(1), Place(5)]), Place(3)])], [Skeleton(Cache("sys_get_token"), [Place(6), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [NotImplemented, Place(5)])]), Skeleton(Cache("sys_trap"), [Skeleton("sys_convert_token", [Place(6), Place(4)]), Place(7), Skeleton("sys_sync_raise", [Place(7), Skeleton("t", [Place(6), Place(0), Skeleton("r", [Place(1), Place(5)]), Place(3)]), NotImplemented])])], -1, "t"))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_throw", 3])], -1))
add("sys_sync_throw", 3, Clause(3, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("sys_sync_raise"), [Place(0), Place(1), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_raise", 3])], -1))
add("sys_sync_raise", 3, Clause(6, [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_token"), [Place(3), Place(1), Place(4)]), Skeleton(Cache("sys_sync_tokens"), [Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_raise"), [Place(0)]), Skeleton(Cache("="), [Place(5), Place(2)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_tokens", 3])], -1))
add("sys_sync_tokens", 3, Clause(4, [Skeleton("single", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("member"), [-1, Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "single"))
add("sys_sync_tokens", 3, Clause(4, [Skeleton("codes", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("member"), [-1, Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "codes"))
add("sys_sync_tokens", 3, Clause(4, [Skeleton("back", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("member"), [-1, Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "back"))
add("sys_sync_tokens", 3, Clause(4, [Skeleton("code", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("member"), [-1, Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0, "code"))
add("sys_sync_tokens", 3, Clause(3, [".", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "."))
add("sys_sync_tokens", 3, Clause(3, ["end_of_file", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0, "end_of_file"))
add("sys_sync_tokens", 3, Clause(5, [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("sys_sync_token"), [Place(0), Place(2)]), Skeleton(Cache("sys_current_token"), [Place(3), Place(2), Place(4)]), Skeleton(Cache("sys_sync_tokens"), [Place(3), Place(4), Place(1)])], -1, NotImplemented))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_token", 2])], -1))
add("sys_sync_token", 2, Clause(6, [Skeleton("t", [NotImplemented, Place(0), Skeleton("r", [Place(1), Place(2)]), Place(3)]), Skeleton("t", [Place(4), Place(0), Skeleton("r", [Place(1), Place(5)]), Place(3)])], [Skeleton(Cache("sys_get_token"), [Place(4), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [NotImplemented, Place(5)])])], -1, "t"))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
add("strings", 3, Clause(0, ["existence_error.procedure", "de", "Prädikat $ undefiniert."], [], -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.unknown_host", "de", "Dienst nicht gefunden, Verzeichnisdienst aktivieren."], [], -1, "resource_error.unknown_host"))
add("strings", 3, Clause(0, ["resource_error.connect_failed", "de", "Verbindung zu Dienst fehlgeschlagen, Verbindungsfähigkeit sicherstellen."], [], -1, "resource_error.connect_failed"))
add("strings", 3, Clause(0, ["resource_error.illegal_method", "de", "Methode nicht zugelassen."], [], -1, "resource_error.illegal_method"))
add("strings", 3, Clause(0, ["resource_error.internal_error", "de", "Interner Fehler, Administrator kontaktieren."], [], -1, "resource_error.internal_error"))
add("strings", 3, Clause(0, ["resource_error.service_unavailable", "de", "Dienst nicht verfügbar, später wieder versuchen."], [], -1, "resource_error.service_unavailable"))
add("strings", 3, Clause(0, ["resource_error.state_error", "de", "Übergang nicht erlaubt."], [], -1, "resource_error.state_error"))
add("strings", 3, Clause(0, ["existence_error.procedure", "", "Undefined 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.unknown_host", "", "Service lookup failed, enable directory service."], [], -1, "resource_error.unknown_host"))
add("strings", 3, Clause(0, ["resource_error.connect_failed", "", "Service connect failed, assure connectivity."], [], -1, "resource_error.connect_failed"))
add("strings", 3, Clause(0, ["resource_error.illegal_method", "", "Method not allowed."], [], -1, "resource_error.illegal_method"))
add("strings", 3, Clause(0, ["resource_error.internal_error", "", "Internal error, contact administrator."], [], -1, "resource_error.internal_error"))
add("strings", 3, Clause(0, ["resource_error.service_unavailable", "", "Service unavailable, try again later."], [], -1, "resource_error.service_unavailable"))
add("strings", 3, Clause(0, ["resource_error.state_error", "", "Transition not permitted."], [], -1, "resource_error.state_error"))









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


def get_gc_enter():
    return gc_enter


def get_gc_time():
    return gc_time


def get_gc_maxinfs():
    return gc_maxinfs
