
from collections import OrderedDict

MASK_PRED_PREHASH = 0x00000010
MASK_PRED_ARITH = 0x00000008
MASK_PRED_SPECIAL = 0x00000004
MASK_PRED_TEST = 0x00000002
MASK_PRED_DYNAMIC = 0x00000001

MASK_TOUCH_PREHASH = 0x00000004
MASK_TOUCH_BOTTOM = 0x00000002
MASK_TOUCH_DYNAMIC = 0x00000001
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

MAX_INDEX = 2
ROPE_LOW = 24
ROPE_HIGH = 40

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)


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


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


def is_element(obj):
    return isinstance(obj, Element)


class Structure(Element):
    def __init__(self, functor, args):
        super().__init__(functor, 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 Place:
    def __init__(self, index):
        self.index = index


def is_place(obj):
    return isinstance(obj, Place)


class Skeleton(Element):
    def __init__(self, functor, args):
        super().__init__(functor, args)


def is_skeleton(obj):
    return isinstance(obj, Skeleton)



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


def copy_term(first):
    try:
        res = walk_copy(first)
    finally:
        walk_uncopy(first)
    return res


def walk_copy(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_compound(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_uncopy(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_compound(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)



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



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]



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, functor, head, body, cutvar):
        self.size = size
        self.functor = functor
        self.head = head
        self.body = body
        self.cutvar = cutvar
        self.creator = NotImplemented
        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 Stick:
    def __init__(self, rope, guards, maps):
        self.rope = rope
        self.guards = guards
        self.maps = maps


def is_stick(obj):
    return isinstance(obj, Stick)


def index_value(temp, body, flags):
    j = 0
    while True:
        if not is_place(temp):
            if (flags & MASK_PRED_PREHASH) != 0:
                if is_frozen(temp):
                    temp = temp.hash
                elif not is_skeleton(temp):
                    temp = object_hash_code(temp)
                else:
                    temp = NotImplemented
            else:
                if is_element(temp):
                    temp = temp.functor
            break
        if (temp is not NotImplemented and
                (flags & MASK_PRED_DYNAMIC) == 0 and
                j < len(body)):
            peek = body[j]
            j += 1
            if (is_element(peek) and
                    "=" == site_name(peek.functor) and
                    len(peek.args) == 2):
                if temp is peek.args[0]:
                    temp = peek.args[1]
                elif temp is peek.args[1]:
                    temp = peek.args[0]
                continue
            elif (is_element(peek) and
                  "nonvar" == site_name(peek.functor) and
                  len(peek.args) == 1):
                continue
        temp = NotImplemented
        break
    return temp


def site_name(obj):
    if is_cache(obj):
        return obj.name
    else:
        return obj



class Provable:
    def __init__(self):
        self.flags = 0
        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_peek(func):
    if is_stick(func):
        return snapshot_rope(func.rope)
    else:
        return snapshot_rope(func)


def snapshot_rope(rope):
    res = rope.cache
    if res is None:
        res = [NotImplemented] * rope.count
        copy_rope(res, rope)
        rope.cache = res
    return res


def copy_rope(res, rope):
    if isinstance(rope.data, list):
        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
    else:
        data = rope.data
        j = 0
        for clause in data.keys():
            if clause.remover is NotImplemented:
                res[j] = clause
                j += 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 resolve_link(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 check_nonvar(beta):
    if is_variable(beta):
        raise make_error("instantiation_error")



def ensure_touch(cache, arity, flags):
    peek = cache.link
    if peek is NotImplemented or peek.remover is not NotImplemented:
        peek = pred_touch(cache.name, arity, flags)
        cache.link = peek
    return peek


def pred_touch(functor, arity, flags):
    temp = kb.get(functor, NotImplemented)
    if temp is NotImplemented:
        temp = []
        kb[functor] = temp
    peek = (temp[arity] if arity < len(temp) else NotImplemented)
    if peek is NotImplemented or peek.remover is not NotImplemented:
        res = make_defined(VOID_ARGS)
        if peek is not NotImplemented:
            res.overlay = peek
        if (flags & MASK_TOUCH_DYNAMIC) != 0:
            res.flags |= MASK_PRED_DYNAMIC
        while arity >= len(temp):
            temp.append(NotImplemented)
        temp[arity] = res
        peek = res
    else:
        if not is_logical(peek.func) and not is_stick(peek.func):
            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_PREHASH) != 0:
        if (peek.flags & MASK_PRED_PREHASH) == 0:
            if is_stick(peek.func):
                peek.func = peek.func.rope
            peek.flags |= MASK_PRED_PREHASH
    return peek


def resolve_touch(functor, arity, flags):
    if is_cache(functor):
        return ensure_touch(functor, arity, flags)
    elif is_atom(functor):
        return pred_touch(functor, arity, flags)
    elif is_provable(functor):
        return functor
    else:
        check_nonvar(functor)
        functor = copy_term(functor)
        raise make_error(Compound("type_error",
                                  ["callable", functor]))



def make_defined(data):
    peek = Provable()
    peek.func = new_rope()
    i = 0
    while i < len(data):
        add_peek(peek.func, 0, data[i], MASK_TOUCH_BOTTOM, peek.flags)
        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 new_bouquet(rope, width):
    guards = [NotImplemented] * width
    maps = [NotImplemented] * width
    return Stick(rope, guards, maps)


def extend_bouquet(peek, j, offset, rope, flags):
    peek.guards[j] = new_rope()
    peek.maps[j] = {}
    if isinstance(rope.data, list):
        data = rope.data
        i = 0
        while i < len(data):
            clause = data[i]
            if clause.remover is NotImplemented:
                add_map(peek, j, offset, clause, MASK_TOUCH_BOTTOM, flags)
            i += 1
    else:
        data = rope.data
        for clause in data.keys():
            if clause.remover is NotImplemented:
                add_map(peek, j, offset, clause, MASK_TOUCH_BOTTOM, flags)



def defined_pred(peek, args):
    width = min(MAX_INDEX, len(args))
    offset = 0
    func = peek.func
    flags = peek.flags
    val = None
    k = 0
    while True:
        if is_stick(func):
            rope = func.rope
        else:
            rope = func
        if rope.count < 2:
            return rope
        i = 0
        while i < width:
            key = key_value(args[i+offset], flags)
            if key is NotImplemented:
                i += 1
                continue
            if not is_stick(func):
                func = new_bouquet(rope, width)
                if is_stick(peek):
                    if val is NotImplemented:
                        peek.guards[k] = func
                    else:
                        peek.maps[k][val] = func
                else:
                    peek.func = func
            peek = func
            if peek.maps[i] is NotImplemented:
                extend_bouquet(peek, i, offset, rope, flags)
            if len(peek.maps[i]) == 0:
                i += 1
                continue
            key = sanitize_key(key)
            func = peek.maps[i].get(key, NotImplemented)
            if func is NotImplemented:
                func = peek.guards[i]
                val = NotImplemented
            else:
                val = key
            k = i
            width = width-i-1
            offset = i+offset+1
            i = -1
            break
        if not i < width:
            return rope


def key_value(term, flags):
    term = deref(term)
    if not is_variable(term):
        if (flags & MASK_PRED_PREHASH) != 0:
            if is_frozen(term):
                term = term.hash
            elif not is_compound(term):
                term = object_hash_code(term)
            else:
                term = NotImplemented
        else:
            if is_structure(term):
                term = term.functor
    else:
        term = NotImplemented
    return term





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.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.func) or is_stick(peek.func):
                rollback_peek(peek.func, True)
            i += 1
        if trim_arities(temp):
            del kb[functor]


def rollback_peek(peek, update):
    if is_stick(peek):
        if not has_action(peek.rope):
            return
        i = 0
        while i < len(peek.maps):
            temp = peek.maps[i]
            if temp is NotImplemented:
                i += 1
                continue
            for key, val in list(temp.items()):
                rollback_peek(val, False)
                if size_peek(val) == 0:
                    del temp[key]
            rollback_peek(peek.guards[i], False)
            i += 1
        rollback_rope(peek.rope, update)
    else:
        if not has_action(peek):
            return
        rollback_rope(peek, update)


def size_peek(func):
    if is_stick(func):
        rope = func.rope
    else:
        rope = func
    if isinstance(rope.data, list):
        return len(rope.data)
    else:
        return len(rope.data)


def has_action(rope):
    if isinstance(rope.data, list):
        data = rope.data
        i = 0
        while i < len(data):
            clause = data[i]
            if clause.creator == stage:
                return True
            if clause.remover == stage:
                return True
            i += 1
        return False
    else:
        data = rope.data
        for clause in data.keys():
            if clause.creator == stage:
                return True
            if clause.remover == stage:
                return True
        return False


def rollback_rope(rope, update):
    if isinstance(rope.data, list):
        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
    else:
        data = rope.data
        for clause in list(data.keys()):
            if clause.creator == stage:
                rope.count -= 1
                del data[clause]
            else:
                if clause.remover == stage:
                    if update:
                        clause.remover = NotImplemented
                    rope.count += 1
        rope.cache = None



def set(functor, arity, pred):
    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:
        if peek is not NotImplemented:
            pred.overlay = peek
        while arity >= len(temp):
            temp.append(NotImplemented)
        temp[arity] = pred
    else:
        raise make_error(Compound("permission_error",
            ["coerce", "procedure", make_indicator(functor, arity)]))



def add(clause):
    add_clause(clause, MASK_TOUCH_BOTTOM)


def add_clause(clause, flags):
    if clause.remover is not NotImplemented:
        raise make_error(Compound("permission_error",
            ["modify", "static_procedure",
               make_indicator(clause.functor, len(clause.head))]))
    if clause.creator is not NotImplemented:
        return
    peek = resolve_touch(clause.functor, len(clause.head), flags)
    add_peek(peek.func, 0, clause, flags, peek.flags)
    clause.creator = stage
    if (flags & MASK_TOUCH_DYNAMIC) == 0:
        clause.shard = engine.partition


def add_peek(peek, offset, clause, flags, flags2):
    if is_stick(peek):
        add_rope(peek.rope, clause, flags)
        i = 0
        while i < len(peek.maps):
            if peek.maps[i] is not NotImplemented:
                add_map(peek, i, offset, clause, flags, flags2)
            i += 1
    else:
        add_rope(peek, clause, flags)


def add_map(peek, i, offset, clause, flags, flags2):
    key = index_value(clause.head[i+offset], clause.body, flags2)
    temp = peek.maps[i]
    if key is NotImplemented:
        for key, val in temp.items():
            add_peek(val, i+offset+1, clause, flags, flags2)
        add_peek(peek.guards[i], i+offset+1, clause, flags, flags2)
    else:
        key = sanitize_key(key)
        val = temp.get(key, NotImplemented)
        if val is NotImplemented:
            val = clone_peek(peek.guards[i])
            temp[key] = val
        add_peek(val, i+offset+1, clause, flags, flags2)


def add_rope(rope, clause, flags):
    if isinstance(rope.data, list):
        data = rope.data
        if (flags & MASK_TOUCH_BOTTOM) != 0:
            data.append(clause)
        else:
            data.insert(0, clause)
        if len(data) >= ROPE_HIGH:
            rope.data = OrderedDict.fromkeys(data, True)
        rope.count += 1
        rope.cache = None
    else:
        data = rope.data
        if (flags & MASK_TOUCH_BOTTOM) != 0:
            data[clause] = True
        else:
            data[clause] = True
            data.move_to_end(clause, last=False)
        rope.count += 1
        rope.cache = None


def clone_peek(func):
    if is_stick(func):
        rope = func.rope
    else:
        rope = func
    if isinstance(rope.data, list):
        return Logical(rope.cache, rope.count, list(rope.data))
    else:
        return Logical(rope.cache, rope.count, OrderedDict(rope.data))



def remove_clause(clause, flags):
    if clause.remover is not NotImplemented:
        return False
    if clause.creator is NotImplemented:
        return False
    peek = resolve_link(clause.functor, len(clause.head))
    if peek is NotImplemented:
        return False
    if not is_logical(peek.func) and not is_stick(peek.func):
        raise make_error(Compound("permission_error",
              ["modify", "static_procedure",
                    make_indicator(clause.functor, len(clause.head))]))
    remove_peek(peek.func, 0, clause, flags, peek.flags)
    if clause.creator != stage:
        clause.remover = stage
    else:
        clause.creator = NotImplemented
    return True


def remove_peek(peek, offset, clause, flags, flags2):
    if is_stick(peek):
        remove_rope(peek.rope, clause, flags)
        i = 0
        while i < len(peek.maps):
            temp = peek.maps[i]
            if temp is NotImplemented:
                i += 1
                continue
            key = index_value(clause.head[i+offset], clause.body, flags2)
            if key is NotImplemented:
                for key, val in list(temp.items()):
                    remove_peek(val, i+offset+1, clause, flags, flags2)
                    if size_peek(val) == 0:
                        del temp[key]
                remove_peek(peek.guards[i], i+offset+1, clause, flags, flags2)
            else:
                key = sanitize_key(key)
                val = temp.get(key)
                remove_peek(val, i+offset+1, clause, flags, flags2)
                if size_peek(val) == 0:
                    del temp[key]
            i += 1
    else:
        remove_rope(peek, clause, flags)


def remove_rope(rope, clause, flags):
    if isinstance(rope.data, list):
        data = rope.data
        if (flags & MASK_REMOVE_REVERSE) == 0:
            index = array_index(data, clause)
        else:
            index = array_last_index(data, clause)
        if clause.creator == stage:
            if index == -1:
                raise Exception("rope corrupted")
            del data[index]
        else:
            if index == -1:
                raise Exception("rope corrupted")
        rope.count -= 1
        rope.cache = None
    else:
        data = rope.data
        if clause.creator == stage:
            if data.pop(clause, NotImplemented) is NotImplemented:
                raise Exception("rope corrupted")
        else:
            if not clause in data:
                raise Exception("rope corrupted")
        if len(data) < ROPE_LOW:
            rope.data = list(data.keys())
        rope.count -= 1
        rope.cache = None


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
import struct
import math
import numbers

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.func) and
           not is_stick(temp.func))):
        return "[]"
    data = snapshot_peek(temp.func)
    back = None
    res = None
    i = 0
    while i < len(data):
        clause = data[i]
        if clause.size != 0:
            display = [NotImplemented] * clause.size
        else:
            display = None
        elem = exec_frame(clause.functor, clause.head, display)
        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 exec_frame(functor, head, display):
    global temp_display
    if len(head) > 0:
        temp_display = display
        args = [NotImplemented] * len(head)
        i = 0
        while i < len(args):
            args[i] = exec_build(head[i])
            i += 1
        temp_display = None
        return Compound(functor, args)
    else:
        return functor


def make_indicator(functor, arity):
    if is_cache(functor):
        functor = functor.name
    return Compound("/", [functor, arity])



class Frozen(Structure):
    def __init__(self, functor, args):
        super().__init__(functor, args)
        self.hash = object_hash_code(functor)
        i = 0
        while i < len(args):
            obj = args[i]
            if is_frozen(obj):
                self.hash = int32(self.hash*31 + obj.hash)
            else:
                self.hash = int32(self.hash*31 + object_hash_code(obj))
            i += 1


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


def object_hash_code(alpha):
    if 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 if sign > 0 else -res
        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



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_pred(peek, goal)
                    found = solve2_rope(goal, snapshot_rope(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_element(goal):
        functor = goal.functor
        arity = len(goal.args)
    else:
        functor = goal
        arity = 0
    return resolve_link(functor, arity)


def lookup_eval(expr):
    if is_element(expr):
        functor = expr.functor
        arity = len(expr.args)
    else:
        functor = expr
        arity = 0
    return resolve_link(functor, arity + 1)


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



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 isinstance(obj, numbers.Number) and not isinstance(obj, bool)


def is_integer(obj):
    return isinstance(obj, int) and not isinstance(obj, bool)


def is_float(obj):
    return isinstance(obj, float)


def is_special(alpha):
    return (isinstance(alpha, float) and
            not math.isfinite(alpha))



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 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_element(template):
        template = template.args
    else:
        template = VOID_ARGS
    return peek.func(template)


def exec_test(template):
    global gc_enter
    peek = lookup_pred(template)
    if peek is NotImplemented or (peek.flags & MASK_PRED_TEST) == 0:
        return exec_build(template)
    else:
        if is_element(template):
            template = template.args
        else:
            template = VOID_ARGS
        gc_enter += 1
        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
        goal = Compound(".", [goal, NotImplemented])
        if back is None:
            res = goal
        else:
            back.args[1] = goal
        back = goal
        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
                    (math.isnan(beta) if math.isnan(alpha) else alpha == beta))
        elif is_float(beta):
            return False
        else:
            return alpha == beta
    elif is_atom(beta) or is_number(beta):
        return False
    else:
        return alpha is beta



def unify(first, second):
    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 is not second:
                    if (is_frozen(first) and is_frozen(second) and
                            first.hash != second.hash):
                        break
                    if first.functor != second.functor:
                        break
                    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):
    while is_structure(obj.functor):
        obj = obj.functor
    return obj


def union_add(log, vfrom, to):
    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
    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



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],
    [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, 25],
    [1, 1, 1, 1, 1, 1, 1, 2],
    [2, 2, 2, 2, 2, 2, 2, 2],
    [2, 2, 2, 2, 2, 2, 2, 25],
    [1, 2, 1, 2, 1, 2, 1, 2],
    [2, 1, 2, 1, 2, 1, 2, 1],
    [2, 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, 2, 1, 2],
    [2, 1, 3, 2, 1, 2, 1, 1],
    [1, 2, 1, 2, 2, 2, 2, 2],
    [2, 2, 1, 1, 2, 1, 1, 2],
    [2, 1, 2, 1, 1, 1, 1, 2],
    [2, 2, 2, 2, 5, 5, 2, 2],
    [4, 4, 4, 4, 4, 4, 4, 4],
    [4, 4, 27, 27, 27, 27, 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],
    [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, 0, 1, 1, 1, 1, 1],
    [1, 1, 1, 1, 2, 2, 2, 2],
    [2, 2, 2, 2, 2, 2, 2, 1],
    [2, 2, 1, 1, 1, 2, 2, 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, 0],
    [0, 4, 24, 24, 24, 24, 24, 24],
    [2, 24, 20, 0, 0, 28, 28, 26],
    [0, 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, 0, 0, 0, 0, 5],
    [5, 5, 5, 24, 24, 0, 0, 0],
    [16, 16, 16, 16, 16, 16, 25, 25],
    [25, 24, 24, 26, 24, 24, 28, 28],
    [6, 6, 6, 24, 16, 24, 24, 24],
    [4, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 6, 6, 6, 6, 6],
    [297, 329, 24, 24, 24, 24, 5, 5],
    [6, 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],
    [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],
    [6, 6, 6, 0, 0, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 6, 6],
    [6, 5, 0, 0, 0, 0, 0, 0],
    [297, 329, 5, 5, 5, 5, 5, 5],
    [6, 6, 6, 6, 4, 4, 28, 24],
    [24, 24, 4, 0, 0, 6, 26, 26],
    [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, 0],
    [5, 6, 6, 6, 0, 0, 24, 0],
    [5, 5, 5, 0, 0, 0, 0, 0],
    [27, 5, 5, 5, 5, 5, 5, 5],
    [16, 16, 0, 0, 0, 0, 0, 6],
    [5, 4, 6, 6, 6, 6, 6, 6],
    [6, 6, 16, 6, 6, 6, 6, 6],
    [6, 6, 6, 8, 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, 6, 6, 24, 24, 41, 73],
    [105, 137, 169, 201, 233, 265, 297, 329],
    [24, 4, 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, 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],
    [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, 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],
    [6, 6, 5, 5, 5, 6, 24, 0],
    [5, 5, 5, 5, 5, 5, 0, 5],
    [5, 5, 0, 5, 5, 5, 5, 5],
    [5, 0, 5, 5, 0, 5, 5, 5],
    [8, 6, 6, 6, 6, 6, 0, 6],
    [6, 8, 0, 8, 8, 6, 0, 0],
    [5, 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, 0, 0, 6, 5, 8, 6],
    [8, 0, 0, 8, 8, 6, 0, 0],
    [0, 0, 0, 0, 0, 6, 6, 8],
    [28, 5, 11, 11, 11, 11, 11, 11],
    [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, 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],
    [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, 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, 5, 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, 0, 5, 5, 5],
    [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, 5, 5, 5, 0],
    [0, 5, 5, 8, 0, 0, 0, 0],
    [6, 6, 8, 8, 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],
    [5, 5, 5, 5, 5, 5, 5, 0],
    [0, 0, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 0, 5, 0, 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, 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],
    [297, 329, 24, 24, 0, 0, 0, 0],
    [5, 5, 5, 0, 5, 5, 5, 5],
    [5, 5, 5, 5, 0, 5, 0, 5],
    [6, 6, 6, 6, 6, 5, 0, 0],
    [5, 5, 5, 5, 5, 0, 4, 0],
    [6, 6, 6, 6, 6, 6, 6, 0],
    [297, 329, 0, 0, 5, 5, 5, 5],
    [5, 28, 28, 28, 24, 24, 24, 24],
    [24, 24, 24, 28, 24, 28, 28, 28],
    [6, 6, 28, 28, 28, 28, 28, 28],
    [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, 0, 0, 0],
    [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, 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, 8, 8, 6, 6, 6],
    [6, 8, 6, 6, 6, 6, 6, 6],
    [8, 6, 6, 8, 8, 6, 6, 5],
    [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, 6, 8, 8, 6, 6, 8],
    [8, 8, 8, 8, 8, 6, 5, 8],
    [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, 24, 4, 2, 2, 2],
    [5, 5, 5, 0, 0, 6, 6, 6],
    [24, 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, 28, 24, 5],
    [12, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 21, 22, 0, 0, 0],
    [5, 5, 5, 24, 24, 24, 10, 10],
    [10, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 6, 6, 6, 8, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 5],
    [5, 5, 6, 6, 8, 24, 24, 0],
    [5, 5, 6, 6, 0, 0, 0, 0],
    [5, 0, 6, 6, 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],
    [6, 6, 6, 6, 24, 24, 24, 4],
    [24, 24, 24, 26, 5, 6, 0, 0],
    [297, 329, 0, 0, 0, 0, 0, 0],
    [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, 6, 6, 5],
    [5, 6, 5, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 5, 5, 0, 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],
    [5, 5, 5, 5, 0, 0, 0, 0],
    [5, 5, 0, 0, 0, 0, 0, 0],
    [297, 329, 11, 0, 0, 0, 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, 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, 7, 6],
    [6, 6, 6, 6, 6, 6, 0, 0],
    [6, 6, 6, 6, 0, 0, 0, 0],
    [6, 6, 6, 6, 8, 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, 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],
    [297, 329, 0, 0, 0, 5, 5, 5],
    [4, 4, 4, 4, 4, 4, 24, 24],
    [2, 1, 2, 0, 0, 0, 0, 0],
    [1, 1, 1, 0, 0, 1, 1, 1],
    [6, 6, 6, 24, 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, 4, 4, 4, 4],
    [4, 4, 4, 2, 2, 2, 2, 2],
    [4, 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],
    [0, 1, 0, 1, 0, 1, 0, 1],
    [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],
    [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],
    [13, 14, 16, 16, 16, 16, 16, 12],
    [24, 29, 30, 24, 24, 24, 24, 23],
    [23, 24, 24, 24, 25, 21, 22, 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, 25, 25, 25, 21, 22, 0],
    [4, 4, 4, 4, 4, 0, 0, 0],
    [26, 26, 26, 26, 26, 26, 26, 26],
    [26, 26, 0, 0, 0, 0, 0, 0],
    [6, 6, 6, 6, 6, 7, 7, 7],
    [7, 6, 7, 7, 7, 6, 6, 6],
    [6, 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],
    [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, 25, 25],
    [28, 28, 25, 28, 25, 28, 28, 28],
    [28, 28, 28, 28, 25, 25, 25, 25],
    [25, 25, 25, 25, 25, 25, 25, 25],
    [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, 25, 28, 28, 28],
    [28, 28, 28, 25, 25, 25, 25, 25],
    [25, 25, 25, 25, 28, 28, 28, 28],
    [28, 28, 28, 0, 0, 0, 0, 0],
    [11, 11, 11, 11, 28, 28, 28, 28],
    [28, 28, 11, 11, 11, 11, 11, 11],
    [28, 28, 28, 28, 28, 28, 28, 25],
    [28, 25, 28, 28, 28, 28, 28, 28],
    [21, 22, 21, 22, 21, 22, 21, 22],
    [21, 22, 21, 22, 21, 22, 11, 11],
    [25, 25, 25, 25, 25, 21, 22, 25],
    [25, 25, 25, 25, 25, 25, 21, 22],
    [25, 25, 25, 21, 22, 21, 22, 21],
    [22, 21, 22, 21, 22, 21, 22, 21],
    [22, 25, 25, 25, 25, 25, 25, 25],
    [21, 22, 21, 22, 25, 25, 25, 25],
    [25, 25, 25, 25, 21, 22, 25, 25],
    [25, 25, 25, 25, 25, 28, 28, 25],
    [28, 28, 28, 28, 0, 0, 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],
    [0, 0, 0, 0, 0, 0, 0, 4],
    [24, 0, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 6],
    [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, 20, 20, 24, 24, 24, 24],
    [20, 24, 21, 24, 24, 24, 24, 24],
    [28, 28, 24, 24, 24, 21, 22, 21],
    [22, 21, 22, 21, 22, 20, 0, 0],
    [28, 28, 0, 28, 28, 28, 28, 28],
    [28, 28, 28, 28, 0, 0, 0, 0],
    [28, 28, 28, 28, 28, 28, 0, 0],
    [12, 24, 24, 24, 28, 4, 5, 10],
    [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],
    [0, 6, 6, 27, 27, 4, 4, 5],
    [5, 5, 5, 24, 4, 4, 4, 5],
    [0, 0, 0, 0, 0, 5, 5, 5],
    [28, 28, 11, 11, 11, 11, 28, 28],
    [0, 0, 0, 0, 0, 0, 0, 28],
    [28, 28, 28, 28, 28, 28, 28, 0],
    [11, 11, 28, 28, 28, 28, 28, 28],
    [28, 11, 11, 11, 11, 11, 11, 11],
    [5, 5, 5, 5, 5, 4, 5, 5],
    [5, 5, 5, 5, 4, 24, 24, 24],
    [297, 329, 5, 5, 0, 0, 0, 0],
    [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, 4, 4, 6, 6],
    [5, 5, 5, 5, 5, 5, 10, 10],
    [6, 6, 24, 24, 24, 24, 24, 24],
    [27, 27, 27, 27, 27, 27, 27, 4],
    [27, 27, 1, 2, 1, 2, 1, 2],
    [2, 1, 2, 1, 2, 1, 1, 2],
    [4, 27, 27, 1, 2, 1, 2, 5],
    [1, 2, 1, 2, 2, 2, 1, 2],
    [1, 2, 1, 1, 1, 1, 1, 2],
    [1, 1, 1, 1, 1, 2, 1, 2],
    [1, 2, 1, 2, 1, 1, 1, 1],
    [2, 1, 2, 1, 1, 2, 1, 2],
    [1, 2, 1, 2, 1, 0, 0, 0],
    [0, 4, 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],
    [8, 8, 5, 5, 5, 5, 5, 5],
    [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],
    [6, 6, 6, 6, 6, 6, 24, 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],
    [297, 329, 0, 0, 0, 0, 24, 24],
    [5, 5, 5, 5, 5, 6, 4, 5],
    [297, 329, 5, 5, 5, 5, 5, 0],
    [5, 6, 6, 6, 6, 6, 6, 8],
    [8, 6, 6, 8, 8, 6, 6, 0],
    [5, 5, 5, 5, 6, 8, 0, 0],
    [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],
    [0, 0, 0, 5, 5, 4, 24, 24],
    [5, 5, 5, 8, 6, 6, 8, 8],
    [24, 24, 5, 4, 4, 8, 6, 0],
    [0, 5, 5, 5, 5, 5, 5, 0],
    [2, 2, 2, 27, 4, 4, 4, 4],
    [2, 4, 27, 27, 0, 0, 0, 0],
    [5, 5, 5, 8, 8, 6, 8, 8],
    [6, 8, 8, 24, 8, 6, 0, 0],
    [0, 0, 0, 5, 5, 5, 5, 5],
    [19, 19, 19, 19, 19, 19, 19, 19],
    [18, 18, 18, 18, 18, 18, 18, 18],
    [2, 2, 2, 2, 2, 2, 2, 0],
    [0, 0, 0, 2, 2, 2, 2, 2],
    [0, 0, 0, 0, 0, 5, 6, 5],
    [5, 25, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 0, 5, 0],
    [5, 5, 0, 5, 5, 0, 5, 5],
    [5, 5, 27, 27, 27, 27, 27, 27],
    [27, 27, 27, 28, 28, 28, 28, 28],
    [28, 28, 28, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 5, 22, 21],
    [28, 28, 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, 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, 0, 16],
    [0, 24, 24, 24, 26, 24, 24, 24],
    [1090, 1122, 1154, 21, 25, 22, 25, 21],
    [22, 24, 21, 22, 24, 24, 5, 5],
    [5, 5, 5, 5, 5, 5, 4, 4],
    [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, 16, 16, 16, 28, 28, 0, 0],
    [5, 5, 5, 0, 5, 5, 0, 5],
    [24, 24, 24, 0, 0, 0, 0, 11],
    [11, 11, 11, 11, 0, 0, 0, 28],
    [10, 10, 10, 10, 10, 11, 11, 11],
    [11, 28, 28, 28, 28, 28, 28, 28],
    [28, 28, 11, 11, 28, 28, 28, 0],
    [28, 28, 28, 28, 28, 0, 0, 0],
    [28, 0, 0, 0, 0, 0, 0, 0],
    [28, 28, 28, 28, 28, 6, 0, 0],
    [6, 11, 11, 11, 11, 11, 11, 11],
    [11, 11, 11, 11, 0, 0, 0, 0],
    [5, 10, 5, 5, 5, 5, 5, 5],
    [5, 5, 10, 0, 0, 0, 0, 0],
    [6, 6, 6, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 5, 5, 0, 24],
    [24, 10, 10, 10, 10, 10, 0, 0],
    [1, 1, 1, 1, 0, 0, 0, 0],
    [2, 2, 2, 2, 0, 0, 0, 0],
    [1, 1, 1, 0, 1, 1, 1, 1],
    [1, 1, 1, 0, 1, 1, 0, 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, 0, 4, 4, 4, 4, 4, 4],
    [4, 4, 4, 0, 0, 0, 0, 0],
    [5, 0, 0, 0, 5, 0, 0, 5],
    [5, 5, 5, 5, 5, 5, 5, 28],
    [0, 0, 0, 0, 0, 0, 0, 11],
    [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, 0, 0, 0, 0, 0, 24],
    [0, 0, 0, 0, 11, 11, 5, 5],
    [0, 0, 11, 11, 11, 11, 11, 11],
    [5, 6, 6, 6, 0, 6, 6, 0],
    [0, 0, 0, 0, 6, 6, 6, 6],
    [6, 6, 6, 0, 0, 0, 0, 6],
    [11, 0, 0, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 5, 11, 11, 24],
    [5, 5, 5, 5, 5, 11, 11, 11],
    [28, 5, 5, 5, 5, 5, 5, 5],
    [5, 5, 5, 5, 5, 6, 6, 0],
    [0, 24, 24, 24, 24, 24, 24, 24],
    [0, 24, 24, 24, 24, 0, 0, 0],
    [0, 11, 11, 11, 11, 11, 11, 11],
    [1, 1, 1, 0, 0, 0, 0, 0],
    [2, 2, 2, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 6, 6, 6, 6],
    [297, 329, 5, 5, 5, 5, 4, 5],
    [0, 6, 6, 6, 6, 6, 20, 4],
    [0, 0, 0, 0, 0, 0, 25, 25],
    [11, 11, 11, 11, 11, 11, 11, 0],
    [5, 5, 0, 6, 6, 20, 0, 0],
    [0, 0, 5, 5, 5, 4, 5, 5],
    [0, 0, 6, 6, 6, 6, 6, 6],
    [6, 11, 11, 11, 11, 24, 24, 24],
    [24, 24, 0, 0, 0, 0, 0, 0],
    [5, 5, 6, 6, 6, 6, 24, 24],
    [8, 6, 8, 5, 5, 5, 5, 5],
    [11, 11, 11, 11, 11, 11, 41, 73],
    [6, 5, 5, 6, 6, 5, 0, 0],
    [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],
    [6, 6, 6, 6, 8, 6, 6, 6],
    [6, 6, 6, 6, 6, 0, 41, 73],
    [24, 24, 24, 24, 5, 8, 8, 5],
    [5, 5, 5, 6, 24, 24, 5, 0],
    [5, 5, 5, 8, 8, 8, 6, 6],
    [8, 5, 5, 5, 5, 24, 24, 24],
    [24, 6, 6, 6, 6, 24, 8, 6],
    [297, 329, 5, 24, 5, 24, 24, 24],
    [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],
    [5, 0, 5, 5, 5, 5, 0, 5],
    [5, 24, 0, 0, 0, 0, 0, 0],
    [6, 6, 8, 8, 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, 5, 8, 8, 0, 0, 6, 6],
    [6, 6, 6, 6, 6, 0, 0, 0],
    [5, 5, 0, 5, 0, 0, 5, 0],
    [6, 0, 8, 0, 0, 8, 0, 8],
    [8, 8, 8, 0, 8, 8, 6, 8],
    [6, 5, 6, 5, 24, 24, 0, 24],
    [0, 6, 6, 0, 0, 0, 0, 0],
    [5, 5, 5, 5, 5, 8, 8, 8],
    [8, 8, 6, 6, 6, 8, 6, 5],
    [5, 5, 5, 24, 24, 24, 24, 24],
    [297, 329, 24, 24, 0, 24, 6, 5],
    [6, 8, 6, 8, 8, 8, 8, 6],
    [6, 8, 6, 6, 5, 5, 24, 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],
    [5, 5, 5, 5, 6, 6, 0, 0],
    [6, 6, 6, 8, 8, 6, 8, 6],
    [6, 24, 24, 24, 5, 0, 0, 0],
    [24, 24, 24, 24, 24, 0, 0, 0],
    [5, 5, 5, 6, 8, 6, 8, 8],
    [6, 6, 6, 6, 6, 6, 8, 6],
    [297, 329, 41, 73, 105, 137, 169, 201],
    [233, 265, 297, 329, 0, 0, 0, 0],
    [5, 5, 5, 0, 0, 6, 8, 6],
    [8, 8, 6, 6, 6, 6, 8, 6],
    [297, 329, 11, 11, 24, 24, 24, 28],
    [8, 6, 6, 24, 0, 0, 0, 0],
    [11, 11, 11, 0, 0, 0, 0, 0],
    [0, 5, 0, 0, 5, 5, 5, 5],
    [5, 5, 5, 5, 0, 5, 5, 0],
    [8, 8, 8, 8, 8, 8, 0, 8],
    [8, 0, 0, 6, 6, 8, 6, 5],
    [8, 5, 8, 6, 24, 24, 24, 0],
    [5, 8, 8, 8, 6, 6, 6, 6],
    [0, 0, 6, 6, 8, 8, 8, 8],
    [6, 5, 24, 5, 8, 0, 0, 0],
    [6, 8, 5, 6, 6, 6, 6, 24],
    [24, 24, 24, 24, 24, 24, 24, 6],
    [8, 6, 6, 6, 5, 5, 5, 5],
    [5, 5, 6, 6, 6, 6, 6, 6],
    [6, 6, 24, 24, 24, 5, 24, 24],
    [24, 24, 24, 0, 0, 0, 0, 0],
    [6, 8, 6, 6, 6, 8, 6, 8],
    [5, 24, 24, 24, 24, 24, 0, 0],
    [24, 24, 5, 5, 5, 5, 5, 5],
    [0, 8, 6, 6, 6, 6, 6, 6],
    [6, 8, 6, 6, 8, 6, 6, 0],
    [5, 6, 6, 6, 6, 6, 6, 0],
    [0, 0, 6, 0, 6, 6, 0, 6],
    [6, 6, 6, 6, 6, 6, 5, 6],
    [5, 5, 8, 8, 8, 8, 8, 0],
    [6, 6, 0, 8, 8, 6, 8, 6],
    [5, 4, 5, 5, 0, 0, 0, 0],
    [5, 5, 5, 6, 6, 8, 8, 24],
    [6, 6, 5, 8, 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],
    [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],
    [10, 10, 10, 10, 10, 10, 10, 0],
    [5, 24, 24, 0, 0, 0, 0, 0],
    [6, 5, 5, 5, 5, 5, 5, 6],
    [6, 6, 8, 8, 8, 6, 6, 6],
    [6, 6, 6, 6, 6, 24, 0, 0],
    [24, 24, 24, 24, 28, 28, 28, 28],
    [4, 4, 4, 4, 24, 28, 0, 0],
    [297, 329, 0, 11, 11, 11, 11, 11],
    [11, 11, 0, 5, 5, 5, 5, 5],
    [4, 4, 4, 5, 5, 5, 5, 5],
    [5, 5, 5, 4, 4, 24, 24, 24],
    [11, 11, 11, 11, 11, 11, 11, 24],
    [1, 0, 0, 2, 2, 2, 2, 2],
    [5, 5, 5, 0, 0, 0, 0, 6],
    [5, 8, 8, 8, 8, 8, 8, 8],
    [6, 6, 6, 4, 4, 4, 4, 4],
    [4, 4, 24, 4, 6, 0, 0, 0],
    [8, 8, 4, 4, 10, 10, 10, 0],
    [4, 4, 4, 4, 0, 4, 4, 4],
    [4, 4, 4, 4, 0, 4, 4, 0],
    [0, 0, 5, 0, 0, 0, 0, 0],
    [5, 5, 5, 0, 0, 5, 0, 0],
    [0, 0, 0, 0, 5, 5, 5, 5],
    [5, 5, 0, 0, 28, 6, 6, 24],
    [16, 16, 16, 16, 0, 0, 0, 0],
    [297, 329, 28, 28, 28, 0, 0, 0],
    [0, 0, 28, 28, 28, 28, 28, 28],
    [25, 0, 0, 0, 0, 0, 0, 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],
    [28, 28, 6, 6, 6, 6, 28, 28],
    [28, 28, 6, 6, 6, 28, 0, 0],
    [1, 1, 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, 1, 0, 1, 1],
    [0, 0, 1, 0, 0, 1, 1, 0],
    [0, 1, 1, 1, 1, 0, 1, 1],
    [2, 2, 0, 2, 0, 2, 2, 2],
    [2, 2, 2, 2, 0, 2, 2, 2],
    [2, 2, 2, 2, 1, 1, 0, 1],
    [1, 1, 1, 1, 1, 0, 1, 1],
    [1, 1, 1, 1, 1, 0, 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],
    [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],
    [1, 1, 1, 1, 1, 25, 2, 2],
    [2, 2, 2, 2, 2, 2, 1, 1],
    [2, 25, 2, 2, 2, 2, 2, 2],
    [2, 2, 1, 2, 0, 0, 41, 73],
    [233, 265, 297, 329, 41, 73, 105, 137],
    [169, 201, 233, 265, 297, 329, 41, 73],
    [6, 6, 6, 6, 6, 6, 6, 28],
    [6, 6, 6, 6, 6, 28, 28, 28],
    [28, 28, 28, 28, 28, 6, 28, 28],
    [28, 28, 28, 28, 6, 28, 28, 24],
    [24, 24, 24, 24, 0, 0, 0, 0],
    [0, 0, 0, 6, 6, 6, 6, 6],
    [2, 2, 5, 2, 2, 2, 2, 2],
    [0, 0, 0, 0, 0, 2, 2, 2],
    [6, 0, 0, 6, 6, 6, 6, 6],
    [6, 6, 0, 6, 6, 0, 6, 6],
    [4, 4, 4, 4, 4, 4, 0, 0],
    [6, 6, 6, 6, 6, 6, 6, 4],
    [297, 329, 0, 0, 0, 0, 5, 28],
    [5, 5, 5, 5, 5, 5, 6, 0],
    [297, 329, 0, 0, 0, 0, 0, 26],
    [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, 6, 5, 5, 6, 5],
    [5, 5, 5, 5, 5, 6, 0, 0],
    [0, 0, 0, 0, 0, 0, 5, 4],
    [5, 5, 5, 5, 5, 0, 0, 11],
    [2, 2, 2, 2, 6, 6, 6, 6],
    [6, 6, 6, 4, 0, 0, 0, 0],
    [11, 11, 11, 11, 28, 11, 11, 11],
    [26, 11, 11, 11, 11, 0, 0, 0],
    [11, 11, 11, 11, 11, 11, 28, 11],
    [11, 11, 11, 11, 11, 11, 0, 0],
    [0, 5, 5, 0, 5, 0, 0, 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, 0, 5, 0, 5, 0, 5],
    [0, 5, 5, 5, 0, 5, 5, 5],
    [25, 25, 0, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 28, 28],
    [28, 28, 28, 27, 27, 27, 27, 27],
    [28, 0, 0, 0, 28, 28, 28, 28],
    [28, 28, 28, 0, 0, 0, 28, 28],
    [28, 0, 0, 0, 0, 28, 28, 28],
    [28, 28, 28, 28, 28, 0, 0, 28],
    [28, 28, 28, 0, 0, 0, 0, 28],
    [28, 28, 28, 0, 28, 28, 28, 28],
    [297, 329, 28, 0, 0, 0, 0, 0],
    [0, 16, 0, 0, 0, 0, 0, 0],
    [18, 18, 18, 18, 18, 18, 0, 0]]
pool2 = [[0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
    0, 0, 0, 0, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 20, 
    22, 22, 22, 22, 22, 22, 22, 23, 23, 24, 22, 22, 22, 22, 22, 25, 
    26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 23, 36, 22, 22, 37, 22],
    [22, 22, 22, 22, 22, 22, 38, 39, 40, 22, 20, 20, 20, 20, 20, 20, 
    20, 20, 41, 20, 20, 20, 42, 42, 43, 42, 44, 45, 46, 47, 45, 45, 
    48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 50, 
    51, 52, 53, 17, 54, 55, 20, 20, 20, 56, 57, 22, 22, 22, 58, 59],
    [17, 17, 17, 17, 17, 17, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 
    60, 61, 22, 22, 22, 22, 22, 22, 62, 63, 22, 22, 22, 22, 22, 22, 
    22, 22, 22, 22, 22, 22, 64, 17, 17, 17, 65, 66, 20, 20, 20, 20, 
    20, 67, 68, 48, 48, 48, 48, 69, 70, 71, 72, 72, 72, 73, 74, 71],
    [75, 76, 48, 77, 72, 72, 72, 72, 78, 79, 48, 48, 3, 80, 81, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 82, 83, 84, 85, 3, 86, 
    87, 88, 89, 72, 72, 72, 48, 48, 48, 90, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 91, 48, 92, 71, 3, 93, 72, 72, 72, 79, 94, 95],
    [72, 72, 91, 96, 97, 98, 87, 99, 72, 72, 72, 100, 72, 101, 72, 72, 
    72, 102, 103, 48, 72, 72, 72, 72, 72, 104, 48, 48, 105, 48, 48, 48, 
    106, 72, 72, 72, 72, 72, 72, 107, 108, 109, 110, 72, 111, 112, 113, 72, 
    114, 115, 116, 72, 72, 117, 118, 119, 120, 121, 122, 123, 124, 112, 125, 126],
    [127, 73, 116, 72, 72, 117, 128, 129, 130, 131, 132, 133, 134, 112, 135, 71, 
    127, 136, 137, 72, 72, 117, 138, 119, 139, 140, 141, 71, 124, 112, 142, 143, 
    144, 115, 116, 72, 72, 117, 138, 145, 120, 146, 147, 123, 124, 112, 148, 71, 
    149, 150, 151, 152, 153, 150, 72, 154, 155, 156, 157, 71, 134, 112, 158, 159],
    [160, 161, 117, 72, 72, 117, 72, 162, 163, 164, 165, 166, 124, 112, 167, 168, 
    169, 161, 117, 72, 72, 117, 170, 145, 171, 172, 173, 174, 124, 112, 175, 71, 
    176, 161, 117, 72, 72, 72, 72, 177, 178, 179, 180, 181, 124, 112, 182, 183, 
    144, 72, 184, 185, 72, 72, 137, 186, 184, 187, 188, 189, 134, 112, 190, 71],
    [191, 72, 72, 72, 72, 72, 192, 193, 194, 195, 3, 196, 71, 71, 71, 71, 
    152, 197, 72, 72, 198, 72, 192, 199, 200, 201, 3, 202, 71, 71, 71, 71, 
    203, 87, 204, 205, 3, 206, 207, 208, 72, 191, 72, 72, 72, 209, 68, 210, 
    211, 212, 48, 68, 48, 48, 48, 213, 214, 215, 216, 217, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 218, 219, 220, 3, 221, 222, 223, 224, 225, 226, 72, 
    227, 228, 3, 229, 17, 17, 17, 17, 230, 231, 20, 20, 20, 20, 20, 232, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 151, 184, 151, 72, 72, 72, 72, 
    72, 151, 72, 72, 72, 72, 151, 184, 151, 72, 184, 72, 72, 72, 72, 72, 
    72, 72, 151, 72, 72, 72, 72, 72, 72, 72, 72, 233, 87, 234, 182, 235, 
    72, 72, 236, 237, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 238, 239],
    [240, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 241, 72, 72, 
    242, 72, 72, 243, 72, 72, 72, 72, 72, 72, 72, 72, 72, 244, 245, 141, 
    72, 72, 246, 247, 72, 72, 248, 71, 72, 72, 249, 71, 72, 161, 250, 71, 
    72, 72, 72, 72, 72, 72, 251, 252, 253, 108, 254, 255, 3, 256, 182, 257],
    [258, 259, 3, 256, 72, 72, 72, 72, 260, 72, 72, 72, 72, 72, 72, 141, 
    261, 72, 72, 72, 72, 262, 72, 72, 72, 72, 72, 72, 72, 72, 263, 71, 
    72, 72, 72, 184, 264, 265, 266, 267, 268, 112, 72, 72, 72, 263, 209, 71, 
    72, 72, 72, 72, 72, 269, 72, 72, 72, 270, 3, 271, 236, 236, 236, 236],
    [72, 72, 272, 273, 72, 72, 72, 72, 72, 72, 274, 201, 275, 276, 277, 278, 
    3, 256, 3, 256, 279, 280, 48, 281, 48, 48, 48, 282, 48, 283, 71, 71, 
    284, 72, 72, 72, 72, 72, 285, 286, 287, 288, 3, 221, 289, 290, 291, 292, 
    293, 72, 72, 72, 294, 295, 3, 93, 72, 72, 72, 72, 296, 297, 298, 299],
    [72, 72, 72, 72, 300, 301, 302, 303, 3, 304, 3, 93, 72, 72, 72, 305, 
    20, 306, 17, 17, 17, 17, 17, 307, 87, 71, 308, 48, 219, 309, 310, 311, 
    20, 20, 20, 20, 20, 312, 42, 42, 42, 42, 42, 42, 42, 313, 20, 314, 
    20, 20, 20, 315, 42, 42, 42, 42, 48, 48, 48, 48, 48, 48, 48, 48],
    [22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 
    22, 22, 316, 317, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 
    20, 17, 239, 238, 20, 17, 20, 17, 239, 238, 20, 318, 20, 17, 20, 239, 
    20, 319, 20, 319, 20, 319, 320, 321, 322, 323, 324, 325, 20, 326, 327, 328],
    [329, 330, 331, 332, 87, 333, 87, 334, 335, 87, 336, 337, 338, 339, 340, 341, 
    182, 342, 42, 343, 344, 344, 344, 344, 345, 71, 48, 346, 347, 48, 348, 71, 
    349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 182, 182, 359, 359, 359, 359, 
    360, 361, 362, 363, 364, 365, 236, 236, 236, 366, 367, 236, 236, 236, 368, 369],
    [369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 
    369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 
    236, 370, 236, 236, 371, 372, 236, 236, 236, 236, 236, 236, 236, 236, 236, 373, 
    236, 236, 236, 374, 369, 369, 375, 236, 236, 236, 236, 368, 371, 236, 236, 236],
    [236, 236, 236, 236, 236, 237, 71, 71, 236, 376, 71, 71, 182, 182, 182, 182, 
    182, 182, 182, 377, 236, 236, 236, 236, 236, 236, 236, 236, 236, 378, 182, 182, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 379, 236, 380, 236, 236, 236, 236, 236, 236, 369],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 379, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 381, 382, 182, 
    182, 182, 377, 236, 236, 236, 236, 236, 383, 369, 369, 369, 384, 381, 369, 369],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 
    385, 386, 386, 387, 369, 369, 369, 369, 369, 369, 369, 388, 369, 369, 369, 389],
    [369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 
    369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, 
    236, 236, 236, 236, 236, 236, 369, 369, 390, 362, 236, 236, 236, 236, 391, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236],
    [17, 17, 17, 17, 17, 17, 20, 20, 20, 20, 20, 20, 392, 393, 394, 395, 
    22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 396, 397, 398, 399, 
    20, 20, 20, 20, 400, 401, 72, 72, 72, 72, 72, 72, 72, 402, 403, 404, 
    72, 72, 184, 71, 184, 184, 184, 184, 184, 184, 184, 184, 48, 48, 48, 48],
    [405, 406, 407, 408, 409, 410, 87, 411, 412, 87, 413, 414, 71, 71, 71, 71, 
    236, 236, 236, 415, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 416, 71, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 417, 71, 71, 71, 236, 236],
    [418, 381, 419, 420, 421, 422, 423, 424, 191, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 184, 425, 240, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 426, 
    427, 72, 72, 72, 72, 72, 191, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 184, 428, 236, 72, 72, 72, 72, 236, 236, 236, 236, 417, 429, 72, 72],
    [236, 236, 236, 430, 182, 431, 236, 236, 236, 182, 432, 182, 236, 236, 236, 236, 
    182, 431, 236, 236, 236, 236, 432, 182, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 236, 236, 236, 236, 236, 236, 236, 236],
    [72, 72, 433, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 209, 236, 236, 236, 236, 236, 236, 430, 71, 72, 72, 72, 72, 72, 305, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 434, 72, 72, 3, 435, 71, 71, 22, 22, 22, 22, 22, 436, 437, 438, 
    22, 22, 22, 439, 72, 72, 72, 72, 72, 72, 72, 72, 440, 359, 441, 71, 
    45, 45, 442, 42, 443, 22, 24, 22, 22, 22, 22, 22, 22, 22, 314, 444, 
    22, 445, 446, 22, 22, 447, 448, 22, 449, 450, 22, 451, 71, 71, 452, 453],
    [454, 455, 72, 72, 456, 457, 458, 459, 72, 72, 72, 72, 72, 72, 460, 71, 
    461, 72, 72, 72, 72, 72, 300, 189, 462, 463, 3, 256, 48, 48, 464, 465, 
    3, 93, 72, 72, 91, 466, 72, 72, 272, 48, 298, 167, 72, 72, 72, 209, 
    106, 72, 72, 72, 72, 72, 467, 468, 469, 470, 3, 471, 472, 72, 3, 473],
    [72, 72, 72, 72, 72, 474, 475, 71, 455, 476, 3, 477, 72, 72, 478, 479, 
    72, 72, 72, 72, 72, 72, 480, 481, 262, 71, 71, 482, 72, 483, 484, 71, 
    485, 485, 485, 71, 184, 184, 20, 20, 20, 20, 20, 486, 20, 487, 20, 20, 
    20, 20, 20, 20, 20, 20, 20, 20, 72, 72, 72, 72, 488, 489, 3, 256],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 269, 71, 72, 72, 184, 490, 72, 72, 72, 72, 72, 269],
    [491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 
    491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 
    491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 
    491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491],
    [492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492],
    [492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 263, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 270, 71, 71, 71, 71, 
    493, 71, 494, 495, 72, 496, 184, 497, 498, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 499, 45, 500, 236, 501, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 502, 236, 236, 72, 72, 72, 72, 72, 72, 
    72, 72, 503, 72, 72, 72, 72, 72, 72, 236, 71, 71, 71, 71, 72, 504],
    [48, 48, 505, 506, 48, 48, 507, 386, 508, 509, 510, 511, 512, 513, 161, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 514, 
    515, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 516, 517, 72, 78, 72, 
    72, 72, 72, 518, 72, 72, 72, 184, 185, 185, 185, 519, 520, 521, 71, 522],
    [72, 170, 72, 72, 184, 72, 72, 523, 72, 263, 72, 263, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 
    524, 182, 182, 182, 182, 182, 525, 236, 359, 359, 359, 359, 359, 359, 526, 527, 
    236, 528, 236, 529, 530, 71, 71, 71, 71, 71, 236, 236, 236, 236, 236, 531],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    72, 72, 72, 209, 72, 72, 72, 72, 72, 72, 141, 71, 532, 182, 182, 533, 
    72, 72, 72, 72, 533, 427, 72, 72, 534, 535, 72, 72, 72, 72, 91, 536, 
    72, 72, 72, 537, 72, 72, 72, 72, 269, 72, 538, 71, 71, 71, 71, 71],
    [17, 17, 17, 17, 17, 20, 20, 20, 20, 20, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 263, 3, 256, 17, 17, 17, 17, 539, 20, 20, 20, 20, 540, 
    72, 72, 72, 72, 72, 71, 72, 72, 72, 72, 72, 72, 269, 167, 17, 541, 
    17, 541, 542, 20, 543, 20, 543, 544, 72, 72, 72, 72, 72, 72, 269, 71],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 184, 71, 72, 72, 263, 71, 72, 71, 71, 71, 
    545, 42, 42, 42, 42, 42, 546, 547, 71, 71, 71, 71, 71, 71, 71, 71],
    [263, 117, 72, 72, 72, 72, 136, 548, 72, 72, 537, 182, 72, 72, 549, 432, 
    72, 72, 72, 184, 550, 182, 71, 71, 71, 71, 71, 71, 72, 72, 166, 551, 
    72, 72, 552, 553, 72, 72, 72, 554, 72, 72, 72, 270, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 72, 555, 182, 182, 556, 182, 182, 182, 182, 182],
    [557, 558, 170, 191, 72, 72, 263, 559, 182, 560, 87, 403, 72, 72, 72, 561, 
    72, 72, 72, 562, 71, 71, 71, 71, 72, 563, 72, 72, 564, 551, 99, 71, 
    72, 72, 72, 72, 72, 72, 263, 565, 72, 72, 263, 182, 72, 72, 101, 182, 
    72, 72, 270, 566, 71, 567, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 141, 71, 71, 71, 71, 71, 71, 
    17, 17, 17, 17, 17, 17, 568, 71, 20, 20, 20, 20, 20, 20, 569, 556, 
    72, 72, 72, 72, 570, 71, 3, 256, 3, 571, 17, 17, 238, 572, 20, 20, 
    239, 573, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 182, 182, 182, 574, 
    72, 72, 72, 72, 72, 575, 270, 71, 576, 71, 289, 530, 71, 71, 71, 577, 
    72, 72, 72, 562, 181, 71, 72, 72, 91, 48, 578, 579, 71, 71, 72, 72, 
    580, 579, 71, 71, 71, 71, 72, 72, 562, 533, 71, 71, 72, 72, 184, 71],
    [581, 72, 72, 72, 72, 72, 72, 48, 195, 280, 556, 182, 582, 112, 583, 404, 
    293, 72, 72, 72, 72, 72, 584, 585, 586, 587, 72, 72, 72, 141, 3, 256, 
    588, 72, 72, 72, 272, 589, 590, 112, 591, 71, 72, 72, 72, 72, 592, 71, 
    293, 72, 72, 72, 72, 72, 593, 210, 594, 595, 3, 596, 567, 182, 235, 71],
    [72, 72, 137, 72, 72, 597, 598, 599, 600, 71, 71, 71, 71, 71, 71, 71, 
    184, 601, 72, 136, 72, 602, 72, 72, 72, 72, 72, 272, 277, 536, 3, 256, 
    603, 115, 116, 72, 72, 117, 138, 604, 605, 606, 157, 427, 607, 608, 608, 71, 
    72, 609, 72, 72, 72, 72, 136, 277, 610, 611, 612, 403, 613, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 614, 48, 615, 616, 3, 617, 270, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 277, 618, 619, 71, 3, 256, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 620, 621, 622, 623, 87, 87, 624, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 277, 625, 626, 71, 3, 256, 87, 627, 71, 71, 
    72, 72, 72, 72, 72, 628, 629, 602, 3, 256, 3, 630, 631, 71, 71, 71, 
    72, 72, 72, 632, 633, 283, 3, 634, 184, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 597, 48, 635, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 17, 17, 17, 17, 20, 20, 20, 20, 3, 206, 636, 247, 
    184, 637, 638, 72, 72, 72, 639, 640, 641, 71, 3, 256, 71, 71, 71, 71, 
    71, 71, 71, 71, 72, 185, 72, 72, 72, 72, 642, 643, 644, 71, 71, 71],
    [110, 588, 72, 72, 72, 72, 79, 645, 646, 71, 474, 647, 72, 72, 72, 72, 
    72, 648, 210, 649, 650, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 141, 
    87, 579, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 651, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 72, 602, 71, 3, 256],
    [72, 117, 72, 72, 72, 620, 201, 629, 652, 71, 3, 206, 182, 235, 653, 72, 
    72, 72, 577, 48, 48, 654, 655, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    184, 137, 72, 72, 72, 72, 656, 657, 658, 71, 3, 256, 136, 117, 72, 72, 
    72, 659, 660, 141, 3, 256, 72, 72, 72, 72, 72, 661, 3, 256, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 662, 403, 
    663, 72, 117, 72, 72, 72, 664, 665, 666, 87, 3, 667, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 141, 71, 182, 182, 668, 669, 670, 236, 237, 167],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 270, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 671, 627, 71, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 269, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 672, 71],
    [72, 72, 72, 72, 72, 72, 339, 339, 673, 48, 282, 71, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101],
    [72, 72, 72, 72, 72, 72, 72, 72, 184, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    72, 72, 72, 91, 48, 674, 3, 256, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 72, 141, 72, 72, 72, 184, 3, 471, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 184, 3, 256, 72, 72, 72, 263, 675, 71, 
    72, 72, 72, 72, 72, 72, 195, 676, 677, 71, 3, 678, 679, 72, 72, 427, 
    72, 72, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 680, 72, 72, 72, 72, 681, 3, 256, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 17, 17, 17, 17, 20, 20, 20, 20, 
    182, 182, 682, 650, 17, 17, 17, 683, 20, 20, 540, 71, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 684, 685, 189, 189, 189, 189, 189, 
    189, 404, 686, 42, 71, 71, 71, 71, 71, 71, 71, 71, 687, 71, 688, 71],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 263, 71, 71, 71, 71, 247, 
    72, 72, 72, 184, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 689, 690],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 101, 71, 691, 71, 71, 71, 692, 71, 693, 71, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 269, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 72, 209, 
    72, 141, 72, 694, 695, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 3, 696, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 416, 697, 236, 236, 530, 71, 236, 236, 698, 71, 
    48, 48, 48, 48, 48, 282, 48, 48, 201, 71, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 416, 71, 71, 71, 71, 71, 71, 71],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 417, 71, 
    236, 236, 236, 236, 430, 699, 236, 236, 236, 236, 236, 236, 700, 701, 702, 703, 
    704, 291, 236, 236, 236, 705, 236, 236, 236, 236, 236, 236, 236, 376, 71, 71],
    [236, 236, 236, 236, 236, 236, 236, 236, 706, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 182, 182, 533, 71, 182, 182, 533, 71, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 430, 71, 182, 182, 182, 560, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [17, 17, 17, 707, 20, 20, 708, 17, 17, 709, 320, 20, 20, 17, 17, 17, 
    707, 20, 20, 710, 711, 712, 709, 713, 714, 20, 17, 17, 17, 707, 20, 20, 
    715, 307, 716, 717, 20, 20, 20, 718, 719, 720, 721, 20, 20, 708, 17, 17, 
    709, 20, 20, 20, 17, 17, 17, 707, 20, 20, 708, 17, 17, 709, 20, 20],
    [20, 17, 17, 17, 707, 20, 20, 708, 17, 17, 709, 20, 20, 20, 17, 17, 
    17, 707, 20, 20, 239, 17, 17, 17, 722, 20, 20, 723, 724, 17, 17, 725, 
    20, 20, 726, 708, 17, 17, 727, 20, 20, 21, 728, 17, 17, 18, 20, 20, 
    20, 729, 17, 17, 17, 722, 20, 20, 723, 730, 112, 3, 630, 731, 732, 112],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236],
    [48, 48, 48, 48, 48, 48, 733, 290, 48, 48, 48, 48, 48, 734, 735, 236, 
    736, 737, 71, 738, 68, 48, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    20, 739, 20, 493, 740, 569, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [201, 48, 48, 741, 742, 536, 42, 42, 42, 42, 42, 42, 42, 743, 71, 71, 
    71, 404, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 209, 744, 743, 3, 745, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 72, 72, 72, 746, 71, 71, 72, 72, 72, 72, 72, 570, 3, 747, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 748, 3, 256, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 91, 749, 750],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 72, 72, 72, 184, 751, 91, 752, 753, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 184, 638, 72, 184],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 754, 182, 201, 71, 71, 71, 71, 71, 
    17, 17, 17, 17, 707, 20, 20, 20, 755, 756, 3, 471, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 567, 182, 
    182, 182, 182, 182, 182, 757, 758, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    567, 182, 182, 182, 182, 759, 182, 760, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [170, 72, 72, 72, 761, 191, 197, 762, 763, 764, 761, 765, 761, 197, 197, 133, 
    72, 137, 72, 269, 766, 137, 72, 269, 71, 71, 71, 71, 71, 71, 767, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [236, 236, 236, 236, 236, 416, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 416, 71, 236, 430, 699, 236, 699, 236, 699, 236, 236, 236, 417, 71, 
    182, 668, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 417, 71, 71, 71, 71, 71, 71, 768, 236, 236, 236],
    [376, 71, 236, 236, 236, 236, 236, 416, 236, 530, 237, 71, 417, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 769],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 770, 236, 529, 236, 529, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 237, 236, 416, 530, 71],
    [236, 416, 236, 236, 236, 236, 236, 236, 236, 71, 236, 237, 236, 236, 236, 236, 
    236, 71, 236, 236, 236, 417, 236, 416, 237, 71, 369, 698, 71, 71, 71, 71, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236],
    [236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 71, 236, 417, 236, 529, 
    236, 771, 236, 236, 236, 236, 236, 236, 430, 772, 236, 773, 236, 774, 236, 530, 
    236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 
    236, 236, 775, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, 3, 776],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 71, 71, 71, 71, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 263, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 263, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 141, 71, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 263, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 263, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 101, 72, 72, 72, 72, 72, 72, 
    72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72],
    [72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 270, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71],
    [777, 71, 71, 71, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 
    71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 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, 71, 71],
    [492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 
    492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 778]]
buf3 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
    16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 27, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    28, 26, 29, 30, 31, 32, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 33, 34, 34, 34, 34, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 36, 37, 38, 39, 
    40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 
    26, 56, 57, 58, 58, 58, 58, 59, 26, 26, 60, 26, 26, 26, 26, 26, 
    26, 61, 26, 62, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    63, 58, 58, 58, 26, 64, 65, 66, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 67, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 68, 69, 70, 58, 58, 58, 58, 71, 58, 
    58, 58, 58, 58, 58, 58, 72, 73, 74, 75, 76, 77, 78, 79, 58, 80, 
    81, 82, 83, 84, 85, 58, 86, 87, 88, 89, 78, 90, 91, 92, 58, 58, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 93, 26, 26, 26, 26, 26, 26, 26, 26, 94, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 95, 26, 26, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 96, 26, 97, 58, 58, 58, 58, 26, 98, 58, 58, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 99, 26, 26, 26, 26, 26, 26, 
    26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 100, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    101, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 102, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 
    35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 102]


def code_property(ch):
    return pool[pool2[buf3[ch >> 9]][(ch >> 3) & 0x3F]][ch & 0x7]


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


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

import asyncio
import sys
import importlib
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):
        goal = deref(peek.args[0])
        goal = Compound(".", [goal, NotImplemented])
        if back is None:
            res = goal
        else:
            back.args[1] = goal
        back = goal
        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(peek, at, choice):
    if (is_structure(peek) and
            peek.functor == "." and
            len(peek.args) == 2):
        mark = trail
        goal = deref(peek.args[0])
        solve_mark(deref(goal.args[0]))
        peek = deref(peek.args[1])
        if (is_structure(peek) and
                peek.functor == "." and
                len(peek.args) == 2):
            if choice is None:
                choice = Choice(solve_alt, peek, -1, mark)
            else:
                choice.data = peek
            more(choice)
        solve_seq(deref(goal.args[1]))
        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])
    val = getattr(module, "main", NotImplemented)
    if val is NotImplemented:
        raise make_error(Compound("existence_error",
                    ["method", "main"]))
    elif not callable(val):
        raise make_error(Compound("permission_error",
                    ["invoke", "method", "main"]))
    else:
        val()
    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 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 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_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_special(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 narrow_float(alpha):
    if is_float(alpha):
        if is_special(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)
        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)
    elif num < 0:
        return "-" + atom_integer_encode(- num, radix)
    elif radix == 2:
        return bin(num)[2:]
    elif radix == 8:
        return oct(num)[2:]
    elif radix == 16:
        return hex(num)[2:]
    else:
        return str_encode(num, radix)


def str_encode(num, radix):
    blen = num.bit_length()
    if blen < 48:
        return str_integer(num, radix)
    if blen < 512:
        blen = 48 // (radix - 1).bit_length()
        base = radix ** blen
        count = 0
        res = str_integer(num % base, radix)
        num = num // base
        while num != 0:
            count += blen
            res = res.rjust(count, "0")
            res = str_integer(num % base, radix) + res
            num = num // base
        return res
    blen = (blen // (radix - 1).bit_length() + 1) // 2
    base = radix ** blen
    return (str_encode(num // base, radix) +
            str_encode(num % base, radix).rjust(blen, "0"))


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_sys_goal_ossify(args):
    alpha = exec_build(args[0])
    body = list_objects(alpha)
    beta = exec_build(args[1])
    size = 0
    try:
        size = number_term(beta, size)
        size = number_objects(body, size)
        cutvar = ossify_cutvar(beta)
        ossify_objects(body)
    finally:
        unossify_term(beta)
        unossify_objects(alpha)
    return exec_unify(args[2],
        Goal(size, body, cutvar))


def test_sys_clause_ossify(args):
    alpha = exec_build(args[0])
    head = list_objects(alpha)
    beta = exec_build(args[1])
    body = list_objects(beta)
    gamma = exec_build(args[2])
    mue = exec_build(args[3])
    size = 0
    try:
        size = number_term(gamma, size)
        size = number_objects(head, size)
        size = number_objects(body, size)
        cutvar = ossify_cutvar(gamma)
        ossify_objects(head)
        ossify_objects(body)
    finally:
        unossify_term(gamma)
        unossify_objects(alpha)
        unossify_objects(beta)
    return exec_unify(args[4],
          Clause(size, mue, head, body, cutvar))



def number_objects(peek, size):
    i = 0
    while i < len(peek):
       size = number_term(peek[i], size)
       i += 1
    return size


def ossify_objects(peek):
    i = 0
    while i < len(peek):
        peek[i] = ossify_term(peek[i])
        i += 1


def unossify_objects(peek):
    while (is_structure(peek) and
            "." == peek.functor and
            len(peek.args) == 2):
        unossify_term(peek.args[0])
        peek = deref(peek.args[1])



def ossify_cutvar(peek):
    if (is_structure(peek) and
        "just" == peek.functor and
        len(peek.args) == 1):
        res = ossify_term(peek.args[0])
        return res.index
    else:
        return -1



def number_term(alpha, size):

    def number_term2(first):
        nonlocal size
        while True:
            first = deref(first)
            if is_variable(first):
                if first.tail is None:
                    first.tail = NotImplemented
                elif first.tail is NotImplemented:
                    first.tail = Place(size)
                    size += 1
            elif is_compound(first):
                i = 0
                while i < len(first.args) - 1:
                    number_term2(first.args[i])
                    i += 1
                first = first.args[i]
                continue
            break

    number_term2(alpha)
    return size


def ossify_term(first):
    back = None
    while True:
        first = deref(first)
        if is_variable(first):
            first = first.tail
        elif is_compound(first):
            args = [NotImplemented] * len(first.args)
            i = 0
            while i < len(first.args)-1:
                args[i] = ossify_term(first.args[i])
                i += 1
            args[i] = back
            back = Skeleton(first.functor, args)
            first = first.args[i]
            continue
        while back is not None:
            peek = back.args[len(back.args)-1]
            back.args[len(back.args)-1] = first
            first = try_freeze(back)
            back = peek
        return first


def try_freeze(alpha):
    i = 0
    while i < len(alpha.args):
        temp = alpha.args[i]
        if is_pending(temp):
            return alpha
        if is_skeleton(temp):
            return alpha
        i += 1
    return Frozen(alpha.functor, alpha.args)


def unossify_term(first):
    while True:
        first = deref(first)
        if is_variable(first):
            if first.tail is not None:
                first.tail = None
        elif is_compound(first):
            i = 0
            while i < len(first.args)-1:
                unossify_term(first.args[i])
                i += 1
            first = first.args[i]
            continue
        break



def test_sys_clause_add(args):
    gamma = exec_build(args[0])
    check_clause(gamma)
    flags = exec_build(args[1])
    check_integer(flags)
    add_clause(gamma, flags)
    return True


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



set("fail", 0, make_check(test_fail))
set("$CUT", 1, make_check(test_cut))
set("$MARK", 1, make_check(test_mark))
set("$SEQ", 2, make_special(special_seq))
set("$ALT", 1, make_special(special_alt))
set("sys_raise", 1, make_check(test_sys_raise))
set("sys_trap", 3, make_special(special_sys_trap))

set("os_sleep_promise", 2, make_check(test_os_sleep_promise))
set("os_import_promise", 3, make_check(test_os_import_promise))
set("os_invoke_main", 1, make_check(test_os_invoke_main))
set("$YIELD", 1, make_special(special_yield))
set("shield", 1, make_special(special_shield))
set("unshield", 1, make_special(special_unshield))
set("call", 1, make_special(special_call))

set("=", 2, make_check(test_unify))
set("copy_term", 2, make_check(test_copy_term))
set("=..", 2, make_check(test_univ))
set("functor", 3, make_check(test_functor))
set("arg", 3, make_check(test_arg))
set("change_arg", 3, make_check(test_change_arg))
set("term_variables", 2, make_check(test_term_variables))

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

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

set("code_category", 2, make_check(test_code_category))
set("code_numeric", 2, make_check(test_code_numeric))
set("atom_integer", 3, make_check(test_atom_integer))
set("atom_number", 2, make_check(test_atom_number))

set("sys_goal_ossify", 3, make_check(test_sys_goal_ossify))
set("sys_clause_ossify", 5, make_check(test_sys_clause_ossify))
set("sys_clause_add", 2, make_check(test_sys_clause_add))
set("sys_goal_call", 1, make_special(special_sys_goal_call))
import os
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

MASK_DST_LINE = 0x00000010

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
        self.offset = 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:
        pos = text.rfind("\n")
        if pos != -1:
            stream.offset = len(text) - pos - 1
        else:
            stream.offset += len(text)
        stream.last = ord(text[len(text) - 1])
        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 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(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) + os.path.sep \
            if ftype == "directory" else os.path.abspath(url)
        res["type"] = ftype
        res["can_write"] = "true" \
            if (stats.st_mode & stat.S_IWUSR) != 0 else "false"
    except OSError as err:
        register_signal(buf, map_file_error(err, url))
        return



def test_os_open_sync(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_supported"]))
    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",
                  ["file_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_site_new(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_link_new(args):
    alpha = exec_build(args[0])
    alpha = list_objects(alpha)
    return exec_unify(args[1], make_defined(alpha))


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



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


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:
        if (flags & MASK_FIND_SIGNAL) != 0:
            raise make_error(Compound("existence_error",
                ["procedure", make_indicator_term(head)]))
        else:
            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.func) and not is_stick(peek.func):
        if (flags & MASK_FIND_SIGNAL) != 0:
            make_error_find(head, flags)
        else:
            return False
    if is_structure(head):
        head = head.args
    else:
        head = VOID_ARGS
    peek = defined_pred(peek, head)
    peek = snapshot_rope(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):
    alpha = exec_build(args[0])
    check_clause(alpha)
    beta = exec_build(args[1])
    check_integer(beta)
    return remove_clause(alpha, 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_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_link_flags(args):
    peek = exec_build(args[0])
    check_provable(peek)
    res = peek.flags
    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 special_kb_clause_head(args):
    clause = deref(args[0])
    check_clause(clause)
    head = deref(args[1])
    if clause.size != 0:
        display = [NotImplemented] * clause.size
    else:
        display = None
    if not is_variable(head):
        if is_structure(head):
            paras = head.args
        else:
            paras = VOID_ARGS
        if not exec_head(clause.head, display, paras):
            return False
    else:
        alpha = exec_frame(clause.functor, clause.head, display)
        bind(alpha, head)
    cont(call.args[1])
    return True


def special_kb_clause_data(args):
    clause = deref(args[0])
    check_clause(clause)
    head = deref(args[1])
    if clause.size != 0:
        display = [NotImplemented] * clause.size
    else:
        display = None
    if not is_variable(head):
        if is_structure(head):
            paras = head.args
        else:
            paras = VOID_ARGS
        if not exec_head(clause.head, display, paras):
            return False
    else:
        alpha = exec_frame(clause.functor, clause.head, display)
        bind(alpha, head)
    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



set("current_output", 1, make_check(test_current_output))
set("current_error", 1, make_check(test_current_error))
set("set_output", 1, make_check(test_set_output))
set("set_error", 1, make_check(test_set_error))
set("put_atom", 2, make_check(test_put_atom))

set("current_input", 1, make_check(test_current_input))
set("set_input", 1, make_check(test_set_input))
set("os_get_code", 2, make_check(test_os_get_code))
set("os_peek_code", 2, make_check(test_os_peek_code))
set("os_open_promise", 4, make_check(test_os_open_promise))
set("os_read_promise", 2, make_check(test_os_read_promise))
set("os_close_promise", 2, make_check(test_os_close_promise))
set("os_prop_promise", 3, make_check(test_os_prop_promise))

set("os_open_sync", 4, make_check(test_os_open_sync))
set("flush_output", 1, make_check(test_flush_output))
set("os_close_sync", 1, make_check(test_os_close_sync))
set("os_cntrl_sync", 2, make_check(test_os_cntrl_sync))
set("os_read_sync", 1, make_check(test_os_read_sync))

set("ir_site_new", 2, make_check(test_ir_site_new))
set("ir_is_site", 1, make_check(test_ir_is_site))
set("ir_site_name", 2, make_check(test_ir_site_name))
set("ir_link_new", 2, make_check(test_ir_link_new))
set("ir_is_link", 1, make_check(test_ir_is_link))

set("kb_clause_ref", 3, make_special(special_kb_clause_ref))
set("kb_pred_touch", 3, make_check(test_kb_pred_touch))
set("kb_clause_remove", 2, make_check(test_kb_clause_remove))
set("kb_pred_destroy", 2, make_check(test_kb_pred_destroy))

set("kb_pred_link", 3, make_check(test_kb_pred_link))
set("kb_link_flags", 2, make_check(test_kb_link_flags))
set("kb_pred_list", 1, make_check(test_kb_pred_list))

set("kb_clause_shard", 2, make_check(test_kb_clause_shard))
set("kb_clause_head", 2, make_special(special_kb_clause_head))
set("kb_clause_data", 4, make_special(special_kb_clause_data))

import math
import sys



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])
    if is_integer(alpha):
        return -alpha
    else:
        return 0 - alpha


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
        if alpha == 0:
            return 0
        return 1
    else:
        alpha = narrow_float(alpha)
        if alpha < 0.0:
            return -1.0
        if alpha == 0.0:
            return 0.0
        return 1.0



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_min(args):
    alpha = exec_eval(args[0])
    beta = exec_eval(args[1])
    if is_special(alpha) or is_special(beta):
        if math.isnan(alpha):
            return beta
        if math.isnan(beta):
            return alpha
        if alpha == math.inf:
            return beta
        if beta == math.inf:
            return alpha
        if alpha == -math.inf:
            return alpha
        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_special(alpha) or is_special(beta):
        if math.isnan(alpha):
            return beta
        if math.isnan(beta):
            return alpha
        if alpha == -math.inf:
            return beta
        if beta == -math.inf:
            return alpha
        if alpha == math.inf:
            return alpha
        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_nan(args):
    return math.nan



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_special(alpha) or is_special(beta):
        if math.isnan(alpha):
            return False
        if math.isnan(beta):
            return False
        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 number_lessequal(beta, alpha)
    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 number_lessequal(alpha, beta)
    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_special(alpha) or is_special(beta):
        if math.isnan(alpha):
            return False
        if math.isnan(beta):
            return False
        if alpha == beta:
            return False
        if beta == math.inf:
            return True
        return alpha == -math.inf
    if is_integer(alpha) and is_integer(beta):
        return alpha < beta
    else:
        return narrow_float(alpha) < narrow_float(beta)


def number_lessequal(alpha, beta):
    if is_special(alpha) or is_special(beta):
        if math.isnan(alpha):
            return False
        if math.isnan(beta):
            return False
        if alpha == beta:
            return True
        if beta == math.inf:
            return True
        return alpha == -math.inf
    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 is not second:
                    if (is_frozen(first) and is_frozen(second) and
                            first.hash != second.hash):
                        break
                    if first.functor != second.functor:
                        break
                    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)



class Triple:
    def __init__(self, backup, accum, children):
        self.backup = backup
        self.accum = accum
        self.children = children


def is_triple(obj):
    return isinstance(obj, Triple)



def test_term_hash(args):
    alpha = exec_build(args[0])
    try:
        res = walk_compute(alpha, init_hash, union_hash)
    finally:
        walk_uncompute(alpha)
    return exec_unify(args[1], res)


def init_hash(first):
    if is_compound(first):
        return object_hash_code(first.functor)
    elif is_variable(first):
        return variable_serno(first)
    elif is_frozen(first):
        return first.hash
    else:
        return object_hash_code(first)


def union_hash(first, second):
    return int32(first * 31 + second)


def walk_compute(first, init, reduce):
    stack = None
    while True:
        first = deref(first)
        if is_compound(first):
            if not is_triple(first.functor):
                first.functor = Triple(first.functor, init(first), None)
                first.walk &= ~VAR_MASK_SERNO
                stack = stack_push(stack, first)
                first = first.args[0]
                continue
            else:
                first = first.functor.accum
        else:
            first = init(first)
        item = stack_peek(stack)
        while (item is not None and
               (item.walk & VAR_MASK_SERNO) == len(item.args) - 1):
            first = reduce(item.functor.accum, first)
            item.functor.accum = first
            stack_pop(stack)
            item = stack_peek(stack)
        if item is None:
            return first
        else:
            first = reduce(item.functor.accum, first)
            item.functor.accum = first
            item.walk += 1
            first = item.args[item.walk & VAR_MASK_SERNO]


def walk_uncompute(first):
    stack = None
    while True:
        first = deref(first)
        if is_compound(first):
            if is_triple(first.functor):
                first.functor = first.functor.backup
                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 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("domain_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])
        peek = Compound(".", [ch, NotImplemented])
        if back is not None:
            back.args[1] = peek
        else:
            res = peek
        back = peek
        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("domain_error", ["character_code", ch]))
        return exec_unify(text, chr(ch))
    else:
        text = exec_build(text)
        check_atom(text)
        if len(text) != 1:
             raise make_error(Compound("type_error",
                   ["character", text]))
        return exec_unify(args[1], ord(text[0]))



def test_atom_length(args):
    text = exec_build(args[0])
    check_atom(text)
    return exec_unify(args[1], len(text))


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_atom_concat(args):
    first = deref(args[0])
    second = deref(args[1])
    third = deref(args[2])
    if is_variable(second):
        if is_variable(first):
            check_atom(third)
            return solve2_concat(args, None, 0, None)
        else:
            check_atom(first)
            check_atom(third)
            if not third.startswith(first):
                return False
            if not unify(second, third[len(first):]):
                return False
    elif is_variable(first):
        check_atom(second)
        check_atom(third)
        if not third.endswith(second):
            return False
        if not unify(first, third[:len(third)-len(second)]):
            return False
    else:
        check_atom(first)
        check_atom(second)
        if not unify(third, first+second):
            return False
        cont(call.args[1])
    return True


def solve_concat(rope, at, choice):
    goal = deref(call.args[0])
    return solve2_concat(goal.args, rope, at, choice)


def solve2_concat(args, rope, at, choice):
    text = deref(args[2])
    mark = trail
    while at <= len(text):
        if unify(args[0], text[0:at]) and \
                unify(args[1], text[at:]):
            at += 1
            if at <= len(text):
                if choice is None:
                    choice = Choice(solve_concat, None, at, mark)
                else:
                    choice.at = at
                more(choice)
            cont(call.args[1])
            return True
        unbind(mark)
        at += 1
    return False



def special_sys_atom_match(args):
    text = deref(args[0])
    check_atom(text)
    part = deref(args[1])
    check_atom(part)
    alpha = deref(args[2])
    if is_variable(alpha):
        return solve2_match(args, None, 0, None)
    else:
        check_integer(alpha)
        if alpha < 0 or alpha > len(text):
            return False
        if not text.startswith(part, alpha):
            return False
    cont(call.args[1])
    return True


def solve_match(rope, at, choice):
    goal = deref(call.args[0])
    return solve2_match(goal.args, rope, at, choice)


def solve2_match(args, rope, at, choice):
    text = deref(args[0])
    part = deref(args[1])
    mark = trail
    while at + len(part) <= len(text):
        at = text.find(part, at)
        if at < 0:
            return False
        if unify(args[2], at):
            at += 1
            if at + len(part) <= len(text):
                if choice is None:
                    choice = Choice(solve_match, None, at, mark)
                else:
                    choice.at = at
                more(choice)
            cont(call.args[1])
            return True
        unbind(mark)
        at += 1
    return False


def special_sys_atom_part(args):
    text = deref(args[0])
    check_atom(text)
    alpha = deref(args[1])
    if is_variable(alpha):
        beta = deref(args[2])
        check_integer(beta)
        if beta < 0 or beta > len(text):
            return False
        return solve2_part(args, 0, beta, None)
    else:
        check_integer(alpha)
        beta = deref(args[2])
        check_integer(beta)
        if alpha < 0 or alpha > len(text):
            return False
        if beta < 0 or alpha+beta > len(text):
            return False
        if not unify(args[3], text[alpha:alpha+beta]):
            return False
    cont(call.args[1])
    return True


def solve_part(rope, at, choice):
    goal = deref(call.args[0])
    return solve2_part(goal.args, rope, at, choice)


def solve2_part(args, alpha, beta, choice):
    text = deref(args[0])
    mark = trail
    while beta <= len(text):
        if unify(args[1], alpha) and \
                unify(args[3], text[alpha:beta]):
            alpha += 1
            beta += 1
            if beta <= len(text):
                if choice is None:
                    choice = Choice(solve_part, alpha, beta, mark)
                else:
                    choice.data = alpha
                    choice.at = beta
                more(choice)
            cont(call.args[1])
            return True
        unbind(mark)
        alpha += 1
        beta += 1
    return False



def special_sys_last_atom_match(args):
    text = deref(args[0])
    check_atom(text)
    part = deref(args[1])
    check_atom(part)
    alpha = deref(args[2])
    if is_variable(alpha):
        return solve2_last_match(args, None, len(text)-len(part), None)
    else:
        check_integer(alpha)
        if alpha < 0 or alpha > len(text):
            return False
        if not text.startswith(part, alpha):
            return False
    cont(call.args[1])
    return True


def solve_last_match(rope, at, choice):
    goal = deref(call.args[0])
    return solve2_last_match(goal.args, rope, at, choice)


def solve2_last_match(args, rope, at, choice):
    text = deref(args[0])
    part = deref(args[1])
    mark = trail
    while at >= 0:
        at = text.rfind(part, 0, at+len(part))
        if at < 0:
            return False
        if unify(args[2], at):
            at -= 1
            if at >= 0:
                if choice is None:
                    choice = Choice(solve_last_match, None, at, mark)
                else:
                    choice.at = at
                more(choice)
            cont(call.args[1])
            return True
        unbind(mark)
        at -= 1
    return False


def special_sys_last_atom_part(args):
    text = deref(args[0])
    check_atom(text)
    alpha = deref(args[1])
    if is_variable(alpha):
        beta = deref(args[2])
        check_integer(beta)
        if beta < 0 or beta > len(text):
            return False
        return solve2_last_part(args, len(text)-beta, len(text), None)
    else:
        check_integer(alpha)
        beta = deref(args[2])
        check_integer(beta)
        if alpha < 0 or alpha > len(text):
            return False
        if beta < 0 or alpha+beta > len(text):
            return False
        if not unify(args[3], text[alpha:alpha+beta]):
            return False
    cont(call.args[1])
    return True


def solve_last_part(rope, at, choice):
    goal = deref(call.args[0])
    return solve2_last_part(goal.args, rope, at, choice)


def solve2_last_part(args, alpha, beta, choice):
    text = deref(args[0])
    mark = trail
    while alpha >= 0:
        if unify(args[1], alpha) and \
                unify(args[3], text[alpha:beta]):
            alpha -= 1
            beta -= 1
            if alpha >= 0:
                if choice is None:
                    choice = Choice(solve_last_part, alpha, beta, mark)
                else:
                    choice.data = alpha
                    choice.at = beta
                more(choice)
            cont(call.args[1])
            return True
        unbind(mark)
        alpha -= 1
        beta -= 1
    return False



set("is", 2, make_check(test_eval))
set("-", 2, make_arithmetic(arit_neg))
set("abs", 2, make_arithmetic(arit_abs))
set("sign", 2, make_arithmetic(arit_sign))

set("+", 3, make_arithmetic(arit_add))
set("-", 3, make_arithmetic(arit_sub))
set("*", 3, make_arithmetic(arit_mul))
set("/", 3, make_arithmetic(arit_quot))
set("//", 3, make_arithmetic(arit_intquot))
set("rem", 3, make_arithmetic(arit_rem))

set("float", 2, make_arithmetic(arit_float))
set("^", 3, make_arithmetic(arit_intpow))
set("div", 3, make_arithmetic(arit_div))
set("mod", 3, make_arithmetic(arit_mod))

set("min", 3, make_arithmetic(arit_min))
set("max", 3, make_arithmetic(arit_max))
set("inf", 1, make_arithmetic(arit_inf))
set("nan", 1, make_arithmetic(arit_nan))

set("truncate", 2, make_arithmetic(arit_truncate))
set("floor", 2, make_arithmetic(arit_floor))
set("ceiling", 2, make_arithmetic(arit_ceiling))
set("round", 2, make_arithmetic(arit_round))

set("=:=", 2, make_check(test_numberequal))
set("=\\=", 2, make_check(test_numbernotequal))
set("<", 2, make_check(test_numberless))
set(">=", 2, make_check(test_numbergreaterequal))
set(">", 2, make_check(test_numbergreater))
set("=<", 2, make_check(test_numberlessequal))

set("sin", 2, make_arithmetic(arit_sin))
set("cos", 2, make_arithmetic(arit_cos))
set("tan", 2, make_arithmetic(arit_tan))
set("asin", 2, make_arithmetic(arit_asin))
set("acos", 2, make_arithmetic(arit_acos))
set("atan", 2, make_arithmetic(arit_atan))
set("pi", 1, make_arithmetic(arit_pi))

set("**", 3, make_arithmetic(arit_pow))
set("exp", 2, make_arithmetic(arit_exp))
set("log", 2, make_arithmetic(arit_log))
set("sqrt", 2, make_arithmetic(arit_sqrt))
set("e", 1, make_arithmetic(arit_e))
set("epsilon", 1, make_arithmetic(arit_epsilon))
set("atan2", 3, make_arithmetic(arit_atan2))

set("\\", 2, make_arithmetic(arit_not))
set("/\\", 3, make_arithmetic(arit_and))
set("\\/", 3, make_arithmetic(arit_or))
set("xor", 3, make_arithmetic(arit_xor))
set(">>", 3, make_arithmetic(arit_shiftright))
set("<<", 3, make_arithmetic(arit_shiftleft))

set("==", 2, make_check(test_equal))
set("\\==", 2, make_check(test_notequal))
set("term_hash", 2, make_check(test_term_hash))

set("atom_codes", 2, make_check(test_atom_codes))
set("char_code", 2, make_check(test_char_code))
set("atom_length", 2, make_check(test_atom_length))
set("atom_join", 2, make_check(test_atom_join))

set("atom_concat", 3, make_special(special_atom_concat))
set("sys_atom_match", 3, make_special(special_sys_atom_match))
set("sys_atom_part", 4, make_special(special_sys_atom_part))
set("sys_last_atom_match", 3, make_special(special_sys_last_atom_match))
set("sys_last_atom_part", 4, make_special(special_sys_last_atom_part))

import asyncio
import os
import sys
import calendar
import urllib.request
import urllib.error
import http.client
import time
import locale
import platform


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))
    set(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",
                ["modify", "field", 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",
                ["modify", "field", 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 = beta if is_special(beta) else (
            norm_float(narrow_float(beta)))
        return exec_unify(alpha, res)
    else:
        alpha = exec_build(alpha)
        check_number(alpha)
        res = alpha if is_special(alpha) else (
            narrow_float(alpha))
        return exec_unify(args[1], res)



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



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)


def test_os_get_host(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_get_flags(args):
    return exec_unify(args[0], engine.flags)


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



set("ir_object_new", 1, make_check(test_ir_object_new))
set("ir_object_current", 3, make_check(test_ir_object_current))
set("ir_object_set", 3, make_check(test_ir_object_set))
set("ir_object_reset", 2, make_check(test_ir_object_reset))
set("ir_object_keys", 2, make_check(test_ir_object_keys))

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

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

set("net_open_promise", 4, make_check(test_net_open_promise))
set("net_prop_promise", 3, make_check(test_net_prop_promise))

set("net_open_sync", 4, make_check(test_net_open_sync))
set("net_cntrl_sync", 2, make_check(test_net_cntrl_sync))

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

set("os_get_gestalt", 1, make_check(test_os_get_gestalt))
set("os_get_host", 1, make_check(test_os_get_host))
set("os_get_workdir", 1, make_check(test_os_get_workdir))
set("os_set_workdir", 1, make_check(test_os_set_workdir))

set("dg_get_flags", 1, make_check(test_dg_get_flags))
set("dg_get_partition", 1, make_check(test_dg_get_partition))
set("dg_set_partition", 1, make_check(test_dg_set_partition))
set("dg_clear_stage", 0, make_check(test_dg_clear_stage))
set("dg_get_stage", 1, make_check(test_dg_get_stage))
set("dg_set_stage", 1, make_check(test_dg_set_stage))

import math

add(Clause(1, "sys_trans_horn", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(5, "sys_trans_horn", [Skeleton(":-", [Place(1)]), Skeleton("tr_goal", [Place(2), Place(3)]), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(2), Place(4), Place(3), "[]"])], 0))
add(Clause(6, "sys_trans_horn", [Skeleton(":-", [Place(1), Place(2)]), Skeleton("tr_clause", [Place(3), Place(1), Place(4)]), Place(5)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("must_be"), ["callable", Place(1)]), Skeleton(Cache("sys_trans_body"), [Place(2), "nothing", Place(3), Place(5), Place(4), "[]"])], 0))
add(Clause(1, "sys_trans_horn", [Place(0), Skeleton("tr_clause", ["nothing", Place(0), "[]"]), NotImplemented], [Skeleton(Cache("must_be"), ["callable", Place(0)])], -1))
add(Clause(5, "sys_trans_body", [Place(1), Place(2), Place(2), NotImplemented, 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))
add(Clause(4, "sys_trans_body", ["true", Place(1), Place(1), NotImplemented, Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0))
add(Clause(10, "sys_trans_body", [Skeleton(",", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(3), Place(8), Place(5), Place(6), Place(9)]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(8), Place(4), Place(5), Place(9), Place(7)])], 0))
add(Clause(5, "sys_trans_body", ["!", Place(1), Skeleton("just", [Place(2)]), NotImplemented, 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(Clause(9, "sys_trans_body", [Skeleton(";", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_disj"), [Skeleton(";", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(5), Place(8)]), Skeleton(Cache("="), [Place(6), Skeleton(".", [Skeleton("$ALT", [Place(8)]), Place(7)])])], 0))
add(Clause(9, "sys_trans_body", [Skeleton("->", [Place(1), Place(2)]), Place(3), Place(4), Place(5), Place(6), Place(7)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_disj"), [Skeleton("->", [Place(1), Place(2)]), 0, Place(3), Place(4), Place(5), Place(8)]), Skeleton(Cache("="), [Place(6), Skeleton(".", [Skeleton("$ALT", [Place(8)]), Place(7)])])], 0))
add(Clause(6, "sys_trans_body", [Skeleton("\\+", [Place(1)]), Place(2), Place(3), 1, Place(4), Place(5)], [Skeleton(Cache("sys_safe_meta"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Skeleton(";", [Skeleton("->", [Place(1), "fail"]), "true"]), Place(2), Place(3), 1, Place(4), Place(5)])], 0))
add(Clause(6, "sys_trans_body", [Skeleton("once", [Place(1)]), Place(2), Place(3), 1, Place(4), Place(5)], [Skeleton(Cache("sys_safe_meta"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Skeleton("->", [Place(1), "true"]), Place(2), Place(3), 1, Place(4), Place(5)])], 0))
add(Clause(4, "sys_trans_body", [Place(0), Place(1), Place(1), NotImplemented, Place(2), Place(3)], [Skeleton(Cache("must_be"), ["callable", Place(0)]), Skeleton(Cache("="), [Place(2), Skeleton(".", [Place(0), Place(3)])])], -1))
add(Clause(1, "sys_trans_cut", ["nothing", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_trans_cut", [Skeleton("just", [Place(0)]), Place(0)], [], -1))
add(Clause(6, "sys_trans_disj", [Place(1), NotImplemented, Place(2), Place(3), Place(4), Skeleton(".", [Place(5), "[]"])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alter"), [Place(1), Place(2), Place(3), Place(5), Place(4), NotImplemented])], 0))
add(Clause(10, "sys_trans_disj", [Skeleton(";", [Place(1), Place(2)]), NotImplemented, Place(3), Place(4), Place(5), Skeleton(".", [Place(6), Place(7)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_alter"), [Place(1), Place(3), Place(8), Place(6), Place(5), Place(9)]), Skeleton(Cache("sys_trans_disj"), [Place(2), Place(9), Place(8), Place(4), Place(5), Place(7)])], 0))
add(Clause(2, "sys_trans_disj", ["fail", 1, Place(1), Place(1), NotImplemented, "[]"], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_trans_disj", [Place(0), NotImplemented, Place(1), Place(2), Place(3), Skeleton(".", [Place(4), "[]"])], [Skeleton(Cache("sys_trans_alter"), [Place(0), Place(1), Place(2), Place(4), Place(3), NotImplemented])], -1))
add(Clause(6, "sys_trans_alter", [Place(1), Place(2), Place(3), Skeleton("$SEQ", ["nothing", Place(4)]), Place(5), 0], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(2), Place(3), Place(5), Place(4), "[]"])], 0))
add(Clause(11, "sys_trans_alter", [Skeleton("->", [Place(1), Place(2)]), Place(3), Place(4), Skeleton("$SEQ", [Skeleton("just", [Place(5)]), Place(6)]), Place(7), 1], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(8), Place(7), Place(9), Skeleton(".", [Skeleton("$CUT", [Place(5)]), Place(10)])]), Skeleton(Cache("sys_trans_body"), [Place(2), Place(3), Place(4), Place(7), Place(10), "[]"]), Skeleton(Cache("sys_trans_mark"), [Place(8), Place(6), Place(9)])], 0))
add(Clause(5, "sys_trans_alter", [Place(0), Place(1), Place(2), Skeleton("$SEQ", ["nothing", Place(3)]), Place(4), 0], [Skeleton(Cache("sys_trans_body"), [Place(0), Place(1), Place(2), Place(4), Place(3), "[]"])], -1))
add(Clause(3, "sys_trans_mark", [Skeleton("just", [Place(1)]), Skeleton(".", [Skeleton("$MARK", [Place(1)]), Place(2)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_trans_mark", ["nothing", Place(0), Place(0)], [], -1))
add(Clause(2, "sys_safe_meta", [Place(1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(3, "sys_safe_meta", [Skeleton(",", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_meta"), [Place(1)]), Skeleton(Cache("sys_safe_meta"), [Place(2)])], 0))
add(Clause(3, "sys_safe_meta", [Skeleton(";", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_meta"), [Place(1)]), Skeleton(Cache("sys_safe_meta"), [Place(2)])], 0))
add(Clause(3, "sys_safe_meta", [Skeleton("->", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_meta"), [Place(1)]), Skeleton(Cache("sys_safe_meta"), [Place(2)])], 0))
add(Clause(1, "sys_safe_meta", [Place(0)], [Skeleton(Cache("callable"), [Place(0)])], -1))
add(Clause(0, "sys_untrans_body", ["[]", NotImplemented, NotImplemented, "true"], [], -1))
add(Clause(6, "sys_untrans_body", [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_untrans_goal"), [Place(0), Place(2), Place(3), Place(5)]), Skeleton(Cache("sys_untrans_rest"), [Place(1), Place(5), Place(2), Place(3), Place(4)])], -1))
add(Clause(5, "sys_untrans_rest", [Place(1), Skeleton(";", [Skeleton("->", [Place(2), "fail"]), "true"]), Place(3), 1, Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_untrans_rest"), [Place(1), Skeleton("\\+", [Place(2)]), Place(3), 1, Place(4)])], 0))
add(Clause(5, "sys_untrans_rest", [Place(1), Skeleton("->", [Place(2), "true"]), Place(3), 1, Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_untrans_rest"), [Place(1), Skeleton("once", [Place(2)]), Place(3), 1, Place(4)])], 0))
add(Clause(1, "sys_untrans_rest", ["[]", Place(0), NotImplemented, NotImplemented, Place(0)], [], -1))
add(Clause(7, "sys_untrans_rest", [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Place(4), Skeleton(",", [Place(2), Place(5)])], [Skeleton(Cache("sys_untrans_goal"), [Place(0), Place(3), Place(4), Place(6)]), Skeleton(Cache("sys_untrans_rest"), [Place(1), Place(6), Place(3), Place(4), Place(5)])], -1))
add(Clause(3, "sys_untrans_goal", [Skeleton("$CUT", [Place(1)]), Skeleton("just", [Place(2)]), NotImplemented, "!"], [Skeleton(Cache("=="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_untrans_goal", [Skeleton("$ALT", [Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_untrans_disj"), [Place(1), Place(2), Place(3), Place(4)])], 0))
add(Clause(1, "sys_untrans_goal", [Place(0), NotImplemented, NotImplemented, Place(0)], [], -1))
add(Clause(0, "sys_untrans_disj", ["[]", NotImplemented, NotImplemented, "fail"], [], -1))
add(Clause(5, "sys_untrans_disj", [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_untrans_more"), [Place(1), Place(0), Place(2), Place(3), Place(4)])], -1))
add(Clause(5, "sys_untrans_more", ["[]", Skeleton("$SEQ", [Place(0), Place(1)]), Place(2), Place(3), Place(4)], [Skeleton(Cache("sys_untrans_alter"), [Place(0), Place(1), Place(2), Place(3), Place(4)])], -1))
add(Clause(8, "sys_untrans_more", [Skeleton(".", [Place(0), Place(1)]), Skeleton("$SEQ", [Place(2), Place(3)]), Place(4), Place(5), Skeleton(";", [Place(6), Place(7)])], [Skeleton(Cache("sys_untrans_alter"), [Place(2), Place(3), Place(4), Place(5), Place(6)]), Skeleton(Cache("sys_untrans_more"), [Place(1), Place(0), Place(4), Place(5), Place(7)])], -1))
add(Clause(5, "sys_untrans_alter", ["nothing", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_untrans_body"), [Place(0), Place(1), Place(2), Place(4)]), Skeleton(Cache("sys_untrans_ambiguity"), [Place(4), Place(3)])], -1))
add(Clause(10, "sys_untrans_alter", [Skeleton("just", [Place(0)]), Place(1), Place(2), Place(3), Skeleton("->", [Place(4), Place(5)])], [Skeleton(Cache("sys_untrans_split"), [Place(1), Place(0), Place(6), Place(7)]), Skeleton(Cache("sys_trans_mark"), [Place(8), Place(6), Place(9)]), Skeleton(Cache("sys_untrans_body"), [Place(9), Place(8), Place(3), Place(4)]), Skeleton(Cache("sys_untrans_body"), [Place(7), Place(2), Place(3), Place(5)])], -1))
add(Clause(4, "sys_untrans_split", [Skeleton(".", [Skeleton("$CUT", [Place(1)]), Place(2)]), Place(3), "[]", Place(2)], [Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_untrans_split", [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(Clause(3, "sys_untrans_ambiguity", [Skeleton("->", [Place(1), Place(2)]), Skeleton(";", [Skeleton("->", [Place(1), Place(2)]), "fail"])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_untrans_ambiguity", [Place(0), Place(0)], [], -1))
add(Clause(2, "sys_encode_horn", [Place(1), Place(1), 0], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_encode_horn", [Skeleton("tr_goal", [Place(0), Place(1)]), Skeleton("tr_goal", [Place(0), Place(2)]), NotImplemented], [Skeleton(Cache("sys_encode_body"), [Place(1), Place(2), Place(0)])], -1))
add(Clause(4, "sys_encode_horn", [Skeleton("tr_clause", [Place(0), Place(1), Place(2)]), Skeleton("tr_clause", [Place(0), Place(1), Place(3)]), NotImplemented], [Skeleton(Cache("sys_encode_body"), [Place(2), Place(3), Skeleton("-", [Place(0), Place(1)])])], -1))
add(Clause(0, "sys_meta_args", ["is", 2, Frozen(".", ["t", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["=:=", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["=\\=", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["<", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["=<", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", [">", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", [">=", 2, Frozen(".", ["e", Frozen(".", ["e", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["\\+", 1, Frozen(".", ["p", "[]"])], [], -1))
add(Clause(0, "sys_meta_args", ["once", 1, Frozen(".", ["p", "[]"])], [], -1))
add(Clause(0, "sys_meta_args", ["asserta", 1, Frozen(".", ["c", "[]"])], [], -1))
add(Clause(0, "sys_meta_args", ["assertz", 1, Frozen(".", ["c", "[]"])], [], -1))
add(Clause(0, "sys_meta_args", ["clause", 2, Frozen(".", ["p", Frozen(".", ["t", "[]"])])], [], -1))
add(Clause(0, "sys_meta_args", ["retract", 1, Frozen(".", ["c", "[]"])], [], -1))
add(Clause(0, "sys_meta_args", ["retractall", 1, Frozen(".", ["p", "[]"])], [], -1))
add(Clause(0, "sys_encode_body", ["[]", "[]", NotImplemented], [], -1))
add(Clause(5, "sys_encode_body", [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Place(4)], [Skeleton(Cache("sys_encode_goal"), [Place(0), Place(2), Skeleton("-", [Place(1), Place(4)])]), Skeleton(Cache("sys_encode_body"), [Place(1), Place(3), Skeleton(".", [Place(0), Place(4)])])], -1))
add(Clause(2, "sys_encode_goal", [Place(1), Place(1), NotImplemented], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(7, "sys_encode_goal", [Skeleton("$ALT", [Place(1)]), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("vars_intersection"), [Place(1), Place(3), Place(4)]), Skeleton(Cache("=.."), [Place(5), Skeleton(".", ["", Place(4)])]), Skeleton(Cache("sys_encode_disj"), [Place(1), Place(5), Place(6)]), Skeleton(Cache("sys_encode_link"), [Place(5), Place(2), Place(6)])], 0))
add(Clause(7, "sys_encode_goal", [Place(1), Place(2), Place(3)], [Skeleton(Cache("functor"), [Place(1), Place(4), Place(5)]), Skeleton(Cache("sys_meta_args"), [Place(4), Place(5), Place(6)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_encode_meta"), [Place(6), Place(1), Place(2), Place(3)])], 0))
add(Clause(2, "sys_encode_goal", [Place(0), Place(1), NotImplemented], [Skeleton(Cache("ir_site_new"), [Place(0), Place(1)])], -1))
add(Clause(7, "sys_encode_disj", [Skeleton(".", [Skeleton("$SEQ", [Place(0), Place(1)]), Place(2)]), Place(3), Skeleton(".", [Place(4), Place(5)])], [Skeleton(Cache("sys_encode_horn"), [Skeleton("tr_clause", [Place(0), Place(3), Place(1)]), Place(6), 1]), Skeleton(Cache("sys_host_ossify"), [Place(6), Place(4)]), Skeleton(Cache("sys_encode_disj"), [Place(2), Place(3), Place(5)])], -1))
add(Clause(0, "sys_encode_disj", ["[]", NotImplemented, "[]"], [], -1))
add(Clause(5, "sys_encode_link", [Place(0), Place(1), Place(2)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [NotImplemented, Place(3)])]), Skeleton(Cache("ir_link_new"), [Place(2), Place(4)]), Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(4), Place(3)])])], -1))
add(Clause(8, "sys_encode_meta", [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(4), Place(5)])]), Skeleton(Cache("sys_encode_params"), [Place(0), Place(5), Place(6), Place(3)]), Skeleton(Cache("=.."), [Place(7), Skeleton(".", [Place(4), Place(6)])]), Skeleton(Cache("ir_site_new"), [Place(7), Place(2)])], -1))
add(Clause(0, "sys_encode_params", ["[]", "[]", "[]", NotImplemented], [], -1))
add(Clause(7, "sys_encode_params", [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Skeleton(".", [Place(4), Place(5)]), Place(6)], [Skeleton(Cache("sys_encode_param"), [Place(0), Place(2), Place(4), Place(6)]), Skeleton(Cache("sys_encode_params"), [Place(1), Place(3), Place(5), Place(6)])], -1))
add(Clause(1, "sys_encode_param", ["t", Place(0), Place(0), NotImplemented], [], -1))
add(Clause(2, "sys_encode_param", ["e", Place(0), Place(1), NotImplemented], [Skeleton(Cache("sys_encode_expr"), [Place(0), Place(1)])], -1))
add(Clause(2, "sys_encode_param", ["c", Place(0), Place(1), NotImplemented], [Skeleton(Cache("sys_encode_clause"), [Place(0), Place(1)])], -1))
add(Clause(3, "sys_encode_param", ["p", Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_encode_goal"), [Place(0), Place(1), Place(2)])], -1))
add(Clause(7, "sys_encode_expr", [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_encode_args"), [Place(4), Place(5)]), Skeleton(Cache("=.."), [Place(6), Skeleton(".", [Place(3), Place(5)])]), Skeleton(Cache("ir_site_new"), [Place(6), Place(2)])], 0))
add(Clause(2, "sys_encode_expr", [Place(0), Place(1)], [Skeleton(Cache("ir_site_new"), [Place(0), Place(1)])], -1))
add(Clause(0, "sys_encode_args", ["[]", "[]"], [], -1))
add(Clause(4, "sys_encode_args", [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("sys_encode_expr"), [Place(0), Place(2)]), Skeleton(Cache("sys_encode_args"), [Place(1), Place(3)])], -1))
add(Clause(5, "sys_encode_clause", [Place(1), Skeleton(":-", [Place(2), Place(3)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(4), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_new"), [Place(4), Place(2)])], 0))
add(Clause(2, "sys_encode_clause", [Place(0), Place(1)], [Skeleton(Cache("ir_site_new"), [Place(0), Place(1)])], -1))
add(Clause(0, "sys_decode_body", ["[]", "[]"], [], -1))
add(Clause(4, "sys_decode_body", [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(Clause(2, "sys_decode_goal", [Place(1), Place(1)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(4, "sys_decode_goal", [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))
add(Clause(5, "sys_decode_goal", [Place(1), Skeleton("$ALT", [Place(2)])], [Skeleton(Cache("ir_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), Place(1), Place(2)])], 0))
add(Clause(6, "sys_decode_goal", [Place(1), Place(2)], [Skeleton(Cache("functor"), [Place(1), Place(3), Place(4)]), Skeleton(Cache("sys_meta_args"), [Place(3), Place(4), Place(5)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_decode_meta"), [Place(5), Place(1), Place(2)])], 0))
add(Clause(1, "sys_decode_goal", [Place(0), Place(0)], [], -1))
add(Clause(0, "sys_decode_disj", ["[]", NotImplemented, "[]"], [], -1))
add(Clause(7, "sys_decode_disj", [Skeleton(".", [Place(0), Place(1)]), Place(2), Skeleton(".", [Skeleton("$SEQ", [Place(3), Place(4)]), Place(5)])], [Skeleton(Cache("kb_clause_data"), [Place(0), Place(2), Place(3), Place(6)]), Skeleton(Cache("sys_decode_body"), [Place(6), Place(4)]), Skeleton(Cache("sys_decode_disj"), [Place(1), Place(2), Place(5)])], -1))
add(Clause(6, "sys_decode_meta", [Place(0), Place(1), Place(2)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(3), Place(4)])]), Skeleton(Cache("sys_decode_params"), [Place(0), Place(4), Place(5)]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(3), Place(5)])])], -1))
add(Clause(0, "sys_decode_params", ["[]", "[]", "[]"], [], -1))
add(Clause(6, "sys_decode_params", [Skeleton(".", [Place(0), Place(1)]), Skeleton(".", [Place(2), Place(3)]), Skeleton(".", [Place(4), Place(5)])], [Skeleton(Cache("sys_decode_param"), [Place(0), Place(2), Place(4)]), Skeleton(Cache("sys_decode_params"), [Place(1), Place(3), Place(5)])], -1))
add(Clause(1, "sys_decode_param", ["t", Place(0), Place(0)], [], -1))
add(Clause(2, "sys_decode_param", ["e", Place(0), Place(1)], [Skeleton(Cache("sys_decode_expr"), [Place(0), Place(1)])], -1))
add(Clause(2, "sys_decode_param", ["c", Place(0), Place(1)], [Skeleton(Cache("sys_decode_clause"), [Place(0), Place(1)])], -1))
add(Clause(2, "sys_decode_param", ["p", Place(0), Place(1)], [Skeleton(Cache("sys_decode_goal"), [Place(0), Place(1)])], -1))
add(Clause(7, "sys_decode_expr", [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(6), Skeleton(".", [Place(3), Place(5)])]), Skeleton(Cache("ir_site_name"), [Place(6), Place(2)])], 0))
add(Clause(2, "sys_decode_expr", [Place(0), Place(1)], [Skeleton(Cache("ir_site_name"), [Place(0), Place(1)])], -1))
add(Clause(0, "sys_decode_args", ["[]", "[]"], [], -1))
add(Clause(4, "sys_decode_args", [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(Clause(5, "sys_decode_clause", [Place(1), Skeleton(":-", [Place(2), Place(3)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(4), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("ir_site_name"), [Place(4), Place(2)])], 0))
add(Clause(2, "sys_decode_clause", [Place(0), Place(1)], [Skeleton(Cache("ir_site_name"), [Place(0), Place(1)])], -1))
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(Clause(1, "current_source", [Place(0)], [Skeleton(Cache("sys_source"), [Place(0), NotImplemented, NotImplemented])], -1))
add(Clause(2, "source_property", [Place(0), Place(1)], [Skeleton(Cache("sys_srcprop"), [Place(0), Place(1)])], -1))
add(Clause(4, "discontiguous", [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(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_discontiguous", [Place(3)])])])], 0))
add(Clause(1, "discontiguous", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(3, "multifile", [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(Clause(1, "multifile", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(3, "sys_multifile_safe", [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(make_defined([Clause(4, "", [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_multifile", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented, NotImplemented, NotImplemented], [], -1)]), [Place(1), Place(2), Place(4)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["promote", "multifile", Skeleton("/", [Place(1), Place(2)])]), NotImplemented])])], 0), Clause(0, "", [NotImplemented, NotImplemented, NotImplemented], [], -1)]), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), Skeleton("sys_multifile", [Place(2)])])])], -1))
add(Clause(3, "include", [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))
add(Clause(2, "sys_include_file", ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("sys_include_stream"), ["user", Place(1)])], 0))
add(Clause(5, "sys_include_file", [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))
add(Clause(2, "sys_include_file", [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))
add(Clause(4, "sys_include_native", [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))
add(Clause(2, "sys_include_native", [Place(0), Place(1)], [Skeleton(Cache("os_import_sync"), [Place(0), Place(1)])], -1))
add(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))
add(Clause(0, ".", [NotImplemented, NotImplemented], [], -1))
add(Clause(1, "ensure_loaded", [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(1, "ensure_loaded", ["user"], [Skeleton(Cache("$CUT"), [Place(0)]), Frozen(Cache("sys_include_file"), ["user"])], 0))
add(Clause(5, "ensure_loaded", [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), Clause(2, "", [Place(0), Place(1)], [Skeleton(Cache("assertz"), [Skeleton(Cache("sys_srcprop"), [Place(0), Skeleton("sys_link", [Place(1)])])])], -1)]), [Place(2), Place(4)]), Skeleton(Cache("sys_check_file"), [Place(4), Place(3)])], -1))
add(Clause(4, "sys_check_file", [Place(1), Place(2)], [Skeleton(Cache("shield"), [Skeleton("sys_action_file", [Place(1), Place(2), Place(3)])]), 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), 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), Clause(0, "", [NotImplemented, NotImplemented], [], -1)]), [Place(3), Place(1)])], 0))
add(Clause(1, "sys_check_file", [Place(0), NotImplemented], [Skeleton(Cache("sys_load_file"), [Place(0)])], -1))
add(Clause(6, "sys_action_file", [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), Clause(5, "", [NotImplemented, Place(0), Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(3, "", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prop_map"), [Place(2), Place(1)])], 0), Clause(0, "", [NotImplemented, NotImplemented], [], -1)]), [Place(1), Place(2)]), Skeleton(Cache("ir_object_current"), [Place(1), "last_modified", Place(4)]), 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("="), [Place(3), "replay"]), Skeleton(Cache("retractall"), [Skeleton(Cache("sys_source"), [Place(4), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_source"), [Place(4), Place(2), 1])])], 0), Clause(3, "", [Place(0), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("="), [Place(1), "clear_load"]), Skeleton(Cache("retractall"), [Skeleton(Cache("sys_source"), [Place(2), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_source"), [Place(2), Place(0), 1])])], -1)]), [Place(4), Place(3), Place(0), Place(2)])], -1)]), [Place(5), Place(3), Place(2), Place(1), Place(4)])], 0))
add(Clause(3, "sys_action_file", [Place(0), Place(1), NotImplemented], [Skeleton(make_defined([Clause(3, "", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_prop_map"), [Place(2), Place(1)])], 0), Clause(0, "", [NotImplemented, NotImplemented], [], -1)]), [Place(1), Place(0)]), Skeleton(Cache("ir_object_current"), [Place(1), "last_modified", Place(2)]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_source"), [Place(0), Place(2), 1])]), Cache("fail")], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_lastpred", 3, 1])], -1))
add(Clause(3, "sys_load_file", [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))
add(Clause(6, "sys_loading_begin", [Place(1), Place(2), Skeleton("just", [Place(3), Place(4)])], [Skeleton(Cache("current_task"), [Place(5)]), Skeleton(Cache("retract"), [Skeleton(Cache("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))
add(Clause(2, "sys_loading_begin", [Place(0), Place(1), "nothing"], [Skeleton(Cache("dg_get_partition"), [Place(1)]), Skeleton(Cache("dg_set_partition"), [Place(0)])], -1))
add(Clause(4, "sys_loading_end", [Place(0), Skeleton("just", [Place(1), Place(2)])], [Skeleton(Cache("dg_get_partition"), [Place(3)]), Skeleton(Cache("retractall"), [Skeleton(Cache("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))
add(Clause(3, "sys_loading_end", [Place(0), "nothing"], [Skeleton(Cache("dg_get_partition"), [Place(1)]), Skeleton(Cache("retractall"), [Skeleton(Cache("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(Cache("sys_lastpred"), [Place(2), NotImplemented, NotImplemented])])], -1))
add(Clause(3, "sys_update_last", [Place(0), Place(1)], [Skeleton(Cache("current_task"), [Place(2)]), Skeleton(Cache("retractall"), [Skeleton(Cache("sys_lastpred"), [Place(2), NotImplemented, NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_lastpred"), [Place(2), Place(0), Place(1)])])], -1))
add(Clause(2, "sys_style_static", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [NotImplemented])]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_style_static", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(2), NotImplemented])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_style_head"), [Place(2)])], 0))
add(Clause(1, "sys_style_static", [Place(0)], [Skeleton(Cache("sys_style_head"), [Place(0)])], -1))
add(Clause(4, "sys_style_head", [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))
add(Clause(0, "sys_style_head", [NotImplemented], [], -1))
add(Clause(4, "sys_style_indicator", [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))
add(Clause(4, "sys_style_indicator", [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), 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)]), [Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_update_last"), [Place(1), Place(2)])], 0))
add(Clause(2, "sys_style_indicator", [Place(0), Place(1)], [Skeleton(Cache("sys_usage_predicate"), [Place(0), Place(1)]), Skeleton(Cache("sys_update_last"), [Place(0), Place(1)])], -1))
add(Clause(3, "sys_usage_predicate", [Place(0), Place(1)], [Skeleton(Cache("dg_get_partition"), [Place(2)]), Skeleton(make_defined([Clause(5, "", [Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(4, "", [Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_predprop"), [Place(1), Place(2), Skeleton("sys_multifile", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented, NotImplemented, NotImplemented], [], -1)]), [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("$CUT"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("permission_error", ["redefine", "procedure", Skeleton("/", [Place(1), Place(2)])]), NotImplemented])])], 0), Clause(0, "", [NotImplemented, NotImplemented, NotImplemented], [], -1)]), [Place(0), Place(1), Place(2)]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), Skeleton("sys_usage", [Place(2)])])])], -1))
add(Clause(3, "sys_include_stream", [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))
add(Clause(3, "sys_include_lines", [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))
add(Clause(4, "sys_next_term", [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), Clause(5, "", [Place(1), Place(2), NotImplemented], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton("?-", [Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_expand_unattended"), [Place(3), Place(2), Place(4)]), Skeleton(Cache("sys_query_unattended"), [Place(4), Place(2)]), Cache("fail")], 0), Clause(6, "", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_multiton_keys"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_multiton_check"), [Place(3)]), Skeleton(Cache("sys_singleton_keys"), [Place(2), Place(4)]), Skeleton(Cache("sys_singleton_check"), [Place(4)]), Skeleton(Cache("expand_term"), [Place(0), Place(5)]), Skeleton(Cache("sys_handle_clump"), [Place(5)]), Cache("fail")], -1)]), [Place(1), Place(2), Place(3)])], -1))
add(Clause(4, "sys_handle_clump", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(2), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_handle_clump"), [Place(2)]), Skeleton(Cache("sys_handle_clump"), [Place(3)])], 0))
add(Clause(2, "sys_handle_clump", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), "[]"]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_handle_clump", [Place(0)], [Skeleton(Cache("sys_style_static"), [Place(0)]), Skeleton(Cache("sys_handle_static"), [Place(0)])], -1))
add(Clause(3, "sys_handle_static", [Place(1)], [Skeleton(Cache("nonvar"), [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("sys_goal_call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0), Clause(0, "", [NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["directive_failed"]), NotImplemented])])], -1)]), [Place(2)])], 0))
add(Clause(7, "sys_handle_static", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(2), NotImplemented])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("functor"), [Place(2), Place(3), Place(4)]), Skeleton(Cache("sys_load_type"), [Place(3), Place(4), Place(5)]), Skeleton(Cache("sys_frost_horn"), [Place(1), Place(5), Place(6)]), Skeleton(Cache("sys_clause_add"), [Place(6), 2])], 0))
add(Clause(5, "sys_handle_static", [Place(0)], [Skeleton(Cache("functor"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("sys_load_type"), [Place(1), Place(2), Place(3)]), Skeleton(Cache("sys_frost_horn"), [Place(0), Place(3), Place(4)]), Skeleton(Cache("sys_clause_add"), [Place(4), 2])], -1))
add(Clause(5, "sys_load_type", [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))
add(Clause(0, "sys_load_type", [NotImplemented, NotImplemented, 1], [], -1))
add(Clause(0, "strings", ["syntax_error.discontiguous_pred", "de", "Unterbrochenes Prädikat ~q, entsprechend deklarieren."], [], -1))
add(Clause(0, "strings", ["syntax_error.bad_module", "de", "Fehlerhaftes Modul."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.static_procedure", "de", "Kann Prädikat ~q nicht aktualisieren."], [], -1))
add(Clause(0, "strings", ["permission_error.coerce.procedure", "de", "Kann Prädikat ~q nicht zu anderen Delegiertentyp zwingen."], [], -1))
add(Clause(0, "strings", ["permission_error.access.private_procedure", "de", "Kann auf Prädikat ~q nicht zugreifen."], [], -1))
add(Clause(0, "strings", ["permission_error.redefine.procedure", "de", "Kann Prädikat ~q nicht umdefinieren, nicht als Mehrdateien markiert."], [], -1))
add(Clause(0, "strings", ["permission_error.promote.multifile", "de", "Kann Funktion ~q nicht zu Mehrdateien heben."], [], -1))
add(Clause(0, "strings", ["permission_error.create.operator", "de", "Kann Operator ~q nicht erstellen."], [], -1))
add(Clause(0, "strings", ["permission_error.invoke.method", "de", "Kann Methode ~q nicht aufrufen."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.field", "de", "Kann Feld ~q nicht aktualisieren."], [], -1))
add(Clause(0, "strings", ["permission_error.access.source_sink", "de", "Kann auf Strom ~q nicht zugreifen."], [], -1))
add(Clause(0, "strings", ["resource_error.unknown_host", "de", "Dienst nicht gefunden, Verzeichnisdienst aktivieren."], [], -1))
add(Clause(0, "strings", ["resource_error.connect_failed", "de", "Verbindung zu Dienst fehlgeschlagen, Verbindungsfähigkeit sicherstellen."], [], -1))
add(Clause(0, "strings", ["resource_error.illegal_method", "de", "Methode nicht zugelassen."], [], -1))
add(Clause(0, "strings", ["resource_error.internal_error", "de", "Interner Fehler, Administrator kontaktieren."], [], -1))
add(Clause(0, "strings", ["resource_error.service_unavailable", "de", "Dienst nicht verfügbar, später wieder versuchen."], [], -1))
add(Clause(0, "strings", ["resource_error.state_error", "de", "Übergang nicht erlaubt."], [], -1))
add(Clause(0, "strings", ["existence_error.method", "de", "Methode ~q undefiniert."], [], -1))
add(Clause(0, "strings", ["existence_error.procedure", "de", "Prädikat ~q undefiniert."], [], -1))
add(Clause(0, "strings", ["syntax_error.discontiguous_pred", "", "Discontiguous predicate ~q, declare accordingly."], [], -1))
add(Clause(0, "strings", ["syntax_error.bad_module", "", "Faulty module."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.static_procedure", "", "Can\'t modify predicate ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.coerce.procedure", "", "Can\'t coerce predicate ~q into other delegate type."], [], -1))
add(Clause(0, "strings", ["permission_error.access.private_procedure", "", "Can\'t access predicate ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.redefine.procedure", "", "Can\'t redefine predicate ~q, not marked multfile."], [], -1))
add(Clause(0, "strings", ["permission_error.promote.multifile", "", "Can\'t promote predicate ~q to multi-file."], [], -1))
add(Clause(0, "strings", ["permission_error.create.operator", "", "Can\'t create operator ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.invoke.method", "", "Can\'t invoke method ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.field", "", "Can\'t modify field ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.access.source_sink", "", "Can\'t access stream ~q."], [], -1))
add(Clause(0, "strings", ["resource_error.unknown_host", "", "Service lookup failed, enable directory service."], [], -1))
add(Clause(0, "strings", ["resource_error.connect_failed", "", "Service connect failed, assure connectivity."], [], -1))
add(Clause(0, "strings", ["resource_error.illegal_method", "", "Method not allowed."], [], -1))
add(Clause(0, "strings", ["resource_error.internal_error", "", "Internal error, contact administrator."], [], -1))
add(Clause(0, "strings", ["resource_error.service_unavailable", "", "Service unavailable, try again later."], [], -1))
add(Clause(0, "strings", ["resource_error.state_error", "", "Transition not permitted."], [], -1))
add(Clause(0, "strings", ["existence_error.method", "", "Undefined method ~q."], [], -1))
add(Clause(0, "strings", ["existence_error.procedure", "", "Undefined predicate ~q."], [], -1))
add(Clause(0, "true", [], [], -1))
add(Clause(1, "!", [], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(6, ",", [Place(0), Place(1)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(2), 0, Place(3), Place(4)]), Skeleton(Cache("sys_trans_body"), [Place(1), Place(2), Place(5), 0, Place(4), "[]"]), Skeleton(Cache("$SEQ"), [Place(5), Place(3)])], -1))
add(Clause(7, ";", [Place(0), Place(1)], [Skeleton(Cache("sys_trans_alter"), [Place(0), "nothing", Place(2), Place(3), 0, Place(4)]), Skeleton(Cache("sys_trans_disj"), [Place(1), Place(4), Place(2), Place(5), 0, Place(6)]), Skeleton(Cache("$SEQ"), [Place(5), Skeleton(".", [Skeleton("$ALT", [Skeleton(".", [Place(3), Place(6)])]), "[]"])])], -1))
add(Clause(8, "->", [Place(0), Place(1)], [Skeleton(Cache("sys_trans_body"), [Place(0), "nothing", Place(2), 0, Place(3), Skeleton(".", [Skeleton("$CUT", [Place(4)]), Place(5)])]), Skeleton(Cache("sys_trans_body"), [Place(1), "nothing", Place(6), 0, 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))
add(Clause(3, "\\=", [Place(1), Place(2)], [Skeleton(Cache("="), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(0, "\\=", [NotImplemented, NotImplemented], [], -1))
add(Clause(2, "\\+", [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(0, "\\+", [NotImplemented], [], -1))
add(Clause(2, "once", [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "repeat", [], [], -1))
add(Clause(0, "repeat", [], [Cache("repeat")], -1))
add(Clause(4, "catch", [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))
add(Clause(1, "sys_error_handler", [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))
add(Clause(4, "sys_error_handler", [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))
add(Clause(1, "sys_error_handler", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("sys_raise"), [Place(0)])], -1))
add(Clause(3, "sys_chain_head", [Skeleton("cause", [Place(1), NotImplemented]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(1, "sys_chain_head", [Place(0), Place(0)], [], -1))
add(Clause(1, "throw", [Place(0)], [Skeleton(Cache("sys_fill_stack"), [Place(0)]), Skeleton(Cache("sys_raise"), [Place(0)])], -1))
add(Clause(1, "sys_fill_stack", [Place(0)], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(2, "sys_fill_stack", [Skeleton("error", [NotImplemented, Place(1)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fetch_stack"), [Place(1)])], 0))
add(Clause(2, "sys_fill_stack", [Skeleton("warning", [NotImplemented, Place(1)])], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fetch_stack"), [Place(1)])], 0))
add(Clause(0, "sys_fill_stack", [NotImplemented], [], -1))
add(Clause(4, "sys_fetch_stack", [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))
add(Clause(7, "try_call_finally", [Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(1, "", [Place(0), NotImplemented], [Skeleton(Cache("call"), [Place(0)])], -1), Clause(1, "", [NotImplemented, Place(0)], [Skeleton(Cache("call"), [Place(0)]), Cache("fail")], -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), Clause(1, "", [NotImplemented, NotImplemented, NotImplemented, Place(0), NotImplemented], [Skeleton(Cache("call"), [Place(0)])], -1), Clause(1, "", [NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0)], [Skeleton(Cache("call"), [Place(0)]), Cache("fail")], -1)]), [Place(4), Place(6), Place(0), Place(3), Place(1)])], 0))
add(Clause(2, "ignore", [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "ignore", [NotImplemented], [], -1))
add(Clause(3, "chain", [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))
add(Clause(3, "sys_chain_error", [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))
add(Clause(1, "sys_chain_error", [Place(0), NotImplemented], [Skeleton(Cache("sys_raise"), [Place(0)])], -1))
add(Clause(3, "sys_chain_raise", [Place(0), Place(1)], [Skeleton(Cache("sys_chain_concat"), [Place(0), Place(1), Place(2)]), Skeleton(Cache("sys_raise"), [Place(2)])], -1))
add(Clause(5, "sys_chain_concat", [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))
add(Clause(2, "sys_chain_concat", [Place(0), Place(1), Skeleton("cause", [Place(0), Place(1)])], [], -1))
add(Clause(3, "once_cleanup", [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))
add(Clause(2, "once_cleanup", [Place(0), Place(1)], [Skeleton(Cache("sys_once_cleanup"), [Place(0), Place(1)])], -1))
add(Clause(4, "setup_once_cleanup", [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))
add(Clause(3, "setup_once_cleanup", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_setup_once_cleanup"), [Place(0), Place(1), Place(2)])], -1))
add(Clause(3, "sys_setup_once_cleanup", [Place(0), Place(1), Place(2)], [Skeleton(Cache("call"), [Place(0)]), Skeleton(Cache("sys_once_cleanup"), [Place(1), Place(2)])], -1))
add(Clause(3, "sys_once_cleanup", [Place(1), Place(2)], [Skeleton(Cache("chain"), [Place(1), Skeleton("ignore", [Place(2)])]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_once_cleanup", [NotImplemented, Place(0)], [Skeleton(Cache("ignore"), [Place(0)]), Cache("fail")], -1))
add(Clause(2, "sleep", [Place(0)], [Skeleton(Cache("os_sleep_promise"), [Place(0), Place(1)]), Skeleton(Cache("$YIELD"), [Place(1)])], -1))
add(Clause(3, "call_later", [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))
add(Clause(4, "call_later", [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))
add(Clause(5, "call_with_time_limit", [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))
add(Clause(0, "call_with_time_limit", [NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("system_error", ["illegal_yield"]), NotImplemented])])], -1))
add(Clause(1, "sys_timeout_signal", [Place(0)], [Skeleton(Cache("task_abort"), [Place(0), Frozen("system_error", ["timelimit_exceeded"])])], -1))
add(Clause(2, "create_task", [Place(0)], [Skeleton(Cache("sys_frost_horn"), [Skeleton(":-", [Place(0)]), 0, Place(1)]), Skeleton(Cache("os_task_create"), [Place(1), NotImplemented])], -1))
add(Clause(3, "create_task", [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))
add(Clause(5, "sys_frost_horn", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_trans_horn"), [Place(0), Place(3), Place(1)]), Skeleton(Cache("sys_encode_horn"), [Place(3), Place(4), Place(1)]), Skeleton(Cache("sys_host_ossify"), [Place(4), Place(2)])], -1))
add(Clause(6, "sys_host_ossify", [Skeleton("tr_clause", [Place(0), Place(1), Place(2)]), Place(3)], [Skeleton(Cache("=.."), [Place(1), Skeleton(".", [Place(4), Place(5)])]), Skeleton(Cache("sys_clause_ossify"), [Place(5), Place(2), Place(0), Place(4), Place(3)])], -1))
add(Clause(3, "sys_host_ossify", [Skeleton("tr_goal", [Place(0), Place(1)]), Place(2)], [Skeleton(Cache("sys_goal_ossify"), [Place(1), Place(0), Place(2)])], -1))
add(Clause(3, "member", [Place(0), Skeleton(".", [Place(1), Place(2)])], [Skeleton(Cache("sys_member"), [Place(2), Place(1), Place(0)])], -1))
add(Clause(1, "sys_member", [NotImplemented, Place(0), Place(0)], [], -1))
add(Clause(3, "sys_member", [Skeleton(".", [Place(0), Place(1)]), NotImplemented, Place(2)], [Skeleton(Cache("sys_member"), [Place(1), Place(0), Place(2)])], -1))
add(Clause(4, "select", [Place(0), Skeleton(".", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("sys_select"), [Place(2), Place(1), Place(0), Place(3)])], -1))
add(Clause(2, "sys_select", [Place(0), Place(1), Place(1), Place(0)], [], -1))
add(Clause(5, "sys_select", [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(Clause(2, "reverse", [Place(0), Place(1)], [Skeleton(Cache("sys_reverse"), [Place(0), "[]", Place(1)])], -1))
add(Clause(1, "sys_reverse", ["[]", Place(0), Place(0)], [], -1))
add(Clause(4, "sys_reverse", [Skeleton(".", [Place(0), Place(1)]), Place(2), Place(3)], [Skeleton(Cache("sys_reverse"), [Place(1), Skeleton(".", [Place(0), Place(2)]), Place(3)])], -1))
add(Clause(1, "append", ["[]", Place(0), Place(0)], [], -1))
add(Clause(4, "append", [Skeleton(".", [Place(0), Place(1)]), Place(2), Skeleton(".", [Place(0), Place(3)])], [Skeleton(Cache("append"), [Place(1), Place(2), Place(3)])], -1))
add(Clause(3, "length", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(2)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_length"), [Place(1), 0, Place(2)])], 0))
add(Clause(2, "length", [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))
add(Clause(1, "sys_length", ["[]", Place(0), Place(0)], [], -1))
add(Clause(4, "sys_length", [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(Clause(2, "sys_length", [0, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "[]"])], 0))
add(Clause(3, "sys_length", [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))
add(Clause(4, "between", [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))
add(Clause(3, "between", [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))
add(Clause(3, "sys_between", [Place(1), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(1, "sys_between", [Place(0), NotImplemented, Place(0)], [], -1))
add(Clause(4, "sys_between", [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))
add(Clause(4, "findall", [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), Clause(0, "", [NotImplemented, NotImplemented, NotImplemented], [], -1)]), [Place(1), Place(0), Place(3)]), Skeleton(Cache("sys_find_fini"), [Place(3), Place(2)])], -1))
add(Clause(2, "sys_find_init", [Place(0)], [Skeleton(Cache("=.."), [Place(1), Frozen(".", [".", Frozen(".", ["-", Frozen(".", ["[]", "[]"])])])]), Skeleton(Cache("="), [Place(0), Skeleton("v", [Place(1), Place(1)])])], -1))
add(Clause(4, "sys_find_next", [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))
add(Clause(1, "sys_find_fini", [Skeleton("v", [NotImplemented, Skeleton(".", [NotImplemented, Place(0)])]), Place(0)], [], -1))
add(Clause(4, "get_message", [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))
add(Clause(6, "get_message", [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))
add(Clause(8, "get_message", [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))
add(Clause(9, "get_message", [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))
add(Clause(3, "sys_get_string", [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))
add(Clause(6, "sys_get_string", [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))
add(Clause(1, "sys_locale_ancestor", [Place(0), Place(0)], [], -1))
add(Clause(3, "sys_locale_ancestor", [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))
add(Clause(1, "sys_locale_ancestor", [Place(0), ""], [Skeleton(Cache("\\=="), [Place(0), ""])], -1))
add(Clause(5, "sys_multiton_keys", [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3), Place(4)], [Skeleton(make_defined([Clause(2, "", [Place(1)], [Skeleton(Cache("sys_marked_at"), [Place(1), 0, Frozen(".", [23, "[]"])]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented], [], -1)]), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_multiton_keys"), [Place(2), Place(3), Place(4)])], 0))
add(Clause(5, "sys_multiton_keys", [Skeleton(".", [Skeleton("=", [Place(1), NotImplemented]), Place(2)]), Place(3), Place(4)], [Skeleton(make_defined([Clause(2, "", [Place(1)], [Skeleton(Cache("sys_marked_at"), [Place(1), 1, Frozen(".", [1, Frozen(".", [3, Frozen(".", [23, "[]"])])])]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented], [], -1)]), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_multiton_keys"), [Place(2), Place(3), Place(4)])], 0))
add(Clause(5, "sys_multiton_keys", [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(Clause(4, "sys_multiton_keys", [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(Clause(0, "sys_multiton_keys", ["[]", NotImplemented, "[]"], [], -1))
add(Clause(3, "sys_multiton_check", [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(Clause(0, "sys_multiton_check", ["[]"], [], -1))
add(Clause(4, "sys_singleton_keys", [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(Clause(3, "sys_singleton_keys", [Skeleton(".", [Skeleton("=", [Place(0), NotImplemented]), Place(1)]), Skeleton(".", [Place(0), Place(2)])], [Skeleton(Cache("sys_singleton_keys"), [Place(1), Place(2)])], -1))
add(Clause(0, "sys_singleton_keys", ["[]", "[]"], [], -1))
add(Clause(3, "sys_singleton_check", [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(Clause(0, "sys_singleton_check", ["[]"], [], -1))
add(Clause(7, "sys_marked_at", [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))
add(Clause(6, "expand_term", [Place(1), Skeleton(".", [Place(2), Place(3)])], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(".", [Place(4), Place(5)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("expand_term"), [Place(4), Place(2)]), Skeleton(Cache("expand_term"), [Place(5), Place(3)])], 0))
add(Clause(2, "expand_term", [Place(1), "[]"], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), "[]"]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(4, "expand_term", [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))
add(Clause(1, "expand_term", [Place(0), Place(0)], [], -1))
add(Clause(1, "phrase", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "phrase", [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))
add(Clause(4, "term_expansion", [Place(0), Place(1)], [Skeleton(Cache("nonvar"), [Place(0)]), Skeleton(Cache("="), [Place(0), Skeleton("-->", [Place(2), Place(3)])]), Skeleton(Cache("sys_dcg_expansion"), [Place(2), Place(3), Place(1)])], -1))
add(Clause(10, "sys_dcg_expansion", [Place(0), Place(1), Skeleton(":-", [Place(2), Skeleton(",", [Place(3), Place(4)])])], [Skeleton(Cache("nonvar"), [Place(0)]), Skeleton(Cache("="), [Place(0), Skeleton(",", [Place(5), Place(6)])]), Skeleton(Cache("sys_phrase_expansion"), [Place(5), 0, 0, Place(7), Place(8), Place(2)]), Skeleton(Cache("sys_phrase_expansion"), [Place(1), 1, 0, Place(7), Place(9), Place(3)]), Skeleton(Cache("sys_phrase_expansion"), [Place(6), 0, 0, Place(8), Place(9), Place(4)])], -1))
add(Clause(6, "sys_dcg_expansion", [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(Clause(4, "sys_phrase_expansion", [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))
add(Clause(10, "sys_phrase_expansion", [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(Clause(7, "sys_phrase_expansion", [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(Clause(10, "sys_phrase_expansion", [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(Clause(3, "sys_phrase_expansion", ["[]", 0, NotImplemented, Place(1), Place(2), Skeleton("=", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_phrase_expansion", ["[]", 1, NotImplemented, Place(1), Place(2), "true"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(6, "sys_phrase_expansion", [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(Clause(6, "sys_phrase_expansion", [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(Clause(3, "sys_phrase_expansion", ["!", NotImplemented, 0, Place(1), Place(2), Skeleton(",", ["!", Skeleton("=", [Place(1), Place(2)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_phrase_expansion", ["!", NotImplemented, 1, Place(1), Place(2), "!"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(4, "sys_phrase_expansion", [Skeleton("{}", [Place(1)]), NotImplemented, 0, Place(2), Place(3), Skeleton(",", [Place(1), Skeleton("=", [Place(2), Place(3)])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(4, "sys_phrase_expansion", [Skeleton("{}", [Place(1)]), NotImplemented, 1, Place(2), Place(3), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0))
add(Clause(5, "sys_phrase_expansion", [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(Clause(5, "sys_phrase_expansion", [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(Clause(8, "sys_phrase_expansion", [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))
add(Clause(1, "sys_phrase_expansion", [Place(0), NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["callable", Place(0)]), NotImplemented])])], -1))
add(Clause(1, "sys_list_expansion", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(2, "sys_list_expansion", ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_list_expansion", [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(Clause(1, "sys_list_expansion", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
add(Clause(8, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(8, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(8, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(7, "sub_atom", [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))
add(Clause(6, "sub_atom", [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))
add(Clause(10, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(9, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(9, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(7, "last_sub_atom", [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))
add(Clause(6, "last_sub_atom", [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))
add(Clause(0, "strings", ["instantiation_error", "de", "Argument sollte keine Variable sein."], [], -1))
add(Clause(0, "strings", ["domain_error.read_option", "de", "Leseoption erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.io_mode", "de", "Eingabe-/Ausgabemodus (read oder write) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.write_option", "de", "Schreiboption erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.open_option", "de", "Öffnenoption erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.boolean", "de", "Boolean (true oder false) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.file_property", "de", "Dateieigenschaft erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.radix", "de", "Unerlaubte Zahlenbasis ~q, nicht zwischen 2 und 36."], [], -1))
add(Clause(0, "strings", ["domain_error.character_code", "de", "Unerlaubter Kodepunkt ~q, nicht zwischen 0 und 0x10FFFF."], [], -1))
add(Clause(0, "strings", ["domain_error.exotic", "de", "Exot erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.writer", "de", "Ausgabestrom erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.reader", "de", "Eingabestrom erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.goal", "de", "Ziel erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.clause", "de", "Klausel erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.provable", "de", "Herleitbar erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.type", "de", "Datentyp erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.timer", "de", "Zeitgeber erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.task", "de", "Aufgabe erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["existence_error.source_sink", "de", "Datei ~q nicht gefunden."], [], -1))
add(Clause(0, "strings", ["existence_error.module", "de", "Modul ~q nicht gefunden."], [], -1))
add(Clause(0, "strings", ["permission_error.open.source_sink", "de", "Kann Datei ~q nicht öffnen."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.compound", "de", "Kann Verbund ~q nicht ändern."], [], -1))
add(Clause(0, "strings", ["resource_error.socket_timeout", "de", "Ein-/Ausgabeauszeit."], [], -1))
add(Clause(0, "strings", ["resource_error.port_error", "de", "Fehler bei Verwendung eines Port."], [], -1))
add(Clause(0, "strings", ["resource_error.remote_error", "de", "Fehler von Entfernt erhalten."], [], -1))
add(Clause(0, "strings", ["resource_error.io_exception", "de", "Datei nicht erstellt oder nicht zugreifbar."], [], -1))
add(Clause(0, "strings", ["system_error.timelimit_exceeded", "de", "Ausführung abgebrochen da Zeitfrist abgelaufen."], [], -1))
add(Clause(0, "strings", ["system_error.stack_overflow", "de", "Ausführung wegen Stapelüberlauf abgebrochen."], [], -1))
add(Clause(0, "strings", ["system_error.out_of_memory", "de", "Ausführung wegen aufgebrauchtem Speicherplatz abgebrochen."], [], -1))
add(Clause(0, "strings", ["system_error.user_abort", "de", "Ausführung auf Benutzerwunsch abgebrochen."], [], -1))
add(Clause(0, "strings", ["system_error.user_exit", "de", "System auf Benutzerwunsch beendet."], [], -1))
add(Clause(0, "strings", ["system_error.illegal_yield", "de", "Yield Instruktion momentan nicht verfügbar"], [], -1))
add(Clause(0, "strings", ["syntax_error.directive_failed", "de", "Direktive fehlgeschlagen."], [], -1))
add(Clause(0, "strings", ["instantiation_error", "", "Argument should not be a variable."], [], -1))
add(Clause(0, "strings", ["domain_error.read_option", "", "Read option expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.io_mode", "", "Input/output mode (read or write) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.write_option", "", "Write option expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.open_option", "", "Open option expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.boolean", "", "Boolean (true or false) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.file_property", "", "File property expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.radix", "", "Illegal number base ~q, not between 2 and 36."], [], -1))
add(Clause(0, "strings", ["domain_error.character_code", "", "Illegal code point ~q, not between 0 and 0x10FFFF."], [], -1))
add(Clause(0, "strings", ["domain_error.exotic", "", "Exotic expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.writer", "", "Outputstream expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.reader", "", "Inputstream expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.goal", "", "Goal expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.clause", "", "Clause expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.provable", "", "Provable expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.type", "", "Type expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.timer", "", "Timer expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.task", "", "Task expected, found ~q."], [], -1))
add(Clause(0, "strings", ["existence_error.source_sink", "", "File ~q not found."], [], -1))
add(Clause(0, "strings", ["existence_error.module", "", "Module ~q not found."], [], -1))
add(Clause(0, "strings", ["permission_error.open.source_sink", "", "Cannot open file ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.compound", "", "Cannot modify compound ~q."], [], -1))
add(Clause(0, "strings", ["resource_error.socket_timeout", "", "Input/output timeout."], [], -1))
add(Clause(0, "strings", ["resource_error.port_error", "", "Error using a port."], [], -1))
add(Clause(0, "strings", ["resource_error.remote_error", "", "Got error from remote."], [], -1))
add(Clause(0, "strings", ["resource_error.io_exception", "", "File not created or not accessible."], [], -1))
add(Clause(0, "strings", ["system_error.timelimit_exceeded", "", "Execution aborted since time limit exceeded."], [], -1))
add(Clause(0, "strings", ["system_error.stack_overflow", "", "Execution aborted because of stack overflow."], [], -1))
add(Clause(0, "strings", ["system_error.out_of_memory", "", "Execution aborted because out of memory."], [], -1))
add(Clause(0, "strings", ["system_error.user_abort", "", "Execution aborted on user request."], [], -1))
add(Clause(0, "strings", ["system_error.user_exit", "", "System ended on user request."], [], -1))
add(Clause(0, "strings", ["system_error.illegal_yield", "", "Yield instruction currently not available."], [], -1))
add(Clause(0, "strings", ["syntax_error.directive_failed", "", "Directive failed."], [], -1))
add(Clause(3, "dynamic", [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(Clause(1, "dynamic", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(3, "prehash", [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), 4])], 0))
add(Clause(1, "prehash", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(9, "asserta", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(2), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(3), "nothing", Place(4), 0, Place(5), "[]"]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(6), Place(7)])]), Skeleton(Cache("sys_clause_ossify"), [Place(7), Place(5), Place(4), Place(6), Place(8)]), Skeleton(Cache("sys_clause_add"), [Place(8), 1])], 0))
add(Clause(4, "asserta", [Place(0)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(1), Place(2)])]), Skeleton(Cache("sys_clause_ossify"), [Place(2), "[]", "nothing", Place(1), Place(3)]), Skeleton(Cache("sys_clause_add"), [Place(3), 1])], -1))
add(Clause(9, "assertz", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(2), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_trans_body"), [Place(3), "nothing", Place(4), 0, Place(5), "[]"]), Skeleton(Cache("=.."), [Place(2), Skeleton(".", [Place(6), Place(7)])]), Skeleton(Cache("sys_clause_ossify"), [Place(7), Place(5), Place(4), Place(6), Place(8)]), Skeleton(Cache("sys_clause_add"), [Place(8), 3])], 0))
add(Clause(4, "assertz", [Place(0)], [Skeleton(Cache("=.."), [Place(0), Skeleton(".", [Place(1), Place(2)])]), Skeleton(Cache("sys_clause_ossify"), [Place(2), "[]", "nothing", Place(1), Place(3)]), Skeleton(Cache("sys_clause_add"), [Place(3), 3])], -1))
add(Clause(6, "clause", [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), 0, Place(5)]), Skeleton(Cache("="), [Place(5), Place(1)])], -1))
add(Clause(8, "retract", [Place(1)], [Skeleton(Cache("nonvar"), [Place(1)]), Skeleton(Cache("="), [Place(1), Skeleton(":-", [Place(2), Place(3)])]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("kb_clause_ref"), [Place(2), 3, Place(4)]), Skeleton(Cache("kb_clause_data"), [Place(4), Place(2), Place(5), Place(6)]), Skeleton(Cache("sys_untrans_body"), [Place(6), Place(5), 0, Place(7)]), Skeleton(Cache("="), [Place(7), Place(3)]), Skeleton(Cache("kb_clause_remove"), [Place(4), 0])], 0))
add(Clause(2, "retract", [Place(0)], [Skeleton(Cache("kb_clause_ref"), [Place(0), 3, Place(1)]), Skeleton(Cache("kb_clause_data"), [Place(1), Place(0), NotImplemented, "[]"]), Skeleton(Cache("kb_clause_remove"), [Place(1), 0])], -1))
add(Clause(2, "retractall", [Place(0)], [Skeleton(Cache("kb_clause_ref"), [Place(0), 7, Place(1)]), Skeleton(Cache("kb_clause_head"), [Place(1), Place(0)]), Skeleton(Cache("kb_clause_remove"), [Place(1), 1]), Cache("fail")], -1))
add(Clause(0, "retractall", [NotImplemented], [], -1))
add(Clause(3, "abolish", [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_abolish"), [Place(1), Place(2)])], 0))
add(Clause(1, "abolish", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(4, "sys_abolish", [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))
add(Clause(2, "sys_abolish", [Place(0), Place(1)], [Skeleton(Cache("retractall"), [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), NotImplemented])]), Skeleton(Cache("kb_pred_destroy"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_predprop", 3, 1])], -1))
add(Clause(4, "current_predicate", [Skeleton("/", [Place(1), Place(2)])], [Skeleton(make_defined([Clause(1, "", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)])], -1), Clause(1, "", [NotImplemented, Place(0)], [Skeleton(Cache("var"), [Place(0)])], -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(Clause(3, "current_predicate", [Skeleton("/", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("kb_pred_link"), [Place(1), Place(2), NotImplemented])], 0))
add(Clause(1, "current_predicate", [Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(4, "predicate_property", [Skeleton("/", [Place(1), Place(2)]), Place(3)], [Skeleton(make_defined([Clause(1, "", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)])], -1), Clause(1, "", [NotImplemented, Place(0)], [Skeleton(Cache("var"), [Place(0)])], -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(Clause(4, "predicate_property", [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(Clause(1, "predicate_property", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["predicate_indicator", Place(0)]), NotImplemented])])], -1))
add(Clause(7, "sys_predprop_get", [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("is"), [Place(5), Skeleton(Cache("/\\"), [Place(4), 15])]), Skeleton(Cache("sys_predprop_flag"), [Place(5), Place(6)]), Skeleton(Cache("="), [Place(2), Place(6)])], -1))
add(Clause(3, "sys_predprop_get", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_predprop"), [Place(0), Place(1), Place(2)])], -1))
add(Clause(1, "sys_predprop_flag", [0, "static"], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_predprop_flag", [1, "dynamic"], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_predprop_flag", [NotImplemented, "built_in"], [], -1))
run(Goal(0, [Frozen(Cache("kb_pred_touch"), ["sys_emulated", 2, 1])], -1))
add(Clause(0, "sys_emulated", ["argv", "[]"], [], -1))
add(Clause(0, "sys_emulated", ["sys_locale", "en_GB"], [], -1))
add(Clause(0, "sys_emulated", ["sys_color", "normal"], [], -1))
add(Clause(3, "set_prolog_flag", [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))
add(Clause(1, "set_prolog_flag", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), NotImplemented])])], -1))
add(Clause(1, "sys_prolog_flag_set", ["argv", Place(0)], [Skeleton(Cache("retractall"), [Skeleton(Cache("sys_emulated"), ["argv", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_emulated"), ["argv", Place(0)])])], -1))
add(Clause(1, "sys_prolog_flag_set", ["sys_locale", Place(0)], [Skeleton(Cache("retractall"), [Skeleton(Cache("sys_emulated"), ["sys_locale", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_emulated"), ["sys_locale", Place(0)])])], -1))
add(Clause(1, "sys_prolog_flag_set", ["sys_color", Place(0)], [Skeleton(Cache("retractall"), [Skeleton(Cache("sys_emulated"), ["sys_color", NotImplemented])]), Skeleton(Cache("assertz"), [Skeleton(Cache("sys_emulated"), ["sys_color", Place(0)])])], -1))
add(Clause(1, "sys_prolog_flag_set", ["base_url", Place(0)], [Skeleton(Cache("os_set_workdir"), [Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_set", ["stage", Place(0)], [Skeleton(Cache("dg_set_stage"), [Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_set", ["partition", Place(0)], [Skeleton(Cache("dg_set_partition"), [Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_set", [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))
add(Clause(3, "current_prolog_flag", [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))
add(Clause(4, "current_prolog_flag", [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))
add(Clause(1, "current_prolog_flag", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["prolog_flag", Place(0)]), NotImplemented])])], -1))
add(Clause(1, "sys_prolog_flag_get", ["argv", Place(0)], [Skeleton(Cache("sys_emulated"), ["argv", Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_get", ["sys_locale", Place(0)], [Skeleton(Cache("sys_emulated"), ["sys_locale", Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_get", ["sys_color", Place(0)], [Skeleton(Cache("sys_emulated"), ["sys_color", Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_get", ["base_url", Place(0)], [Skeleton(Cache("os_get_workdir"), [Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_get", ["stage", Place(0)], [Skeleton(Cache("dg_get_stage"), [Place(0)])], -1))
add(Clause(1, "sys_prolog_flag_get", ["partition", Place(0)], [Skeleton(Cache("dg_get_partition"), [Place(0)])], -1))
add(Clause(0, "sys_prolog_flag_get", ["single_quotes", "atom"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["double_quotes", "codes"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["back_quotes", "variable"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["dialect", "dogelog"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["version", 20203], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["use_strict", "off"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["max_code", 1114111], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["max_arity", 2147483647], [], -1))
add(Clause(2, "sys_prolog_flag_get", ["async_mode", Place(0)], [Skeleton(Cache("dg_get_flags"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 1, Place(0)])], -1))
add(Clause(2, "sys_prolog_flag_get", ["allow_yield", Place(0)], [Skeleton(Cache("dg_get_flags"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 8, Place(0)])], -1))
add(Clause(0, "sys_prolog_flag_get", ["import_async", "on"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["prop_async", "on"], [], -1))
add(Clause(0, "sys_prolog_flag_get", ["read_async", "on"], [], -1))
add(Clause(2, "sys_prolog_flag_get", ["state_async", Place(0)], [Skeleton(Cache("dg_get_flags"), [Place(1)]), Skeleton(Cache("sys_prolog_flag_decode"), [Place(1), 128, Place(0)])], -1))
add(Clause(5, "sys_prolog_flag_get", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("os_get_host"), [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))
add(Clause(3, "sys_prolog_flag_get", [Place(0), Place(1)], [Skeleton(Cache("os_get_host"), [Place(2)]), Skeleton(Cache("ir_object_current"), [Place(2), Place(0), Place(1)])], -1))
add(Clause(4, "sys_prolog_flag_decode", [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))
add(Clause(0, "sys_prolog_flag_decode", [NotImplemented, NotImplemented, "off"], [], -1))
add(Clause(4, "vars_intersection", [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))
add(Clause(5, "vars_subtract", [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))
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"), ["sys_meta_args", 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", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_body", 6])], -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", 6])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_alter", 6])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_trans_mark", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_meta", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_body", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_rest", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_goal", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_disj", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_more", 5])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_untrans_alter", 5])], -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", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_meta_args", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_body", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_goal", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_disj", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_link", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_meta", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_params", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_param", 4])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_expr", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_args", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_encode_clause", 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", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_meta", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_params", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_param", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_expr", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_args", 2])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_decode_clause", 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_handle_clump", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_handle_static", 1])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_load_type", 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"), ["sys_host_ossify", 2])], -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_dcg_expansion", 3])], -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"), ["prehash", 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_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_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(Clause(0, "sys_is_infix", ["xfx", 1, 1], [], -1))
add(Clause(0, "sys_is_infix", ["yfx", 0, 1], [], -1))
add(Clause(0, "sys_is_infix", ["xfy", 1, 0], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_prefix", 2])], -1))
add(Clause(0, "sys_is_prefix", ["fx", 1], [], -1))
add(Clause(0, "sys_is_prefix", ["fy", 0], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_postfix", 2])], -1))
add(Clause(0, "sys_is_postfix", ["xf", 1], [], -1))
add(Clause(0, "sys_is_postfix", ["yf", 0], [], -1))
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(Clause(3, "current_op", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_op"), [Place(2), Place(1), Place(0), NotImplemented, NotImplemented])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["op", 3])], -1))
add(Clause(3, "op", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_check_priority", 1])], -1))
add(Clause(1, "sys_check_priority", [Place(0)], [Skeleton(Cache("<"), [Place(0), 0]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["not_less_than_zero", Place(0)]), NotImplemented])])], -1))
add(Clause(1, "sys_check_priority", [Place(0)], [Skeleton(Cache(">"), [Place(0), 1200]), Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_priority", Place(0)]), NotImplemented])])], -1))
add(Clause(0, "sys_check_priority", [NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_retract", 2])], -1))
add(Clause(3, "sys_op_retract", [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(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1), Clause(0, "", [NotImplemented], [], -1)]), [Place(1)])], 0))
add(Clause(3, "sys_op_retract", [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(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1), Clause(0, "", [NotImplemented], [], -1)]), [Place(1)])], 0))
add(Clause(3, "sys_op_retract", [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(Cache("sys_op"), [Place(0), Place(1), Place(2), NotImplemented, NotImplemented])]), Cache("fail")], -1), Clause(0, "", [NotImplemented], [], -1)]), [Place(1)])], 0))
add(Clause(1, "sys_op_retract", [NotImplemented, Place(0)], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["operator_specifier", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_assert", 3])], -1))
add(Clause(1, "sys_op_assert", [NotImplemented, NotImplemented, 0], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_op_assert", [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))
add(Clause(3, "sys_op_assert", [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))
add(Clause(8, "sys_op_assert", [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(Cache("sys_op"), [Place(0), Place(1), Place(2), Place(6), Place(7)])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_punct", 2])], -1))
add(Clause(1, "sys_op_punct", [";", 2], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_op_punct", [",", 2], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_op_punct", [NotImplemented, 0], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_space", 3])], -1))
add(Clause(2, "sys_op_space", [NotImplemented, Place(1), 0], [Skeleton(Cache(">"), [Place(1), 699]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_op_space", [Place(1), NotImplemented, 1], [Skeleton(Cache("sys_is_prefix"), [Place(1), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_op_space", [Place(1), NotImplemented, 2], [Skeleton(Cache("sys_is_postfix"), [Place(1), NotImplemented]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_op_space", [NotImplemented, NotImplemented, 3], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format", 3])], -1))
add(Clause(4, "sys_op_format", [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))
add(Clause(4, "sys_op_format", [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))
add(Clause(0, "sys_op_format", [NotImplemented, NotImplemented, 0], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format2", 2])], -1))
add(Clause(2, "sys_op_format2", [Place(1), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_op_format2", [Place(1), 8], [Skeleton(Cache(">"), [Place(1), 1049]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_op_format2", [Place(1), 4], [Skeleton(Cache(">"), [Place(1), 949]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_op_format2", [NotImplemented, 0], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_op_format3", 2])], -1))
add(Clause(2, "sys_op_format3", [Place(1), 12], [Skeleton(Cache(">"), [Place(1), 1149]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_op_format3", [NotImplemented, 0], [], -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"), [1200, "fx", "?-"])], -1))
run(Goal(0, [Frozen(Cache("op"), [1200, "xfx", "-->"])], -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(Clause(1, "initialization", [Place(0)], [Skeleton(Cache("assertz"), [Skeleton(Cache("sys_init_goal"), [Place(0)])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_init_goals", 0])], -1))
add(Clause(2, "sys_init_goals", [], [Skeleton(Cache("retract"), [Skeleton(Cache("sys_init_goal"), [Place(0)])]), Skeleton(Cache("catch"), [Skeleton("sys_must", [Place(0)]), Place(1), Skeleton("sys_print_error", [Place(1)])]), Cache("fail")], -1))
add(Clause(0, "sys_init_goals", [], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_must", 1])], -1))
add(Clause(2, "sys_must", [Place(1)], [Skeleton(Cache("call"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_must", [NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["directive_failed"]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_baseline", 0])], -1))
add(Clause(1, "sys_baseline", [], [Skeleton(Cache("current_prolog_flag"), ["argv", Place(0)]), Skeleton(Cache("sys_baseline"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_baseline", 1])], -1))
add(Clause(2, "sys_baseline", [Skeleton(".", ["-h", NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("put_message"), [Place(1), Frozen("command", ["runtime"])]), Cache("nl")], 0))
add(Clause(1, "sys_baseline", [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(Clause(0, "sys_baseline", [NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_launch", 0])], -1))
add(Clause(1, "sys_launch", [], [Skeleton(Cache("current_prolog_flag"), ["argv", Place(0)]), Skeleton(Cache("sys_launch"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_launch", 1])], -1))
add(Clause(1, "sys_launch", [Skeleton(".", ["-h", NotImplemented])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_launch", ["[]"], [Frozen(Cache("ensure_loaded"), [Frozen("library", [Frozen("/", ["tester", "session"])])]), Cache("version"), Cache("prolog")], -1))
add(Clause(1, "sys_launch", [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(Clause(1, "sys_net_request", [Place(0)], [Skeleton(Cache("sys_net_path"), [Place(0)])], -1))
add(Clause(1, "sys_net_request", [NotImplemented], [Skeleton(Cache("current_prolog_flag"), ["base_url", Place(0)]), Skeleton(Cache("sys_net_path"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_net_path", 1])], -1))
add(Clause(1, "sys_net_path", [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "http:"])], -1))
add(Clause(1, "sys_net_path", [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "https:"])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["open", 3])], -1))
add(Clause(3, "open", [Place(0), Place(1), Place(2)], [Skeleton(Cache("open"), [Place(0), Place(1), Place(2), "[]"])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["open", 4])], -1))
add(Clause(6, "open", [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))
add(Clause(5, "open", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_file", 4])], -1))
add(Clause(5, "sys_open_file", [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"), [Place(1), Place(2), Place(3), Place(4)]), Skeleton(Cache("$YIELD"), [Place(4)])], 0))
add(Clause(4, "sys_open_file", [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("os_open_sync"), [Place(0), Place(1), Place(2), Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_http", 4])], -1))
add(Clause(5, "sys_open_http", [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"), [Place(1), Place(2), Place(3), Place(4)]), Skeleton(Cache("$YIELD"), [Place(4)])], 0))
add(Clause(4, "sys_open_http", [Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("net_open_sync"), [Place(0), Place(1), Place(2), Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["close", 1])], -1))
add(Clause(4, "close", [Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "flags", 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))
add(Clause(1, "close", [Place(0)], [Skeleton(Cache("os_close_sync"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["nl", 0])], -1))
add(Clause(1, "nl", [], [Skeleton(Cache("current_output"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(0), "\n"]), Skeleton(Cache("flush_output"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["nl", 1])], -1))
add(Clause(3, "nl", [Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "flags", Place(2)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 16]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), "\n"]), Skeleton(Cache("flush_output"), [Place(1)])], 0))
add(Clause(1, "nl", [Place(0)], [Skeleton(Cache("put_atom"), [Place(0), "\n"])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["flush_output", 0])], -1))
add(Clause(1, "flush_output", [], [Skeleton(Cache("current_output"), [Place(0)]), Skeleton(Cache("flush_output"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_code", 1])], -1))
add(Clause(3, "put_code", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_code", 2])], -1))
add(Clause(3, "put_code", [Place(0), Place(1)], [Skeleton(Cache("char_code"), [Place(2), Place(1)]), Skeleton(Cache("put_atom"), [Place(0), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_code", 1])], -1))
add(Clause(2, "get_code", [Place(0)], [Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("get_code"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_code", 2])], -1))
add(Clause(4, "get_code", [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))
add(Clause(4, "get_code", [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))
add(Clause(1, "get_code", [NotImplemented, Place(0)], [Skeleton(Cache("="), [-1, Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["peek_code", 1])], -1))
add(Clause(2, "peek_code", [Place(0)], [Skeleton(Cache("current_input"), [Place(1)]), Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["peek_code", 2])], -1))
add(Clause(4, "peek_code", [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))
add(Clause(4, "peek_code", [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))
add(Clause(1, "peek_code", [NotImplemented, Place(0)], [Skeleton(Cache("="), [-1, Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_buffer", 1])], -1))
add(Clause(4, "sys_read_buffer", [Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "flags", 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))
add(Clause(1, "sys_read_buffer", [Place(0)], [Skeleton(Cache("os_read_sync"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["put_atom", 1])], -1))
add(Clause(2, "put_atom", [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("put_atom"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_atom", 2])], -1))
add(Clause(3, "get_atom", [Place(0), Place(1)], [Skeleton(Cache("current_input"), [Place(2)]), Skeleton(Cache("get_atom"), [Place(2), Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["get_atom", 3])], -1))
add(Clause(8, "get_atom", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code_list", 6])], -1))
add(Clause(1, "sys_get_code_list", [-1, NotImplemented, NotImplemented, NotImplemented, "[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_get_code_list", [Place(1), Place(1), NotImplemented, NotImplemented, Skeleton(".", [Place(1), "[]"]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_get_code_list", [Place(1), NotImplemented, 1, NotImplemented, Skeleton(".", [Place(1), "[]"]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(7, "sys_get_code_list", [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))
add(Clause(8, "sys_get_code_list", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code", 3])], -1))
add(Clause(4, "sys_get_code", [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))
add(Clause(5, "sys_get_code", [Place(0), Place(1), Place(2)], [Skeleton(Cache("ir_object_current"), [Place(0), "flags", 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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code_more", 5])], -1))
add(Clause(1, "sys_get_code_more", [13, NotImplemented, NotImplemented, 10, NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_get_code_more", [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))
add(Clause(1, "sys_get_code_more", [Place(0), NotImplemented, NotImplemented, Place(0), NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_opts", 3])], -1))
add(Clause(1, "sys_atom_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(6, "sys_atom_opts", [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(Clause(2, "sys_atom_opts", ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_atom_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_opt", 3])], -1))
add(Clause(1, "sys_atom_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_atom_opt", [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))
add(Clause(6, "sys_atom_opt", [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))
add(Clause(4, "sys_atom_opt", [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))
add(Clause(1, "sys_atom_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["atom_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write", 1])], -1))
add(Clause(2, "write", [Place(0)], [Skeleton(Cache("current_output"), [Place(1)]), Skeleton(Cache("write_term"), [Place(1), Place(0), Frozen(".", [Frozen("numbervars", ["true"]), "[]"])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write", 2])], -1))
add(Clause(2, "write", [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("numbervars", ["true"]), "[]"])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["writeq", 1])], -1))
add(Clause(2, "writeq", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["writeq", 2])], -1))
add(Clause(2, "writeq", [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("numbervars", ["true"]), Frozen(".", [Frozen("quoted", ["true"]), "[]"])])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_canonical", 1])], -1))
add(Clause(2, "write_canonical", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_canonical", 2])], -1))
add(Clause(2, "write_canonical", [Place(0), Place(1)], [Skeleton(Cache("write_term"), [Place(0), Place(1), Frozen(".", [Frozen("quoted", ["true"]), Frozen(".", [Frozen("ignore_ops", ["true"]), "[]"])])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_term", 2])], -1))
add(Clause(3, "write_term", [Place(0), Place(1)], [Skeleton(Cache("current_output"), [Place(2)]), Skeleton(Cache("write_term"), [Place(2), Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_error", 1])], -1))
add(Clause(2, "sys_print_error", [Place(0)], [Skeleton(Cache("current_error"), [Place(1)]), Skeleton(Cache("sys_print_error"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_error", 2])], -1))
add(Clause(4, "sys_print_error", [Place(1), Place(2)], [Skeleton(Cache("ir_object_current"), [Place(1), "flags", Place(3)]), Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 12]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_fancy_problem"), [Place(2), Place(1)])], 0))
add(Clause(2, "sys_print_error", [Place(0), Place(1)], [Skeleton(Cache("sys_print_problem"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_problem", 2])], -1))
add(Clause(3, "sys_print_problem", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_message"), [Place(2), Skeleton("exception", ["unknown", Place(1)]), Place(2)]), Skeleton(Cache("nl"), [Place(2)])], 0))
add(Clause(4, "sys_print_problem", [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))
add(Clause(4, "sys_print_problem", [Skeleton("error", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_message"), [Place(3), Frozen("exception", ["error"])]), Skeleton(Cache("put_message"), [Place(3), Place(1)]), Skeleton(Cache("nl"), [Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0))
add(Clause(4, "sys_print_problem", [Skeleton("warning", [Place(1), Place(2)]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_message"), [Place(3), Frozen("exception", ["warning"])]), Skeleton(Cache("put_message"), [Place(3), Place(1)]), Skeleton(Cache("nl"), [Place(3)]), Skeleton(Cache("sys_print_trace"), [Place(2), Place(3)])], 0))
add(Clause(2, "sys_print_problem", [Place(0), Place(1)], [Skeleton(Cache("put_message"), [Place(1), Skeleton("exception", ["unknown", Place(0)])]), Skeleton(Cache("nl"), [Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_trace", 2])], -1))
add(Clause(3, "sys_print_trace", [Place(1), Place(2)], [Skeleton(Cache("var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_message"), [Place(2), Skeleton("exception", ["context", Place(1)])]), Skeleton(Cache("nl"), [Place(2)])], 0))
add(Clause(4, "sys_print_trace", [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(Clause(1, "sys_print_trace", ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_print_trace", [Place(0), Place(1)], [Skeleton(Cache("put_message"), [Place(1), Skeleton("exception", ["context", Place(0)])]), Skeleton(Cache("nl"), [Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_frame", 2])], -1))
add(Clause(6, "sys_print_frame", [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("put_message"), [Place(3), Skeleton("file_line", [Place(4), Place(5)])])], 0))
add(Clause(2, "sys_print_frame", [Place(0), Place(1)], [Skeleton(Cache("put_message"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read", 1])], -1))
add(Clause(3, "read", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read", 2])], -1))
add(Clause(3, "read", [Place(0), Place(1)], [Skeleton(Cache("get_code"), [Place(0), Place(2)]), Skeleton(Cache("sys_read_term"), [Place(2), Place(0), "[]", Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read_term", 2])], -1))
add(Clause(4, "read_term", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["read_term", 3])], -1))
add(Clause(4, "read_term", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_property", 2])], -1))
add(Clause(7, "file_property", [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))
add(Clause(7, "file_property", [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))
add(Clause(2, "file_property", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_map", 2])], -1))
add(Clause(3, "sys_prop_map", [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))
add(Clause(2, "sys_prop_map", [Place(0), Place(1)], [Skeleton(Cache("sys_prop_file"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_file", 2])], -1))
add(Clause(4, "sys_prop_file", [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))
add(Clause(2, "sys_prop_file", [Place(0), Place(1)], [Skeleton(Cache("os_prop_sync"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_prop_http", 2])], -1))
add(Clause(4, "sys_prop_http", [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))
add(Clause(2, "sys_prop_http", [Place(0), Place(1)], [Skeleton(Cache("net_prop_sync"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["set_file_property", 2])], -1))
add(Clause(3, "set_file_property", [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))
add(Clause(2, "set_file_property", [Place(0), Place(1)], [Skeleton(Cache("os_cntrl_sync"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_directory_name", 2])], -1))
add(Clause(6, "file_directory_name", [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), Clause(1, "", [NotImplemented, Place(0)], [Skeleton(Cache("="), [Place(0), -1])], -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), Clause(1, "", [NotImplemented, Place(0)], [Skeleton(Cache("="), [Place(0), -1])], -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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["file_base_name", 2])], -1))
add(Clause(6, "file_base_name", [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), Clause(2, "", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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), Clause(2, "", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["absolute_file_name", 2])], -1))
add(Clause(2, "absolute_file_name", [Place(0), Place(1)], [Skeleton(Cache("absolute_file_name"), [Place(0), Place(1), "[]"])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["absolute_file_name", 3])], -1))
add(Clause(7, "absolute_file_name", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_absolute_opts", 3])], -1))
add(Clause(1, "sys_absolute_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(6, "sys_absolute_opts", [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(Clause(2, "sys_absolute_opts", ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_absolute_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_absolute_opt", 3])], -1))
add(Clause(1, "sys_absolute_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(3, "sys_absolute_opt", [Skeleton("relative_to", [Place(1)]), Skeleton("v", [Place(2), NotImplemented]), Skeleton("v", [Place(2), Place(1)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_absolute_opt", [Skeleton("extension", [Place(1)]), Skeleton("v", [NotImplemented, Place(2)]), Skeleton("v", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_absolute_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["absolute_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_complete", 3])], -1))
add(Clause(2, "sys_file_complete", ["", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_file_complete", [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))
add(Clause(3, "sys_file_complete", [Place(0), Place(1), Place(2)], [Skeleton(Cache("atom_concat"), [Place(1), Place(0), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_combine", 3])], -1))
add(Clause(3, "sys_file_combine", [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))
add(Clause(7, "sys_file_combine", [Place(1), Place(2), Place(3)], [Skeleton(make_defined([Clause(1, "", [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, NotImplemented, "../"])], -1), Clause(1, "", [Place(0)], [Skeleton(Cache("sub_atom"), [Place(0), 0, NotImplemented, 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))
add(Clause(4, "sys_file_combine", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["is_absolute_file_name", 1])], -1))
add(Clause(5, "is_absolute_file_name", [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), Clause(2, "", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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), Clause(2, "", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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), 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)]), [Place(4), Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_relative", 2])], -1))
add(Clause(1, "sys_file_relative", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(3, "sys_file_relative", [Skeleton("library", [Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_file_compound"), [Place(1), "liblet", ".p", Place(2)])], 0))
add(Clause(4, "sys_file_relative", [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), "doglet", Place(3), Place(2)])], 0))
add(Clause(4, "sys_file_relative", [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))
add(Clause(2, "sys_file_relative", [Place(0), Place(1)], [Skeleton(Cache("absolute_file_name"), [Place(0), Place(1), Frozen(".", [Frozen("extension", [".p"]), "[]"])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_compound", 4])], -1))
add(Clause(7, "sys_file_compound", [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(".", ["/", 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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_including", 1])], -1))
add(Clause(3, "sys_file_including", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_file_struct", 2])], -1))
add(Clause(1, "sys_file_struct", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(5, "sys_file_struct", [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(Clause(3, "sys_file_struct", [Place(1), Place(2)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(1, "sys_file_struct", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["atom", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
add(Clause(0, "strings", ["exception.unknown", "de", "Ausnahme unbekannt: ~q"], [], -1))
add(Clause(0, "strings", ["exception.error", "de", "Fehler: "], [], -1))
add(Clause(0, "strings", ["exception.warning", "de", "Warnung: "], [], -1))
add(Clause(0, "strings", ["exception.template", "de", "Vorlage unbekannt: ~q"], [], -1))
add(Clause(0, "strings", ["exception.context", "de", "    Kontext unbekannt: ~q"], [], -1))
add(Clause(0, "strings", ["file_line", "de", "    ~q auf ~q"], [], -1))
add(Clause(0, "strings", ["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))
add(Clause(0, "strings", ["system_error.option_command", "de", "Ungültige Befehlzeilenoption, -h für weitere Informationen."], [], -1))
add(Clause(0, "strings", ["exception.unknown", "", "Unknown exception: ~q"], [], -1))
add(Clause(0, "strings", ["exception.error", "", "Error: "], [], -1))
add(Clause(0, "strings", ["exception.warning", "", "Warning: "], [], -1))
add(Clause(0, "strings", ["exception.template", "", "Unknown template: ~q"], [], -1))
add(Clause(0, "strings", ["exception.context", "", "    Unknown context: ~q"], [], -1))
add(Clause(0, "strings", ["file_line", "", "    ~q at ~q"], [], -1))
add(Clause(0, "strings", ["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))
add(Clause(0, "strings", ["system_error.option_command", "", "Invalid command line option, -h for more information."], [], -1))
add(Clause(0, "strings", ["evaluation_error.float_overflow", "de", "Die Funktion überschreitet hier den Gleitpunktzahlbereich."], [], -1))
add(Clause(0, "strings", ["evaluation_error.undefined", "de", "Die Funktion ist hier undefiniert."], [], -1))
add(Clause(0, "strings", ["evaluation_error.zero_divisor", "de", "Nulldivision."], [], -1))
add(Clause(0, "strings", ["resource_error.not_supported", "de", "Nicht unterstützte Operation."], [], -1))
add(Clause(0, "strings", ["resource_error.interrupted_exception", "de", "Unerwartet unterbrochene Operation."], [], -1))
add(Clause(0, "strings", ["representation_error.int", "de", "Unerlaubte Ganzzahl (nicht zwischen - 2^31 und 2^31-1)."], [], -1))
add(Clause(0, "strings", ["representation_error.long", "de", "Unerlaubte Ganzzahl (nicht zwischen - 2^63 und 2^63-1)."], [], -1))
add(Clause(0, "strings", ["representation_error.max_arity", "de", "Unerlaubte Stelligkeit (nicht kleiner oder gleich 2^31-1)."], [], -1))
add(Clause(0, "strings", ["domain_error.prolog_flag", "de", "Flag erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.not_less_than_zero", "de", "Positiv oder 0 erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.operator_priority", "de", "Operatorlevel (kleiner oder gleich 1200) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.operator_specifier", "de", "Operatormode (fx, fy, xfx, yfx, xfy, xf, yf) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.time_format", "de", "Zeitformat erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.atom_option", "de", "Atomoption erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.absolute_option", "de", "Absolutoption erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.atom", "de", "Atom erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.number", "de", "Zahl erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.integer", "de", "Ganzzahl erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.callable", "de", "Argument sollte aufrufbar sein (Atom oder Verbund), gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.atomic", "de", "Argument sollte atomar sein, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.list", "de", "Liste ([] oder [_|_]) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.evaluable", "de", "Berechenbaren Funktion erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.character", "de", "Zeichen erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.pair", "de", "Paar (_-_) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.predicate_indicator", "de", "Prädikatindikator (_/_) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["type_error.maybe", "de", "Option (nothing oder just(_)) erwartet, gefunden ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.flag", "de", "Kann schreibgeschütztes Flag ~q nicht aktualisieren."], [], -1))
add(Clause(0, "strings", ["evaluation_error.float_overflow", "", "The function overflows the float range here."], [], -1))
add(Clause(0, "strings", ["evaluation_error.undefined", "", "The function is undefined here."], [], -1))
add(Clause(0, "strings", ["evaluation_error.zero_divisor", "", "Division by zero."], [], -1))
add(Clause(0, "strings", ["resource_error.not_supported", "", "Operation not supported."], [], -1))
add(Clause(0, "strings", ["resource_error.interrupted_exception", "", "Operation terminated unexpectedly."], [], -1))
add(Clause(0, "strings", ["representation_error.int", "", "Illegal integer (not between - 2^31 and 2^31-1)."], [], -1))
add(Clause(0, "strings", ["representation_error.long", "", "Illegal integer (not between - 2^63 and 2^63-1)."], [], -1))
add(Clause(0, "strings", ["representation_error.max_arity", "", "Illegal arity (not less or equal 2^31-1)."], [], -1))
add(Clause(0, "strings", ["domain_error.prolog_flag", "", "Flag expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.not_less_than_zero", "", "Positive or 0 expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.operator_priority", "", "Operator level (less or equal 1200) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.operator_specifier", "", "Operator mode (fx, fy, xfx, yfx, xfy, xf, yf) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.time_format", "", "Time format expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.atom_option", "", "Atom option expected, found ~q."], [], -1))
add(Clause(0, "strings", ["domain_error.absolute_option", "", "Absolute option expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.atom", "", "Atom expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.number", "", "Number expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.integer", "", "Integer expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.callable", "", "Argument should be callable (atom or compound), found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.atomic", "", "Argument should be an atomic, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.list", "", "List ([] or [_|_]) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.evaluable", "", "Evaluable functor expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.character", "", "Character expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.pair", "", "Pair (_-_) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.predicate_indicator", "", "Predicate indicator (_/_) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["type_error.maybe", "", "Maybe (nothing or just(_)) expected, found ~q."], [], -1))
add(Clause(0, "strings", ["permission_error.modify.flag", "", "Can\'t modify read-only flag ~q."], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_code_class", 2])], -1))
add(Clause(2, "sys_code_class", [44, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [40, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [41, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [124, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [91, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [93, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [123, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [125, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_punct"])], 0))
add(Clause(2, "sys_code_class", [59, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [33, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [39, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [96, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [34, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [37, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_solo"])], 0))
add(Clause(2, "sys_code_class", [8205, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_graphic"])], 0))
add(Clause(2, "sys_code_class", [65039, Place(1)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), "is_graphic"])], 0))
add(Clause(3, "sys_code_class", [Place(0), Place(1)], [Skeleton(Cache("code_category"), [Place(0), Place(2)]), Skeleton(Cache("sys_type_class"), [Place(2), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_type_class", 2])], -1))
add(Clause(0, "sys_type_class", [0, "is_invalid"], [], -1))
add(Clause(0, "sys_type_class", [1, "is_upper"], [], -1))
add(Clause(0, "sys_type_class", [2, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [3, "is_upper"], [], -1))
add(Clause(0, "sys_type_class", [4, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [5, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [6, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [7, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [8, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [9, "is_digit"], [], -1))
add(Clause(0, "sys_type_class", [10, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [11, "is_ident"], [], -1))
add(Clause(0, "sys_type_class", [12, "is_blank"], [], -1))
add(Clause(0, "sys_type_class", [13, "is_blank"], [], -1))
add(Clause(0, "sys_type_class", [14, "is_blank"], [], -1))
add(Clause(0, "sys_type_class", [15, "is_cntrl"], [], -1))
add(Clause(0, "sys_type_class", [16, "is_cntrl"], [], -1))
add(Clause(0, "sys_type_class", [18, "is_invalid"], [], -1))
add(Clause(0, "sys_type_class", [19, "is_invalid"], [], -1))
add(Clause(0, "sys_type_class", [20, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [21, "is_solo"], [], -1))
add(Clause(0, "sys_type_class", [22, "is_solo"], [], -1))
add(Clause(0, "sys_type_class", [23, "is_score"], [], -1))
add(Clause(0, "sys_type_class", [24, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [25, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [26, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [27, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [28, "is_graphic"], [], -1))
add(Clause(0, "sys_type_class", [29, "is_solo"], [], -1))
add(Clause(0, "sys_type_class", [30, "is_solo"], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_name_class", 1])], -1))
add(Clause(0, "sys_name_class", ["is_ident"], [], -1))
add(Clause(0, "sys_name_class", ["is_upper"], [], -1))
add(Clause(0, "sys_name_class", ["is_score"], [], -1))
add(Clause(0, "sys_name_class", ["is_digit"], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_white_class", 1])], -1))
add(Clause(0, "sys_white_class", ["is_blank"], [], -1))
add(Clause(0, "sys_white_class", ["is_cntrl"], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_token", 3])], -1))
add(Clause(6, "sys_get_token", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_class", 5])], -1))
add(Clause(7, "sys_get_class", ["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))
add(Clause(7, "sys_get_class", ["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))
add(Clause(7, "sys_get_class", ["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))
add(Clause(4, "sys_get_class", ["is_digit", Place(0), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_get_number"), [Place(0), Place(1), Place(2), Place(3)])], -1))
add(Clause(5, "sys_get_class", ["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))
add(Clause(5, "sys_get_class", ["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))
add(Clause(4, "sys_get_class", ["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))
add(Clause(4, "sys_get_class", ["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))
add(Clause(4, "sys_get_class", ["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))
add(Clause(4, "sys_get_class", ["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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_eof_or_error", 4])], -1))
add(Clause(3, "sys_get_eof_or_error", [-1, "end_of_file", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(2, "sys_get_eof_or_error", [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_unicode"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_name", 3])], -1))
add(Clause(8, "sys_get_name", [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(Clause(1, "sys_get_name", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_make_variable", 2])], -1))
add(Clause(2, "sys_make_variable", [Skeleton(".", [Place(1), "[]"]), "anon"], [Skeleton(Cache("code_category"), [Place(1), 23]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_make_variable", [Place(0), Skeleton("var", [Place(1)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_number", 4])], -1))
add(Clause(7, "sys_get_number", [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))
add(Clause(5, "sys_get_number", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_special", 4])], -1))
add(Clause(5, "sys_get_special", [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))
add(Clause(5, "sys_get_special", [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))
add(Clause(5, "sys_get_special", [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))
add(Clause(5, "sys_get_special", [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))
add(Clause(7, "sys_get_special", [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))
add(Clause(3, "sys_get_special", [NotImplemented, Skeleton("decimal", [Skeleton(".", [48, Place(0)])]), Place(1), Place(2)], [Skeleton(Cache("sys_get_decimal"), [Place(0), Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_decimal", 3])], -1))
add(Clause(7, "sys_get_decimal", [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(Clause(8, "sys_get_decimal", [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(Clause(9, "sys_get_decimal", [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(Clause(1, "sys_get_decimal", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_fraction", 3])], -1))
add(Clause(7, "sys_get_fraction", [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(Clause(9, "sys_get_fraction", [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(Clause(1, "sys_get_fraction", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_exponent", 3])], -1))
add(Clause(7, "sys_get_exponent", [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(Clause(3, "sys_get_exponent", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_get_rest"), [Place(0), Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_rest", 3])], -1))
add(Clause(7, "sys_get_rest", [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(Clause(1, "sys_get_rest", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_expo", 1])], -1))
add(Clause(0, "sys_is_expo", [69], [], -1))
add(Clause(0, "sys_is_expo", [101], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_sign_digit", 1])], -1))
add(Clause(1, "sys_is_sign_digit", [Place(0)], [Skeleton(Cache("sys_is_sign"), [Place(0)])], -1))
add(Clause(1, "sys_is_sign_digit", [Place(0)], [Skeleton(Cache("code_category"), [Place(0), 9])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_sign", 1])], -1))
add(Clause(0, "sys_is_sign", [45], [], -1))
add(Clause(0, "sys_is_sign", [43], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_block_or_symbol", 4])], -1))
add(Clause(7, "sys_get_block_or_symbol", [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))
add(Clause(8, "sys_get_block_or_symbol", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_symbol", 3])], -1))
add(Clause(7, "sys_get_symbol", [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(Clause(1, "sys_get_symbol", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_block", 2])], -1))
add(Clause(5, "sys_skip_block", [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))
add(Clause(3, "sys_skip_block", [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))
add(Clause(3, "sys_skip_block", [Place(0), Place(1)], [Skeleton(Cache("sys_next_code"), [Place(0), Place(2)]), Skeleton(Cache("sys_skip_block"), [Place(2), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_end", 2])], -1))
add(Clause(4, "sys_skip_end", [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))
add(Clause(2, "sys_skip_end", [Place(0), Place(1)], [Skeleton(Cache("sys_skip_block"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_make_period", 3])], -1))
add(Clause(1, "sys_make_period", [37, Frozen(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_make_period", [-1, Frozen(".", [46, "[]"]), "."], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_make_period", [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))
add(Clause(2, "sys_make_period", [NotImplemented, Place(0), Skeleton("atom", [Place(1)])], [Skeleton(Cache("atom_codes"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_line_or_solo", 4])], -1))
add(Clause(7, "sys_get_line_or_solo", [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))
add(Clause(7, "sys_get_line_or_solo", [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))
add(Clause(7, "sys_get_line_or_solo", [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))
add(Clause(8, "sys_get_line_or_solo", [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))
add(Clause(5, "sys_get_line_or_solo", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_skip_line", 3])], -1))
add(Clause(3, "sys_skip_line", [10, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_skip_line", [13, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_skip_line", [-1, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(5, "sys_skip_line", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_quote", 5])], -1))
add(Clause(8, "sys_get_quote", [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))
add(Clause(8, "sys_get_quote", [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))
add(Clause(3, "sys_get_quote", [10, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_get_quote", [13, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_get_quote", [-1, Frozen(".", [-1, "[]"]), NotImplemented, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(8, "sys_get_quote", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_more", 5])], -1))
add(Clause(8, "sys_get_more", [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))
add(Clause(1, "sys_get_more", [NotImplemented, "[]", NotImplemented, Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_code", 4])], -1))
add(Clause(5, "sys_get_code", [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))
add(Clause(7, "sys_get_code", [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))
add(Clause(3, "sys_get_code", [10, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_get_code", [13, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_get_code", [-1, Frozen(".", [-1, "[]"]), Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_get_code", [Place(0), Skeleton(".", [Place(0), "[]"]), Place(1), Place(2)], [Skeleton(Cache("sys_next_code"), [Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_double", 3])], -1))
add(Clause(4, "sys_get_double", [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(Clause(1, "sys_get_double", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_cont", 5])], -1))
add(Clause(8, "sys_get_cont", [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))
add(Clause(10, "sys_get_cont", [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))
add(Clause(9, "sys_get_cont", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_skip", 4])], -1))
add(Clause(5, "sys_get_skip", [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(Clause(2, "sys_get_skip", [Place(0), Place(0), Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_escape", 5])], -1))
add(Clause(8, "sys_get_escape", [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))
add(Clause(9, "sys_get_escape", [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))
add(Clause(4, "sys_get_escape", [10, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0))
add(Clause(4, "sys_get_escape", [13, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0))
add(Clause(4, "sys_get_escape", [-1, Skeleton(".", [-1, Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(2), Place(3)])], 0))
add(Clause(4, "sys_get_escape", [Place(0), Skeleton(".", [Place(0), Place(1)]), Place(1), Place(2), Place(3)], [Skeleton(Cache("sys_next_code"), [Place(2), Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_backslash", 4])], -1))
add(Clause(5, "sys_get_backslash", [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(Clause(2, "sys_get_backslash", [Place(0), Place(0), Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_get_radix", 5])], -1))
add(Clause(9, "sys_get_radix", [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(Clause(2, "sys_get_radix", [Place(0), Place(0), NotImplemented, Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_radix", 2])], -1))
add(Clause(3, "sys_is_radix", [Place(0), Place(1)], [Skeleton(Cache("code_numeric"), [Place(0), Place(2)]), Skeleton(Cache("=<"), [0, Place(2)]), Skeleton(Cache("<"), [Place(2), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_meta", 1])], -1))
add(Clause(0, "sys_is_meta", [39], [], -1))
add(Clause(0, "sys_is_meta", [96], [], -1))
add(Clause(0, "sys_is_meta", [34], [], -1))
add(Clause(0, "sys_is_meta", [92], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_is_escape", 2])], -1))
add(Clause(0, "sys_is_escape", [110, 10], [], -1))
add(Clause(0, "sys_is_escape", [116, 9], [], -1))
add(Clause(0, "sys_is_escape", [98, 8], [], -1))
add(Clause(0, "sys_is_escape", [102, 12], [], -1))
add(Clause(0, "sys_is_escape", [114, 13], [], -1))
add(Clause(0, "sys_is_escape", [97, 7], [], -1))
add(Clause(0, "sys_is_escape", [118, 11], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_code", 3])], -1))
add(Clause(2, "sys_current_code", [Place(0), Skeleton("-", [Place(1), Place(0)]), Skeleton("-", [Place(1), Place(0)])], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_next_code", 2])], -1))
add(Clause(2, "sys_next_code", [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(Clause(3, "sys_at_code", [Place(0), Skeleton("-", [Place(1), Place(2)]), Skeleton("-", [Place(1), Place(2)])], [Skeleton(Cache("peek_code"), [Place(1), Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_space", 3])], -1))
add(Clause(8, "sys_safe_space", [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))
add(Clause(0, "sys_safe_space", [NotImplemented, NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_cases", 5])], -1))
add(Clause(5, "sys_safe_cases", [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))
add(Clause(5, "sys_safe_cases", ["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))
add(Clause(3, "sys_safe_cases", ["is_solo", Place(1), Place(2), Place(2), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_safe_quote"), [Place(1), Place(2)])], 0))
add(Clause(0, "sys_safe_cases", [NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_name", 3])], -1))
add(Clause(4, "sys_safe_name", [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))
add(Clause(2, "sys_safe_name", [Place(1), 48, 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0))
add(Clause(0, "sys_safe_name", [NotImplemented, NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_symbol", 4])], -1))
add(Clause(3, "sys_safe_symbol", [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))
add(Clause(4, "sys_safe_symbol", [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))
add(Clause(0, "sys_safe_symbol", [NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_safe_quote", 2])], -1))
add(Clause(2, "sys_safe_quote", [Place(1), 39], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0))
add(Clause(2, "sys_safe_quote", [Place(1), 96], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0))
add(Clause(2, "sys_safe_quote", [Place(1), 34], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0))
add(Clause(0, "sys_safe_quote", [NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_print_atom", 3])], -1))
add(Clause(5, "sys_print_atom", [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(3), 16]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("open_input_atom_stream"), [Place(2), Place(4)]), Skeleton(Cache("sys_fancy_stream"), [Place(4), Place(1), ""])], 0))
add(Clause(2, "sys_print_atom", [Place(0), Place(1), NotImplemented], [Skeleton(Cache("put_atom"), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_token", 2])], -1))
add(Clause(4, "sys_convert_token", [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))
add(Clause(4, "sys_convert_token", [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))
add(Clause(4, "sys_convert_token", [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))
add(Clause(5, "sys_convert_token", [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))
add(Clause(4, "sys_convert_token", [Skeleton("exotic", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_codes"), [Place(3), Place(1)]), Skeleton(Cache("sys_convert_exotic"), [Place(3), Place(2)])], 0))
add(Clause(3, "sys_convert_token", [Skeleton("codes", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_quote"), [Place(2), 34, Place(1), "[]"])], 0))
add(Clause(3, "sys_convert_token", [Skeleton("code", [Place(1)]), Skeleton("const", [Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_code"), [Place(2), Place(1), "[]"])], 0))
add(Clause(1, "sys_convert_token", [Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_quote", 4])], -1))
add(Clause(6, "sys_convert_quote", [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))
add(Clause(5, "sys_convert_quote", [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(Clause(2, "sys_convert_quote", [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))
add(Clause(9, "sys_convert_quote", [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(Clause(1, "sys_convert_quote", ["[]", NotImplemented, Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_sep", 2])], -1))
add(Clause(1, "sys_convert_sep", [Skeleton(".", [13, Skeleton(".", [10, Place(0)])]), Place(0)], [], -1))
add(Clause(1, "sys_convert_sep", [Skeleton(".", [10, Place(0)]), Place(0)], [], -1))
add(Clause(1, "sys_convert_sep", [Skeleton(".", [13, Place(0)]), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_code", 3])], -1))
add(Clause(3, "sys_convert_code", [39, Skeleton(".", [39, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_convert_double"), [Place(1), Place(2)])], 0))
add(Clause(2, "sys_convert_code", [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))
add(Clause(5, "sys_convert_code", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_double", 2])], -1))
add(Clause(3, "sys_convert_double", [Skeleton(".", [39, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(2, "sys_convert_double", [Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["doubling_missing"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_exotic", 2])], -1))
add(Clause(3, "sys_convert_exotic", [Place(1), Place(2)], [Skeleton(Cache("sys_atom_exotic"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_convert_exotic", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["exotic", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_exotic", 2])], -1))
add(Clause(0, "sys_atom_exotic", ["True", True], [], -1))
add(Clause(0, "sys_atom_exotic", ["False", False], [], -1))
add(Clause(0, "sys_atom_exotic", ["None", None], [], -1))
add(Clause(0, "sys_atom_exotic", ["Inf", math.inf], [], -1))
add(Clause(0, "sys_atom_exotic", ["NaN", math.nan], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_char", 5])], -1))
add(Clause(4, "sys_convert_char", ["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))
add(Clause(2, "sys_convert_char", ["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))
add(Clause(2, "sys_convert_char", ["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))
add(Clause(2, "sys_convert_char", [NotImplemented, Place(0), Place(0), Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_escape", 3])], -1))
add(Clause(5, "sys_convert_escape", [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))
add(Clause(8, "sys_convert_escape", [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))
add(Clause(7, "sys_convert_escape", [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))
add(Clause(4, "sys_convert_escape", [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))
add(Clause(2, "sys_convert_escape", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_escape"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_backslash", 2])], -1))
add(Clause(3, "sys_convert_backslash", [Skeleton(".", [92, Place(1)]), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(2, "sys_convert_backslash", [Place(0), Place(1)], [Skeleton(Cache("throw"), [Skeleton("error", [Frozen("syntax_error", ["unbalanced_escape"]), NotImplemented])]), Skeleton(Cache("="), [Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_convert_radix", 4])], -1))
add(Clause(6, "sys_convert_radix", [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(Clause(1, "sys_convert_radix", ["[]", NotImplemented, Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_stream_opts", 2])], -1))
add(Clause(1, "sys_stream_opts", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_stream_opts", [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(Clause(1, "sys_stream_opts", ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_stream_opts", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_stream_opt", 2])], -1))
add(Clause(1, "sys_stream_opt", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_stream_opt", [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))
add(Clause(1, "sys_stream_opt", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["open_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_check_type", 2])], -1))
add(Clause(1, "sys_check_type", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(1, "sys_check_type", ["text", "utf8"], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_check_type", ["binary", "latin1"], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_check_type", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["type", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_opts", 2])], -1))
add(Clause(1, "sys_open_opts", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_open_opts", [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(Clause(1, "sys_open_opts", ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_open_opts", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_opt", 2])], -1))
add(Clause(1, "sys_open_opt", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(3, "sys_open_opt", [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))
add(Clause(4, "sys_open_opt", [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))
add(Clause(4, "sys_open_opt", [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))
add(Clause(5, "sys_open_opt", [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))
add(Clause(4, "sys_open_opt", [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))
add(Clause(1, "sys_open_opt", [Skeleton("uri", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_open_opt", [Skeleton("status", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_open_opt", [Skeleton("fields", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_open_opt", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["open_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_opts", 2])], -1))
add(Clause(1, "sys_header_opts", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_header_opts", [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(Clause(1, "sys_header_opts", ["[]", NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_header_opts", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_opt", 2])], -1))
add(Clause(1, "sys_header_opt", [Place(0), NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_header_opt", [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(Clause(1, "sys_header_opt", [Place(0), NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["pair", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_results", 2])], -1))
add(Clause(3, "sys_open_results", [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(Clause(0, "sys_open_results", ["[]", NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_open_result", 2])], -1))
add(Clause(0, "sys_open_result", [Skeleton("method", [NotImplemented]), NotImplemented], [], -1))
add(Clause(0, "sys_open_result", [Skeleton("headers", [NotImplemented]), NotImplemented], [], -1))
add(Clause(1, "sys_open_result", [Skeleton("body", [NotImplemented]), NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_open_result", [Skeleton("body", [NotImplemented, NotImplemented]), NotImplemented], [], -1))
add(Clause(0, "sys_open_result", [Skeleton("type", [NotImplemented]), NotImplemented], [], -1))
add(Clause(2, "sys_open_result", [Skeleton("uri", [Place(0)]), Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "uri", Place(0)])], -1))
add(Clause(2, "sys_open_result", [Skeleton("status", [Place(0)]), Place(1)], [Skeleton(Cache("ir_object_current"), [Place(1), "status", Place(0)])], -1))
add(Clause(3, "sys_open_result", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_results", 2])], -1))
add(Clause(3, "sys_header_results", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_header_results", 3])], -1))
add(Clause(0, "sys_header_results", ["[]", NotImplemented, "[]"], [], -1))
add(Clause(5, "sys_header_results", [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(Clause(1, "sys_write_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(6, "sys_write_opts", [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(Clause(2, "sys_write_opts", ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_write_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_opt", 3])], -1))
add(Clause(1, "sys_write_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(5, "sys_write_opt", [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))
add(Clause(5, "sys_write_opt", [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))
add(Clause(7, "sys_write_opt", [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))
add(Clause(7, "sys_write_opt", [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))
add(Clause(7, "sys_write_opt", [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))
add(Clause(5, "sys_write_opt", [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))
add(Clause(7, "sys_write_opt", [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))
add(Clause(7, "sys_write_opt", [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))
add(Clause(1, "sys_write_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["write_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_opts", 3])], -1))
add(Clause(1, "sys_read_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(6, "sys_read_opts", [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(Clause(2, "sys_read_opts", ["[]", Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(1, "sys_read_opts", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("type_error", ["list", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_opt", 3])], -1))
add(Clause(1, "sys_read_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(2, "sys_read_opt", [Skeleton("variable_names", [NotImplemented]), Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_read_opt", [Skeleton("singletons", [NotImplemented]), Place(1), Place(1)], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(3, "sys_read_opt", [Skeleton("priority", [Place(1)]), Skeleton("z", [NotImplemented, Place(2)]), Skeleton("z", [Place(1), Place(2)])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(5, "sys_read_opt", [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))
add(Clause(1, "sys_read_opt", [Place(0), NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["read_option", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_results", 2])], -1))
add(Clause(3, "sys_read_results", [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(Clause(0, "sys_read_results", ["[]", NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_result", 2])], -1))
add(Clause(2, "sys_read_result", [Skeleton("variable_names", [Place(0)]), Skeleton("s", [Place(1), NotImplemented])], [Skeleton(Cache("reverse"), [Place(1), Place(0)])], -1))
add(Clause(2, "sys_read_result", [Skeleton("singletons", [Place(0)]), Skeleton("s", [NotImplemented, Place(1)])], [Skeleton(Cache("reverse"), [Place(1), Place(0)])], -1))
add(Clause(0, "sys_read_result", [Skeleton("priority", [NotImplemented]), NotImplemented], [], -1))
add(Clause(0, "sys_read_result", [Skeleton("end_of_file", [NotImplemented]), NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_opt_boolean", 4])], -1))
add(Clause(1, "sys_opt_boolean", [Place(0), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("var"), [Place(0)]), Skeleton(Cache("throw"), [Skeleton("error", ["instantiation_error", NotImplemented])])], -1))
add(Clause(4, "sys_opt_boolean", ["true", Place(1), Place(2), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(3), Skeleton(Cache("\\/"), [Place(2), Place(1)])])], 0))
add(Clause(4, "sys_opt_boolean", ["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))
add(Clause(1, "sys_opt_boolean", [Place(0), NotImplemented, NotImplemented, NotImplemented], [Skeleton(Cache("throw"), [Skeleton("error", [Skeleton("domain_error", ["boolean", Place(0)]), NotImplemented])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom", 1])], -1))
add(Clause(3, "sys_proper_atom", [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(Clause(1, "sys_proper_atom", ["is_ident", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1))
add(Clause(1, "sys_proper_atom", ["is_graphic", Frozen(".", [46, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(1, "sys_proper_atom", ["is_graphic", Skeleton(".", [47, Skeleton(".", [42, NotImplemented])])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(1, "sys_proper_atom", ["is_graphic", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_graphic"), [Place(0)])], -1))
add(Clause(1, "sys_proper_atom", ["is_solo", Frozen(".", [39, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(1, "sys_proper_atom", ["is_solo", Frozen(".", [96, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(1, "sys_proper_atom", ["is_solo", Frozen(".", [34, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(1, "sys_proper_atom", ["is_solo", Frozen(".", [37, "[]"])], [Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0))
add(Clause(0, "sys_proper_atom", ["is_solo", Skeleton(".", [NotImplemented, "[]"])], [], -1))
add(Clause(1, "sys_proper_atom", ["is_punct", Frozen(".", [91, Frozen(".", [93, "[]"])])], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_proper_atom", ["is_punct", Frozen(".", [123, Frozen(".", [125, "[]"])])], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom_name", 1])], -1))
add(Clause(4, "sys_proper_atom_name", [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(Clause(0, "sys_proper_atom_name", ["[]"], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_atom_graphic", 1])], -1))
add(Clause(3, "sys_proper_atom_graphic", [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(Clause(0, "sys_proper_atom_graphic", ["[]"], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_codes", 3])], -1))
add(Clause(6, "sys_escape_codes", [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(Clause(1, "sys_escape_codes", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_code", 4])], -1))
add(Clause(5, "sys_escape_code", ["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))
add(Clause(4, "sys_escape_code", ["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))
add(Clause(4, "sys_escape_code", ["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))
add(Clause(4, "sys_escape_code", ["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))
add(Clause(4, "sys_escape_code", ["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))
add(Clause(2, "sys_escape_code", [NotImplemented, Place(0), Skeleton(".", [Place(0), Place(1)]), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_code2", 3])], -1))
add(Clause(8, "sys_escape_code2", [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))
add(Clause(7, "sys_escape_code2", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_escape_codes2", 3])], -1))
add(Clause(6, "sys_escape_codes2", [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(Clause(1, "sys_escape_codes2", ["[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_numbervars_name", 2])], -1))
add(Clause(4, "sys_numbervars_name", [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))
add(Clause(6, "sys_numbervars_name", [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))
run(Goal(0, [Frozen(Cache("sys_multifile_safe"), ["strings", 3])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["strings", 3])], -1))
add(Clause(0, "strings", ["syntax_error.illegal_number", "de", "Keine Nummer."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_date", "de", "Kein Datum."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_layout", "de", "Unerlaubtes Druckbildzeichen in Zeichenkette."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_unicode", "de", "Unerlaubtes Unicodezeichen im Text."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_escape", "de", "Unerlaubte Steuersequenz in Zeichenkette."], [], -1))
add(Clause(0, "strings", ["syntax_error.unbalanced_escape", "de", "Steuersequenz nicht abgeschlossen."], [], -1))
add(Clause(0, "strings", ["syntax_error.end_of_file_in_block_comment", "de", "Blockkommentar nicht geschlossen."], [], -1))
add(Clause(0, "strings", ["syntax_error.singleton_var", "de", "Alleinstehende Variable(n) ~q."], [], -1))
add(Clause(0, "strings", ["syntax_error.multiton_var", "de", "Mehrfache markierte Variable(n) ~q."], [], -1))
add(Clause(0, "strings", ["syntax_error.bracket_balance", "de", "Rechte eckige Klammer (\"]\") fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.brace_balance", "de", "Rechte geschweifte Klammer (\"}\") fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.parenthesis_balance", "de", "Rechte runde Klammer (\")\") fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.end_of_clause_expected", "de", "Überflüssiges Token."], [], -1))
add(Clause(0, "strings", ["syntax_error.operator_clash", "de", "Runde Klammer (\"(\") vor Operator fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.cannot_start_term", "de", "Term fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.doubling_missing", "de", "Anführungszeichen nicht zweifach."], [], -1))
add(Clause(0, "strings", ["syntax_error.unbalanced_quoted", "de", "Zeichenkette nicht abgeschlossen."], [], -1))
add(Clause(0, "strings", ["syntax_error.missing_char", "de", "Zeichen fehlt."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_number", "", "Not a number."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_date", "", "Not a date."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_layout", "", "Illegal layout character in string."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_unicode", "", "Illegal Unicode character in text."], [], -1))
add(Clause(0, "strings", ["syntax_error.illegal_escape", "", "Illegal escape sequence in string."], [], -1))
add(Clause(0, "strings", ["syntax_error.unbalanced_escape", "", "Escape sequence not closed."], [], -1))
add(Clause(0, "strings", ["syntax_error.end_of_file_in_block_comment", "", "Block comment not closed."], [], -1))
add(Clause(0, "strings", ["syntax_error.singleton_var", "", "Singleton variable(s) ~q."], [], -1))
add(Clause(0, "strings", ["syntax_error.multiton_var", "", "Multiton marked variable(s) ~q."], [], -1))
add(Clause(0, "strings", ["syntax_error.bracket_balance", "", "Right bracket (\"]\") missing."], [], -1))
add(Clause(0, "strings", ["syntax_error.brace_balance", "", "Right brace (\"}\") missing."], [], -1))
add(Clause(0, "strings", ["syntax_error.parenthesis_balance", "", "Right parenthesis (\")\") missing."], [], -1))
add(Clause(0, "strings", ["syntax_error.end_of_clause_expected", "", "Superfluous token."], [], -1))
add(Clause(0, "strings", ["syntax_error.operator_clash", "", "Parenthesis (\"(\") before operator missing."], [], -1))
add(Clause(0, "strings", ["syntax_error.cannot_start_term", "", "Term missing."], [], -1))
add(Clause(0, "strings", ["syntax_error.doubling_missing", "", "Quote not doubled."], [], -1))
add(Clause(0, "strings", ["syntax_error.unbalanced_quoted", "", "String not closed."], [], -1))
add(Clause(0, "strings", ["syntax_error.missing_char", "", "Character missing."], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["write_term", 3])], -1))
add(Clause(7, "write_term", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_priority", 3])], -1))
add(Clause(5, "sys_write_priority", [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))
add(Clause(4, "sys_write_priority", [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))
add(Clause(4, "sys_write_priority", [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))
add(Clause(4, "sys_write_priority", [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))
add(Clause(5, "sys_write_priority", [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))
add(Clause(5, "sys_write_priority", [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))
add(Clause(6, "sys_write_priority", [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(Clause(5, "sys_write_priority", [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(Clause(9, "sys_write_priority", [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))
add(Clause(9, "sys_write_priority", [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))
add(Clause(10, "sys_write_priority", [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))
add(Clause(4, "sys_write_priority", [Place(1), Place(2), Place(3)], [Skeleton(Cache("compound"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_write_compound"), [Place(1), Place(2), Place(3)])], 0))
add(Clause(3, "sys_write_priority", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_write_exotic"), [Place(0), Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_number", 3])], -1))
add(Clause(7, "sys_write_number", [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("float"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_number"), [Place(4), Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(5)]), Skeleton(Cache("sys_safe_space"), [Place(5), Place(4), Place(2)]), Skeleton(Cache("sys_current_flags"), [Place(3), Place(6)]), Skeleton(Cache("sys_print_atom"), [Place(5), Place(4), Place(6)])], 0))
add(Clause(7, "sys_write_number", [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("integer"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("atom_integer"), [Place(4), 10, Place(1)]), Skeleton(Cache("sys_current_stream"), [Place(3), Place(5)]), Skeleton(Cache("sys_safe_space"), [Place(5), Place(4), Place(2)]), Skeleton(Cache("sys_current_flags"), [Place(3), Place(6)]), Skeleton(Cache("sys_print_atom"), [Place(5), Place(4), Place(6)])], 0))
add(Clause(4, "sys_write_number", [-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))
add(Clause(4, "sys_write_number", [Place(1), Skeleton("w", [Place(2), NotImplemented, NotImplemented]), Place(3)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_exotic"), [Place(1), Place(2), Place(3)])], 0))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_atom", 3])], -1))
add(Clause(6, "sys_write_atom", [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_put_ident"), [Place(1), 0, Place(3), NotImplemented]), Skeleton(Cache("put_atom"), [Place(5), ")"])], 0))
add(Clause(3, "sys_write_atom", [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("sys_put_ident"), [Place(0), Place(1), Place(2), NotImplemented])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_exotic", 3])], -1))
add(Clause(3, "sys_write_exotic", [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("sys_put_exotic"), [Place(0), Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_numbervars", 3])], -1))
add(Clause(6, "sys_write_numbervars", [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_print_atom"), [Place(4), Place(3), Place(5)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_prefix", 6])], -1))
add(Clause(18, "sys_write_prefix", [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_put_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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_postfix", 6])], -1))
add(Clause(15, "sys_write_postfix", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_infix", 7])], -1))
add(Clause(22, "sys_write_infix", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_oper", 3])], -1))
add(Clause(3, "sys_write_oper", [",", Place(1), ","], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), ","])], 0))
add(Clause(3, "sys_write_oper", ["|", Place(1), "|"], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), "|"])], 0))
add(Clause(3, "sys_write_oper", [".", Place(1), "."], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_current_stream"), [Place(1), Place(2)]), Skeleton(Cache("put_atom"), [Place(2), "."])], 0))
add(Clause(3, "sys_write_oper", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_put_ident"), [Place(0), 0, Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_list", 3])], -1))
add(Clause(5, "sys_write_list", [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))
add(Clause(6, "sys_write_list", [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(Clause(1, "sys_write_list", ["[]", NotImplemented, NotImplemented], [Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(4, "sys_write_list", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_compound", 3])], -1))
add(Clause(8, "sys_write_compound", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_symbol", 3])], -1))
add(Clause(4, "sys_put_symbol", [Place(1), Place(2), Place(3)], [Skeleton(Cache("atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_put_ident"), [Place(1), Place(2), Place(3), NotImplemented])], 0))
add(Clause(3, "sys_put_symbol", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_put_exotic"), [Place(0), Place(1), Place(2)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_args", 3])], -1))
add(Clause(5, "sys_write_args", [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(Clause(0, "sys_write_args", ["[]", NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_var", 3])], -1))
add(Clause(6, "sys_write_var", [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))
add(Clause(5, "sys_write_var", [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))
add(Clause(8, "sys_write_var", [Place(0), Skeleton("w", [Place(1), NotImplemented, NotImplemented]), Place(2)], [Skeleton(Cache("term_hash"), [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_print_atom"), [Place(6), Place(5), Place(7)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_var", 3])], -1))
add(Clause(5, "sys_find_var", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_find_sing", 2])], -1))
add(Clause(4, "sys_find_sing", [Place(1), Place(2)], [Skeleton(Cache("member"), [Place(3), Place(2)]), Skeleton(Cache("=="), [Place(1), Place(3)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_write_name", 3])], -1))
add(Clause(6, "sys_write_name", [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_print_atom"), [Place(5), Place(4), Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_var_quoted", 3])], -1))
add(Clause(6, "sys_var_quoted", [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("atom_codes"), [Place(1), Place(4)]), Skeleton(make_defined([Clause(2, "", [Place(1)], [Skeleton(Cache("sys_proper_var"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented], [], -1)]), [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))
add(Clause(1, "sys_var_quoted", [Place(0), NotImplemented, Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_proper_var", 1])], -1))
add(Clause(3, "sys_proper_var", [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(Clause(1, "sys_proper_var", ["is_upper", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1))
add(Clause(1, "sys_proper_var", ["is_score", Skeleton(".", [NotImplemented, Place(0)])], [Skeleton(Cache("sys_proper_atom_name"), [Place(0)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_adjust", 4])], -1))
add(Clause(3, "sys_put_adjust", [Place(1), Place(2), NotImplemented, Place(1)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 4]), 0]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(4, "sys_put_adjust", [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))
add(Clause(1, "sys_put_adjust", [Place(0), NotImplemented, NotImplemented, Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_indent", 9])], -1))
add(Clause(3, "sys_put_indent", [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))
add(Clause(3, "sys_put_indent", [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))
add(Clause(4, "sys_put_indent", [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))
add(Clause(8, "sys_put_indent", [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))
add(Clause(1, "sys_put_indent", [NotImplemented, Place(0), NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lparen", 6])], -1))
add(Clause(7, "sys_put_lparen", [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))
add(Clause(1, "sys_put_lparen", [NotImplemented, NotImplemented, NotImplemented, NotImplemented, Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lparen2", 3])], -1))
add(Clause(4, "sys_put_lparen2", [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))
add(Clause(3, "sys_put_lparen2", [Place(0), Place(1), Place(2)], [Skeleton(Cache("put_atom"), [Place(0), "("]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rparen", 5])], -1))
add(Clause(6, "sys_put_rparen", [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))
add(Clause(0, "sys_put_rparen", [NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_needs_paren", 4])], -1))
add(Clause(3, "sys_needs_paren", [NotImplemented, Place(1), Place(2), NotImplemented], [Skeleton(Cache("<"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_needs_paren", [0, Place(0), Place(0), Place(1)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(1), 8]), 0])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lformat", 4])], -1))
add(Clause(4, "sys_put_lformat", [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))
add(Clause(3, "sys_put_lformat", [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))
add(Clause(3, "sys_put_lformat", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rformat", 6])], -1))
add(Clause(5, "sys_put_rformat", [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))
add(Clause(4, "sys_put_rformat", [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))
add(Clause(4, "sys_put_rformat", [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))
add(Clause(4, "sys_put_rformat", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_lspace", 2])], -1))
add(Clause(3, "sys_put_lspace", [Place(1), Place(2)], [Skeleton(Cache("=:="), [Skeleton(Cache("/\\"), [Place(2), 2]), 0]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("put_atom"), [Place(1), " "])], 0))
add(Clause(0, "sys_put_lspace", [NotImplemented, NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_rspace", 4])], -1))
add(Clause(5, "sys_put_rspace", [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))
add(Clause(2, "sys_put_rspace", [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("\\/"), [Place(0), 2])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_side", 3])], -1))
add(Clause(3, "sys_oper_side", [0, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 8])])], 0))
add(Clause(2, "sys_oper_side", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [8])])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_minus", 3])], -1))
add(Clause(3, "sys_oper_minus", ["-", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 4])])], 0))
add(Clause(2, "sys_oper_minus", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [4])])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_oper_escape", 3])], -1))
add(Clause(3, "sys_oper_escape", [",", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], 0))
add(Clause(3, "sys_oper_escape", ["|", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("\\/"), [Place(1), 1])])], 0))
add(Clause(2, "sys_oper_escape", [NotImplemented, Place(0), Place(1)], [Skeleton(Cache("is"), [Place(1), Skeleton(Cache("/\\"), [Place(0), Frozen(Cache("\\"), [1])])])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_stream", 2])], -1))
add(Clause(1, "sys_current_stream", [Skeleton("v", [Place(0), NotImplemented, NotImplemented, NotImplemented]), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_flags", 2])], -1))
add(Clause(1, "sys_current_flags", [Skeleton("v", [NotImplemented, Place(0), NotImplemented, NotImplemented]), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_names", 2])], -1))
add(Clause(1, "sys_current_names", [Skeleton("v", [NotImplemented, NotImplemented, Place(0), NotImplemented]), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_anons", 2])], -1))
add(Clause(1, "sys_current_anons", [Skeleton("v", [NotImplemented, NotImplemented, NotImplemented, Place(0)]), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_ident", 4])], -1))
add(Clause(6, "sys_put_ident", [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_print_atom"), [Place(5), Place(3), Place(4)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_atom_quoted", 3])], -1))
add(Clause(6, "sys_atom_quoted", [Place(1), Place(2), Place(3)], [Skeleton(Cache("=\\="), [Skeleton(Cache("/\\"), [Place(2), 1]), 0]), Skeleton(Cache("atom_codes"), [Place(1), Place(4)]), Skeleton(make_defined([Clause(2, "", [Place(1)], [Skeleton(Cache("sys_proper_atom"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Cache("fail")], 0), Clause(0, "", [NotImplemented], [], -1)]), [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))
add(Clause(1, "sys_atom_quoted", [Place(0), NotImplemented, Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_put_exotic", 3])], -1))
add(Clause(7, "sys_put_exotic", [Place(0), Place(1), Place(2)], [Skeleton(Cache("sys_current_flags"), [Place(2), Place(3)]), Skeleton(Cache("sys_unconvert_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_print_atom"), [Place(6), Place(5), Place(3)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_unconvert_exotic", 2])], -1))
add(Clause(3, "sys_unconvert_exotic", [Place(1), Place(2)], [Skeleton(Cache("sys_atom_exotic"), [Place(1), Place(2)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(2, "sys_unconvert_exotic", ["Special", Place(1)], [Skeleton(Cache("number"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)])], 0))
add(Clause(0, "sys_unconvert_exotic", ["Reference", NotImplemented], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_exotic_quoted", 3])], -1))
add(Clause(4, "sys_exotic_quoted", [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))
add(Clause(1, "sys_exotic_quoted", [Place(0), NotImplemented, Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_term", 4])], -1))
add(Clause(9, "sys_read_term", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_optional", 4])], -1))
add(Clause(4, "sys_read_optional", ["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))
add(Clause(5, "sys_read_optional", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_end_of_term", 2])], -1))
add(Clause(5, "sys_read_end_of_term", [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))
add(Clause(2, "sys_read_end_of_term", [Place(0), Place(1)], [Skeleton(Cache("sys_read_end"), [".", Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_priority", 4])], -1))
add(Clause(11, "sys_read_priority", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_secondary", 7])], -1))
add(Clause(8, "sys_read_secondary", [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))
add(Clause(8, "sys_read_secondary", [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(Clause(8, "sys_read_secondary", [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(Clause(2, "sys_read_secondary", [NotImplemented, Place(0), Place(0), NotImplemented, NotImplemented, Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_infix", 7])], -1))
add(Clause(20, "sys_read_infix", [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), Clause(2, "", [NotImplemented, NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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))
add(Clause(16, "sys_read_infix", [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), Clause(2, "", [NotImplemented, NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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))
add(Clause(2, "sys_read_infix", [NotImplemented, Place(0), Place(0), NotImplemented, NotImplemented, Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_lookup_var", 4])], -1))
add(Clause(7, "sys_lookup_var", [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))
add(Clause(9, "sys_lookup_var", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_remove_anon", 3])], -1))
add(Clause(7, "sys_remove_anon", [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))
add(Clause(1, "sys_remove_anon", [NotImplemented, Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_token", 3])], -1))
add(Clause(4, "sys_current_token", [Place(0), Skeleton("t", [Place(0), Place(1), Place(2), Place(3)]), Skeleton("t", [Place(0), Place(1), Place(2), Place(3)])], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_options", 3])], -1))
add(Clause(4, "sys_current_options", [Place(0), Skeleton("t", [Place(1), Place(0), Place(2), Place(3)]), Skeleton("t", [Place(1), Place(0), Place(2), Place(3)])], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_reach_code", 3])], -1))
add(Clause(5, "sys_reach_code", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_vars", 3])], -1))
add(Clause(5, "sys_current_vars", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_set_vars", 3])], -1))
add(Clause(5, "sys_set_vars", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_current_sings", 3])], -1))
add(Clause(5, "sys_current_sings", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_set_sings", 3])], -1))
add(Clause(5, "sys_set_sings", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_factor", 6])], -1))
add(Clause(10, "sys_read_factor", [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))
add(Clause(3, "sys_read_factor", ["anon", NotImplemented, NotImplemented, 0, Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("sys_next_token"), [Place(1), Place(2)])], 0))
add(Clause(6, "sys_read_factor", [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))
add(Clause(9, "sys_read_factor", ["[", 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(Clause(9, "sys_read_factor", ["{", 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(Clause(7, "sys_read_factor", ["(", 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(Clause(4, "sys_read_factor", [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))
add(Clause(2, "sys_read_factor", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_atom", 7])], -1))
add(Clause(13, "sys_read_atom", [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))
add(Clause(11, "sys_read_atom", [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("sys_read_neg"), [Place(9), Place(2), Place(10), Place(6)])], 0))
add(Clause(12, "sys_read_atom", [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))
add(Clause(2, "sys_read_atom", [NotImplemented, Place(0), Place(0), NotImplemented, 0, Place(1), Place(1)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_prefix", 9])], -1))
add(Clause(4, "sys_read_prefix", [",", 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(Clause(4, "sys_read_prefix", ["|", 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(Clause(4, "sys_read_prefix", [")", 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(Clause(4, "sys_read_prefix", ["]", 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(Clause(4, "sys_read_prefix", ["}", 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(Clause(4, "sys_read_prefix", [".", 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(Clause(11, "sys_read_prefix", [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), Clause(2, "", [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("="), [Place(0), Place(1)])], -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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_neg", 4])], -1))
add(Clause(5, "sys_read_neg", [Place(1), Place(2), Place(3), Place(4)], [Skeleton(Cache("number"), [Place(1)]), Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("is"), [Place(2), Skeleton(Cache("-"), [Place(1)])]), Skeleton(Cache("="), [Place(3), Place(4)])], 0))
add(Clause(2, "sys_read_neg", [NotImplemented, NotImplemented, Place(0), Place(1)], [Skeleton(Cache("sys_sync_throw"), [Skeleton("error", [Frozen("syntax_error", ["illegal_number"]), NotImplemented]), Place(0), Place(1)])], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_args", 4])], -1))
add(Clause(9, "sys_read_args", [",", 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(Clause(1, "sys_read_args", [NotImplemented, "[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_list", 6])], -1))
add(Clause(9, "sys_read_list", ["]", 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(Clause(9, "sys_read_list", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_rest", 4])], -1))
add(Clause(9, "sys_read_rest", [",", 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(Clause(5, "sys_read_rest", ["|", 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(Clause(1, "sys_read_rest", [NotImplemented, "[]", Place(0), Place(0)], [], -1))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_set", 6])], -1))
add(Clause(9, "sys_read_set", ["}", 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(Clause(5, "sys_read_set", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_read_end", 3])], -1))
add(Clause(5, "sys_read_end", [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))
add(Clause(3, "sys_read_end", [".", 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(Clause(3, "sys_read_end", ["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))
add(Clause(3, "sys_read_end", [")", 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(Clause(3, "sys_read_end", ["}", 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(Clause(2, "sys_read_end", ["]", 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(Clause(8, "sys_next_token", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_throw", 3])], -1))
add(Clause(3, "sys_sync_throw", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_raise", 3])], -1))
add(Clause(6, "sys_sync_raise", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_tokens", 3])], -1))
add(Clause(4, "sys_sync_tokens", [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))
add(Clause(4, "sys_sync_tokens", [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))
add(Clause(4, "sys_sync_tokens", [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))
add(Clause(4, "sys_sync_tokens", [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))
add(Clause(3, "sys_sync_tokens", [".", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(3, "sys_sync_tokens", ["end_of_file", Place(1), Place(2)], [Skeleton(Cache("$CUT"), [Place(0)]), Skeleton(Cache("="), [Place(1), Place(2)])], 0))
add(Clause(5, "sys_sync_tokens", [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))
run(Goal(0, [Frozen(Cache("sys_usage_predicate"), ["sys_sync_token", 2])], -1))
add(Clause(6, "sys_sync_token", [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))








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
