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

const MASK_TOUCH_DYNAMIC = 0x00000001;
const MASK_TOUCH_BOTTOM = 0x00000002;
const MASK_REMOVE_REVERSE = 0x00000001;

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

let kb = {};
let stage = -1;

function set_stage(num) {
    stage = num;
}

function set_partition(path) {
    engine.partition = path;
}


const SYS_MASK_STATE_ASYNC = 0x00000080;

function Engine() {
    this.signal = undefined;
    this.abort = () => {};
    this.flags = SYS_MASK_STATE_ASYNC;
    this.text_output = undefined;
    this.text_error = undefined;
    this.text_input = undefined;
    this.low = 0;
    this.high = 0;
    this.serno = 0;
    this.backtrail = null;
    this.partition = (stage === -1 ? "system" : "user");
}

let engine = new Engine();

function set_engine(ptr) {
    engine = ptr;
}


function Variable() {
    this.instantiated = undefined;
    this.flags = VAR_MASK_SERNO;
    this.tail = null;
}

function is_variable(obj) {
    return obj instanceof Variable;
}

function Structure(functor, args) {
    this.functor = functor;
    this.args = args;
}


function is_structure(obj) {
    return obj instanceof Structure;
}

class Compound extends Structure {
    constructor(functor, args) {
        super(functor, args);
        this.walk = 0;
    }
}

function is_compound(obj) {
    return obj instanceof Compound;
}

class Frozen extends Structure {
    constructor(functor, args) {
        super(functor, args);
    }
}

function is_frozen(obj) {
    return obj instanceof Frozen;
}


function Place(index) {
    this.index = index;
}

function is_place(obj) {
    return obj instanceof Place;
}

function Skeleton(functor, args) {
    this.functor = functor;
    this.args = args;
}

function is_skeleton(obj) {
    return obj instanceof Skeleton;
}


function Quote(obj) {
    this.obj = obj;
}

function is_quote(obj) {
    return obj instanceof Quote;
}

function unquote_objects(body) {
    for (let i = 0; i < body.length; i++) {
        let alpha = body[i];
        if (is_quote(alpha))
            body[i] = alpha.obj;
    }
}


function deref(term) {
    while (is_variable(term) && term.instantiated !== undefined)
        term = term.instantiated;
    return term;
}

function copy_term(first) {
    let res = walk_link(first);
    walk_unlink(first);
    return res;
}

function walk_link(first) {
    let stack = null;
    for (; ; ) {
        first = deref(first);
        if (is_variable(first)) {
            if (first.tail === null) {
                let peek = new Variable();
                first.tail = peek;
                first = peek;
            } else {
                first = first.tail;
            }
        } else if (is_compound(first)) {
            if (!is_structure(first.functor)) {
                first.functor = new Compound(first.functor,
                    new Array(first.args.length));
                first.walk &= ~VAR_MASK_SERNO;
                stack = stack_push(stack, first);
                first = first.args[0];
                continue;
            } else {
                first = first.functor;
            }
        }
        let item = stack_peek(stack);
        while (item !== null &&
        (item.walk & VAR_MASK_SERNO) === item.args.length - 1) {
            item.functor.args[item.walk & VAR_MASK_SERNO] = first;
            first = item.functor;
            stack_pop(stack);
            item = stack_peek(stack);
        }
        if (item === null) {
            return first;
        } else {
            item.functor.args[item.walk & VAR_MASK_SERNO] = first;
            item.walk++;
            first = item.args[item.walk & VAR_MASK_SERNO];
        }
    }
}

function walk_unlink(first) {
    let stack = null;
    for (; ; ) {
        first = deref(first);
        if (is_variable(first)) {
            if (first.tail !== null)
                first.tail = null;
        } else if (is_compound(first)) {
            if (is_structure(first.functor)) {
                first.functor = first.functor.functor;
                if (0 !== first.args.length - 1) {
                    first.walk &= ~VAR_MASK_SERNO;
                    stack = stack_push(stack, first);
                }
                first = first.args[0];
                continue;
            }
        }
        let item = stack_peek(stack);
        if (item === null) {
            return;
        } else {
            item.walk++;
            first = item.args[item.walk & VAR_MASK_SERNO];
            if ((item.walk & VAR_MASK_SERNO) === item.args.length - 1)
                stack_pop(stack);
        }
    }
}

function stack_push(stack, elem) {
    if (stack === null)
        stack = new Array(0);
    stack.push(elem);
    return stack;
}

function stack_peek(stack) {
    if (stack === null)
        return null;
    if (stack.length === 0)
        return null;
    return stack[stack.length-1];
}

function stack_pop(stack) {
    stack.pop();
}


function assoc_get(map, key) {
    if (map === null)
        return undefined;
    return map.get(key);
}

function assoc_set(map, key, value) {
    if (map === null)
        map = new Map();
    map.set(key, value);
    return map;
}


function Goal(size, body, cutvar) {
    this.size = size;
    this.body = body;
    this.cutvar = cutvar;
}

function is_goal(obj) {
    return obj instanceof Goal;
}

function Clause(size, head, body, cutvar, idxval) {
    this.size = size;
    this.head = head;
    this.body = body;
    this.cutvar = cutvar;
    this.idxval = idxval;
    this.creator = stage;
    this.remover = undefined;
    this.shard = "";
}

function is_clause(obj) {
    return obj instanceof Clause;
}

function Logical(cache, count, data) {
    this.cache = cache;
    this.count = count;
    this.data = data;
}

function is_logical(obj) {
    return obj instanceof Logical;
}


function Provable() {
    this.flags = 0;
    this.rope = undefined;
    this.nonguard = undefined;
    this.idxmap = undefined;
    this.func = undefined;
    this.creator = stage;
    this.remover = undefined;
    this.overlay = undefined;
}

function is_provable(obj) {
    return obj instanceof Provable;
}

function Cache(name) {
    this.link = undefined;
    this.name = name;
}

function is_cache(obj) {
    return obj instanceof Cache;
}


function snapshot_data(rope) {
    let res = rope.cache;
    if (res === null) {
        res = new Array(rope.count);
        rope_copy(res, rope);
        rope.cache = res;
    }
    return res;
}

function rope_copy(res, rope) {
    let data = rope.data;
    let j = 0;
    for (let i = 0; i < data.length; i++) {
        let clause = data[i];
        if (clause.remover === undefined)
            res[j++] = clause;
    }
}


function ensure_link(cache, arity) {
    let peek = cache.link;
    if (peek === undefined || peek.remover !== undefined) {
        peek = pred_link(cache.name, arity);
        cache.link = peek;
    }
    return peek;
}

function pred_link(functor, arity) {
    let temp = kb[functor];
    if (temp === undefined)
        return undefined;
    let peek = temp[arity];
    if (peek === undefined || peek.remover !== undefined)
        return undefined;
    return peek;
}

function make_defined(rope, offset) {
    let peek = new Provable();
    peek.flags |= offset;
    peek.rope = new_rope();
    peek.nonguard = new_rope();
    peek.idxmap = new Map();
    for (let i = 0; i < rope.length; i++)
        add_peek(peek, rope[i], MASK_TOUCH_BOTTOM);
    return peek;
}

function new_rope() {
    return new Logical(null, 0, new Array(0));
}



function pred_touch(functor, arity, flags) {
    let temp = kb[functor];
    if (temp === undefined) {
        temp = new Array(0);
        kb[functor] = temp;
    }
    let peek = temp[arity];
    if (peek === undefined || peek.remover !== undefined) {
        let res = make_defined(VOID_ARGS, 1);
        if (peek !== undefined)
            res.overlay = peek;
        if ((flags & MASK_TOUCH_DYNAMIC) !== 0)
            res.flags |= MASK_PRED_DYNAMIC;
        temp[arity] = res;
    } else {
        if (!is_logical(peek.rope))
            throw make_error(new Compound("permission_error",
                ["modify", "static_procedure",
                    make_indicator(functor, arity)]));
        if ((flags & MASK_TOUCH_DYNAMIC) !== 0)
            if ((peek.flags & MASK_PRED_DYNAMIC) === 0)
                throw make_error(new Compound("permission_error",
                    ["modify", "static_procedure",
                        make_indicator(functor, arity)]));
    }
}


function pred_destroy(functor, arity) {
    let temp = kb[functor];
    if (temp === undefined)
        return;
    let peek = temp[arity];
    if (peek === undefined || peek.remover !== undefined)
        return;
    if (peek.creator === stage) {
        peek = clear_pop(peek);
        temp[arity] = peek;
        if (peek === undefined && trim_arities(temp))
            delete kb[functor];
    } else {
        peek.remover = stage;
    }
}

function clear_pop(peek) {
    peek.remover = stage;
    peek.rope = undefined;
    peek.idxmap = undefined;
    peek.nonguard = undefined;
    peek.func = undefined;

    let back = peek;
    peek = back.overlay;
    back.overlay = undefined;
    return peek;
}

function trim_arities(peek) {
    let pos = peek.length;
    while (pos > 0 && peek[pos - 1] === undefined)
        pos--;
    if (pos === 0)
        return true;
    if (pos !== peek.length)
        peek.splice(pos, peek.length - pos);
    return false;
}


function clear() {
    for (let functor in kb) {
        let temp = kb[functor];
        for (let i = 0; i < temp.length; i++) {
            let peek = temp[i];
            if (peek === undefined)
                continue;
            if (peek.creator === stage) {
                peek = clear_pop(peek);
                temp[i] = peek;
                if (peek === undefined)
                    continue;
            }
            if (peek.remover === stage)
                peek.remover = undefined;
            if (is_logical(peek.rope))
                rollback_peek(peek);
        }
        if (trim_arities(temp))
            delete kb[functor]
    }
}

function rollback_peek(peek) {
    if (!has_action(peek.rope))
        return;
    for (let [key,value] of peek.idxmap) {
        if (has_action(value)) {
            rollback_rope(value, false);
            if (value.data.length === 0)
                peek.idxmap.delete(key);
        }
    }
    if (has_action(peek.nonguard))
        rollback_rope(peek.nonguard, false);
    rollback_rope(peek.rope, true);
}

function has_action(rope) {
    let data = rope.data;
    for (let i = 0; i < data.length; i++) {
        let clause = data[i];
        if (clause.creator === stage)
            return true;
        if (clause.remover === stage)
            return true;
    }
    return false;
}

function rollback_rope(rope, update) {
    let data = rope.data;
    let j = 0;
    for (let i = 0; i < data.length; i++) {
        let clause = data[i];
        if (clause.creator === stage) {
            rope.count--;
        } else {
            if (clause.remover === stage) {
                if (update)
                    clause.remover = undefined;
                rope.count++;
            }
            data[j++] = clause;
        }
    }
    data.splice(j);
    rope.cache = null;
}


function add(functor, arity, clause_or_pred) {
    add_clause(functor, arity, clause_or_pred, MASK_TOUCH_BOTTOM);
}

function add_clause(functor, arity, clause_or_pred, flags) {
    let temp = kb[functor];
    if (temp === undefined) {
        temp = new Array(0);
        kb[functor] = temp;
    }
    let peek = temp[arity];
    if (is_clause(clause_or_pred)) {
        if (peek === undefined || peek.remover !== undefined) {
            let res = make_defined(VOID_ARGS, 1);
            if (peek !== undefined)
                res.overlay = peek;
            if ((flags & MASK_TOUCH_DYNAMIC) !== 0)
                res.flags |= MASK_PRED_DYNAMIC;
            temp[arity] = res;
            peek = res;
        } else {
            if (!is_logical(peek.rope))
                throw make_error(new Compound("permission_error",
                    ["modify", "static_procedure",
                        make_indicator(functor, arity)]));
            if ((flags & MASK_TOUCH_DYNAMIC) !== 0)
                if ((peek.flags & MASK_PRED_DYNAMIC) === 0)
                    throw make_error(new Compound("permission_error",
                        ["modify", "static_procedure",
                            make_indicator(functor, arity)]));
        }
        if ((flags & MASK_TOUCH_DYNAMIC) === 0)
            clause_or_pred.shard = engine.partition;
        add_peek(peek, clause_or_pred, flags);
    } else if (is_provable(clause_or_pred)) {
        if (peek === undefined || peek.remover !== undefined) {
            if (peek !== undefined)
                clause_or_pred.overlay = peek;
            temp[arity] = clause_or_pred;
        } else {
            throw make_error(new Compound("permission_error",
                ["coerce", "procedure", make_indicator(functor, arity)]));
        }
    } else {
        throw make_error(new Compound("permission_error",
            ["coerce", "procedure", make_indicator(functor, arity)]));
    }
}

function add_peek(peek, clause, flags) {
    add_rope(peek.rope, clause, flags);
    let idxval = clause.idxval;
    if (idxval === undefined) {
        for (let [key, value] of peek.idxmap)
            add_rope(value, clause, flags);
        add_rope(peek.nonguard, clause, flags);
    } else {
        let value = peek.idxmap.get(idxval);
        if (value === undefined) {
            value = clone_rope(peek.nonguard);
            peek.idxmap.set(idxval, value);
        }
        add_rope(value, clause, flags);
    }
}

function add_rope(rope, clause, flags) {
    if ((flags & MASK_TOUCH_BOTTOM) !== 0) {
        rope.data.push(clause);
    } else {
        rope.data.unshift(clause);
    }
    rope.count++;
    rope.cache = null;
}

function clone_rope(rope) {
    return new Logical(rope.cache, rope.count, rope.data.slice());
}


function remove_clause(functor, arity, clause, flags) {
    let temp = kb[functor];
    if (temp === undefined)
        return false;
    let peek = temp[arity];
    if (peek === undefined || peek.remover !== undefined)
        return false;
    if (!is_logical(peek.rope))
        throw make_error(new Compound("permission_error",
            ["modify", "static_procedure", make_indicator(functor, arity)]));
    return remove_peek(peek, clause, flags);
}

function remove_peek(peek, clause, flags) {
    if (clause.remover !== undefined)
        return false;
    if (!remove_rope(peek.rope, clause, flags))
        return false;
    let idxval = clause.idxval;
    if (idxval === undefined) {
        for (let [key,value] of peek.idxmap) {
            remove_rope(value, clause, flags);
            if (value.data.length === 0)
                peek.idxmap.delete(key);
        }
        remove_rope(peek.nonguard, clause, flags);
    } else {
        let value = peek.idxmap.get(idxval);
        remove_rope(value, clause, flags);
        if (value.data.length === 0)
            peek.idxmap.delete(idxval);
    }
    clause.remover = stage;
    return true;
}

function remove_rope(rope, clause, flags) {
    let data = rope.data;
    let index;
    if ((flags & MASK_REMOVE_REVERSE) === 0) {
        index = data.indexOf(clause);
    } else {
        index = data.lastIndexOf(clause);
    }
    if (index  === -1)
        return false;
    if (clause.creator === stage)
        data.splice(index, 1);
    rope.count--;
    rope.cache = null;
    return true;
}


const VOID_ARGS = [];

let fs;
let url;
let path;
let os;
if (typeof window === 'undefined') {
    fs = await import("node:fs");
    url = await import("node:url");
    path = await import("node:path");
    os = await import("node:os");
} else {
    fs = undefined;
    url = undefined;
    path = undefined;
    os = undefined;
}

let trail = null;
let redo = null;
let call = "[]";

function make_error(beta) {
    return new Compound("error", [beta, fetch_stack(ctx)]);
}

function fetch_stack(buf) {
    let temp = pred_link("sys_including", 3);
    if (temp === undefined || !is_logical(temp.rope))
        return "[]";
    let data = snapshot_data(temp.rope);
    let back = null;
    let res = null;
    for (let i = 0; i < data.length; i++) {
        let elem = fetch_frame(data[i]);
        if (elem.args[1] !== buf)
            continue;
        elem = new Compound("sys_including", [elem.args[0], elem.args[2]]);
        elem = new Compound(".", [elem, undefined]);
        if (back === null) {
            res = elem;
        } else {
            back.args[1] = elem;
        }
        back = elem;
    }
    if (back === null) {
        res = "[]";
    } else {
        back.args[1] = "[]";
    }
    return res;
}

function fetch_frame(clause) {
    let display;
    if (clause.size !== 0) {
        display = new Array(clause.size);
    } else {
        display = null;
    }
    temp_display = display;
    let args = new Array(clause.head.length);
    for (let i = 0; i < args.length; i++)
        args[i] = exec_build(clause.head[i]);
    temp_display = null;
    return new Compound("sys_including", args);
}

function make_indicator(functor, arity) {
    if (is_cache(functor))
        functor = functor.name;
    return new Compound("/", [functor, arity]);
}


let GC_MAX_INFERS = 128000;

let gc_mask = VAR_MASK_ODD;

let gc_last = 0;
let gc_time = 0;
let gc_enter = 0;
let gc_tick = GC_MAX_INFERS;
let gc_tack = 60*GC_MAX_INFERS;
let gc_tock = 3600*GC_MAX_INFERS;

function real_time() {
    if (fs !== undefined) {
        return Number((process.hrtime.bigint() + 500000n) / 1000000n);
    } else {
        return Math.round(performance.now());
    }
}


function gc_major() {
    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(null);
    gc_time += real_time();
}

function mark_term(first) {
    let stack = null;
    for (;;) {
        if (is_variable(first)) {
            if ((first.flags & VAR_MASK_STATE) !== gc_mask) {
                first.flags = (first.flags & ~VAR_MASK_STATE) | gc_mask;
                let val = first.flags & VAR_MASK_SERNO;
                if (val !== VAR_MASK_SERNO) {
                    if (val > engine.serno)
                        engine.serno = val + 1;
                    if (engine.low <= val && val < engine.high) {
                        if (val - engine.low > engine.high - val) {
                            engine.high = val;
                        } else {
                            engine.low = val + 1;
                        }
                    }
                }
                if (first.instantiated !== undefined) {
                    let peek = first.instantiated;
                    first.instantiated = stack;
                    stack = first;
                    first = peek;
                    continue;
                }
            }
        } else if (is_compound(first)) {
            if ((first.walk & VAR_MASK_STATE) !== gc_mask) {
                first.walk = (first.walk & ~VAR_MASK_STATE) | gc_mask;
                let peek = first.args[0];
                first.args[0] = stack;
                first.walk &= ~VAR_MASK_SERNO;
                stack = first;
                first = peek;
                continue;
            }
        }
        while (stack !== null && (is_variable(stack) ||
            (stack.walk & VAR_MASK_SERNO) === stack.args.length - 1)) {
            if (is_variable(stack)) {
                let peek = stack.instantiated;
                stack.instantiated = first;
                first = stack;
                stack = peek;
            } else {
                let peek = stack.args[stack.walk & VAR_MASK_SERNO];
                stack.args[stack.walk & VAR_MASK_SERNO] = first;
                first = stack;
                stack = peek;
            }
        }
        if (stack === null) {
            return;
        } else {
            let peek = stack.args[stack.walk & VAR_MASK_SERNO];
            stack.args[stack.walk & VAR_MASK_SERNO] = first;
            stack.walk++;
            first = stack.args[stack.walk & VAR_MASK_SERNO];
            stack.args[stack.walk & VAR_MASK_SERNO] = peek;
        }
    }
}

function mark_redo() {
    let term = call;
    let last = redo;
    for (;;) {
        mark_term(term);
        if (last === null)
            break;
        term = last.cont;
        last = last.tail;
    }
}


function gc_minor() {
    gc_time -= real_time();
    mark2_redo();
    mark2_trail(engine.backtrail);
    adjust_redo();
    sweep_trail(engine.backtrail);
    let gc_now = real_time();
    gc_time += gc_now;
    let val = gc_now - gc_last;
    gc_last = gc_now;
    val = Math.round(GC_MAX_INFERS * 1000 / val);
    GC_MAX_INFERS = Math.round((3 * GC_MAX_INFERS + val) / 4);
}

function mark2_term(first) {
    let stack = null;
    for (;;) {
        if (is_variable(first)) {
            if ((first.flags & VAR_MASK_STATE) !== gc_mask) {
                first.flags = (first.flags & ~VAR_MASK_STATE) | gc_mask;
                if (first.instantiated !== undefined) {
                    let peek = first.instantiated;
                    first.instantiated = stack;
                    stack = first;
                    first = peek;
                    continue;
                }
            }
        } else if (is_compound(first)) {
            if ((first.walk & VAR_MASK_STATE) !== gc_mask) {
                first.walk = (first.walk & ~VAR_MASK_STATE) | gc_mask;
                let peek = first.args[0];
                first.args[0] = stack;
                first.walk &= ~VAR_MASK_SERNO;
                stack = first;
                first = peek;
                continue;
            }
        }
        while (stack !== null && (is_variable(stack) ||
            (stack.walk & VAR_MASK_SERNO) === stack.args.length - 1)) {
            if (is_variable(stack)) {
                let peek = stack.instantiated;
                stack.instantiated = first;
                first = stack;
                stack = peek;
            } else {
                let peek = stack.args[stack.walk & VAR_MASK_SERNO];
                stack.args[stack.walk & VAR_MASK_SERNO] = first;
                first = stack;
                stack = peek;
            }
        }
        if (stack === null) {
            return;
        } else {
            let peek = stack.args[stack.walk & VAR_MASK_SERNO];
            stack.args[stack.walk & VAR_MASK_SERNO] = first;
            stack.walk++;
            first = stack.args[stack.walk & VAR_MASK_SERNO];
            stack.args[stack.walk & VAR_MASK_SERNO] = peek;
        }
    }
}

function mark2_redo() {
    let term = call;
    let last = redo;
    for (;;) {
        mark2_term(term);
        if (last === null)
            break;
        term = last.cont;
        last = last.tail;
    }
}


function adjust_redo() {
    let last = redo;
    while (last !== null) {
        let temp = last.mark;
        while (temp !== null) {
            if ((temp.flags & VAR_MASK_STATE) === gc_mask) {
                break;
            } else {
                temp = temp.tail;
            }
        }
        last.mark = temp;
        last = last.tail;
    }
}

function mark2_trail(stop) {
    let temp = trail;
    while (temp !== stop) {
        if ((temp.flags & VAR_MASK_STATE) === VAR_MASK_STATE)
            mark2_term(temp);
        temp = temp.tail;
    }
}

function sweep_trail(stop) {
    let temp = trail;
    let back = null;
    while (temp !== stop) {
        let term = temp;
        temp = term.tail;
        if ((term.flags & VAR_MASK_STATE) === gc_mask) {
            if (back !== null) {
                back.tail = term;
            } else {
                trail = term;
            }
            back = term;
        } else {
            term.instantiated = undefined;
            term.tail = null;
        }
    }
    if (back !== null) {
        back.tail = stop;
    } else {
        trail = stop;
    }
    engine.backtrail = trail;
}


function solve_signal(rope,at,choice) {
    if (engine.signal !== undefined) {
        let message = engine.signal;
        engine.signal = undefined;
        throw make_error(message);
    }
    return true;
}


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

function cont(term) {
    call = term;
}

function solve(snap, found) {
    for (; ;) {
        if (found === true) {
            if (gc_enter >= gc_tick) {
                if (gc_enter >= gc_tock) {
                    gc_major();
                    gc_tock += 3600*GC_MAX_INFERS;
                } else if (gc_enter >= gc_tack) {
                    gc_minor();
                    gc_tack += 60*GC_MAX_INFERS;
                }
                gc_tick += GC_MAX_INFERS;
                if ((engine.flags & SYS_MASK_ASYNC_MODE) !== 0) {
                    more(new Choice(solve_signal, null, 0, trail));
                    return immediate_promise();
                }
            }
            let goal = call;
            if (is_structure(goal)) {
                gc_enter++;
                goal = goal.args[0];
                let peek = lookup_pred(goal);
                if (peek === undefined || (peek.flags & MASK_PRED_ARITH) !== 0)
                    throw make_error(new 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 (!peek.func(goal)) {
                        found = false;
                    } else {
                        cont(call.args[1]);
                        found = true;
                    }
                } else if ((peek.flags & MASK_PRED_SPECIAL) !== 0) {
                    found = peek.func(goal);
                } else {
                    peek = defined_clauses(peek, goal);
                    found = solve2_rope(goal, snapshot_data(peek), 0, null);
                }
            } else {
                break;
            }
        } else if (found === false) {
            if (redo !== snap) {
                let 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;
}

function immediate_promise() {
    return new Promise(resolve => setDelay(resolve, 0));
}

function lookup_pred(goal) {
    let functor;
    let arity;
    if (is_structure(goal)) {
        functor = goal.functor;
        arity = goal.args.length;
    } else {
        functor = goal;
        arity = 0;
    }
    return resolve_functor(functor, arity);
}

function resolve_functor(functor, arity) {
    if (is_cache(functor)) {
        return ensure_link(functor, arity);
    } else if (is_atom(functor)) {
        return pred_link(functor, arity);
    } else if (is_provable(functor)) {
        return functor;
    } else {
        check_nonvar(functor);
        functor = copy_term(functor);
        throw make_error(new Compound("type_error",
            ["callable", functor]));
    }
}

function make_indicator_term(goal) {
    let functor;
    let arity;
    if (is_structure(goal)) {
        functor = goal.functor;
        arity = goal.args.length;
    } else {
        functor = goal;
        arity = 0;
    }
    return make_indicator(functor, arity);
}

function solve_rope(rope, at, choice) {
    let goal = deref(call.args[0]);
    if (is_structure(goal)) {
        goal = goal.args;
    } else {
        goal = VOID_ARGS;
    }
    return solve2_rope(goal, rope, at, choice);
}

function solve2_rope(paras, rope,at,choice) {
    let mark = trail;
    while (at < rope.length) {
        let clause = rope[at++];
        let display;
        if (clause.size !== 0) {
            display = new Array(clause.size);
        } else {
            display = null;
        }
        if (exec_head(clause.head, display, paras)) {
            let peek = clause.cutvar;
            if (peek !== -1)
                display[peek] = redo;
            if (at < rope.length) {
                if (choice === null) {
                    choice = new Choice(solve_rope, rope, at, mark);
                } else {
                    choice.at = at;
                }
                more(choice);
                if (exec_check(clause.body, display))
                    return true;
                if (redo !== choice)
                    return false;
                more(choice.tail);
            } else {
                return exec_check(clause.body, display);
            }
        }
        unbind(mark);
    }
    return false;
}

function more(choice) {
    redo = choice;
}

function Choice(func, data, at, mark) {
    this.func = func;
    this.data = data;
    this.at = at;
    this.mark = mark;
    this.cont = call;
    this.tail = redo;
}


function defined_clauses(pred, args) {
    let peek = pred.rope;
    if (peek.count < 2)
        return peek;
    let offset = pred.flags & MASK_PRED_INDEX;
    if (args.length >= offset && pred.idxmap.size > 0) {
        let key = key_value(args[offset-1]);
        if (key === undefined) {
            return peek;
        } else {
            peek = pred.idxmap.get(key);
            if (peek === undefined) {
                return pred.nonguard;
            } else {
                return peek;
            }
        }
    } else {
        return peek;
    }
}

function key_value(term) {
    term = deref(term);
    if (is_variable(term)) {
        return undefined;
    } else if (is_structure(term)) {
        return term.functor;
    } else {
        return term;
    }
}


let CTX_MAIN = "main";

function run(goal) {
    if (!launch(goal, CTX_MAIN, VOID_ARGS))
        throw make_error(new Compound("syntax_error", ["directive_failed"]));
}

function snap_setup() {
    redo = new Choice(solve_setup, null, 0, trail);
    return redo;
}

function solve_setup(rope,at,choice) {
    return false;
}

function snap_cleanup(snap) {
    more(snap.tail);
    unbind(snap.mark);
    call = snap.cont;
}


function is_atom(obj) {
    return typeof obj === "string";
}

function is_number(obj) {
    if (typeof obj === "number")
        return true;
    if (typeof obj === "bigint")
        return true;
    return false;
}

function is_integer(obj) {
    if (typeof obj === "number" &&
        Number.isInteger(obj) &&
        ((-94906266 <= obj) && (obj <= 94906266)))
        return true;
    if (typeof obj === "bigint" &&
        !((-94906266 <= obj) && (obj <= 94906266)))
        return true;
    return false;
}

function is_float(obj) {
    if (typeof obj === "number" &&
        (!Number.isInteger(obj) ||
            !((-94906266 <= obj) && (obj <= 94906266))))
        return true;
    if (typeof obj === "bigint" &&
        ((-94906266 <= obj) && (obj <= 94906266)))
        return true;
    return false;
}


let temp_display = null;

function is_pending(template) {
    if (template === undefined) {
        return true;
    } else if (is_place(template)) {
        return true;
    } else {
        return false;
    }
}

function exec_deref(template) {
    if (template === undefined) {
        return template;
    } else if (is_place(template)) {
        let index = template.index;
        let peek = temp_display[index];
        if (peek === undefined) {
            return template;
        } else {
            return deref(peek);
        }
    } else {
        return deref(template);
    }
}


function exec_build(template) {
    let back = null;
    for (; ;) {
        if (template === undefined) {
            template = new Variable();
            break;
        } else if (is_place(template)) {
            let index = template.index;
            template = temp_display[index];
            if (template === undefined) {
                template = new Variable();
                temp_display[index] = template;
            } else {
                template = deref(template);
            }
            break;
        } else if (is_skeleton(template)) {
            let args = new Array(template.args.length);
            args[args.length - 1] = back;
            back = new Compound(template.functor, args);
            template = template.args;
            let i = 0;
            for (; i < args.length - 1; i++)
                args[i] = exec_build(template[i]);
            template = template[i];
        } else {
            template = deref(template);
            break;
        }
    }
    while (back !== null) {
        let peek = back.args[back.args.length - 1];
        back.args[back.args.length - 1] = template;
        template = back;
        back = peek;
    }
    return template;
}

function exec_unify(template, alpha) {
    for (; ;) {
        if (template === undefined) {
            return true;
        } else if (is_place(template)) {
            let index = template.index;
            template = temp_display[index];
            if (template === undefined) {
                temp_display[index] = deref(alpha);
                return true;
            } else {
                return unify(alpha, template);
            }
        } else if (is_skeleton(template)) {
            alpha = deref(alpha);
            if (is_variable(alpha)) {
                let args = new Array(template.args.length);
                bind(new Compound(template.functor, args), alpha);
                template = template.args;
                for (let i = 0; i < args.length; i++)
                    args[i] = exec_build(template[i]);
                return true;
            } else if (is_structure(alpha)) {
                if (template.args.length !== alpha.args.length)
                    return false;
                if (template.functor !== alpha.functor)
                    return false;
                template = template.args;
                alpha = alpha.args;
                let i = 0;
                for (; i < template.length - 1; i++)
                    if (!exec_unify(template[i], alpha[i]))
                        return false;
                template = template[i];
                alpha = alpha[i];
            } else {
                return false;
            }
        } else {
            return unify(template, alpha);
        }
    }
}


function exec_body(code, display) {
    temp_display = display;
    let back = null;
    let res = null;
    for (let i = 0; i < code.length; i++) {
        let goal = exec_build(code[i]);
        let temp = new Compound(".", [goal, undefined]);
        if (back === null) {
            res = temp;
        } else {
            back.args[1] = temp;
        }
        back = temp;
    }
    if (back === null) {
        res = "[]";
    } else {
        back.args[1] = "[]";
    }
    temp_display = null;
    return res;
}

function exec_head(code, display, aux) {
    if (aux.length !== code.length)
        return false;
    temp_display = display;
    for (let i = 0; i < code.length; i++) {
        if (!exec_unify(code[i], aux[i])) {
            temp_display = null;
            return false;
        }
    }
    temp_display = null;
    return true;
}


function exec_eval(template) {
    if (is_skeleton(template)) {
        let peek = resolve_functor(template.functor, template.args.length + 1);
        if (peek === undefined || (peek.flags & MASK_PRED_ARITH) === 0)
            throw make_error(new Compound("type_error",
                ["evaluable", make_indicator(template.functor, template.args.length)]));
        return peek.func(template.args);
    } else {
        if (template === undefined) {
            throw make_error("instantiation_error");
        } else if (is_place(template)) {
            let index = template.index;
            template = temp_display[index];
            if (template === undefined)
                throw make_error("instantiation_error");
        }
        template = deref(template);
        if (is_number(template))
            return template;
        let peek = lookup_eval(template);
        if (peek === undefined || (peek.flags & MASK_PRED_ARITH) === 0)
            throw make_error(new Compound("type_error",
                ["evaluable", make_indicator_term(template)]));
        if (is_structure(template)) {
            template = template.args;
        } else {
            template = VOID_ARGS;
        }
        return peek.func(template);
    }
}

function exec_test(template) {
    if (is_skeleton(template)) {
        let peek = resolve_functor(template.functor, template.args.length);
        if (peek === undefined || (peek.flags & MASK_PRED_TEST) === 0) {
            let args = new Array(template.args.length);
            for (let i = 0; i < args.length; i++)
                args[i] = exec_build(template.args[i]);
            if (peek === undefined || (peek.flags & MASK_PRED_ARITH) !== 0) {
                return new Compound(template.functor, args);
            } else {
                return new Compound(peek, args);
            }
        } else {
            gc_enter++;
            return peek.func(template.args);
        }
    } else {
        let peek = lookup_pred(template);
        if (peek === undefined || (peek.flags & MASK_PRED_TEST) === 0) {
            return template;
        } else {
            gc_enter++;
            if (is_structure(template)) {
                template = template.args;
            } else {
                template = VOID_ARGS;
            }
            return peek.func(template);
        }
    }
}

function exec_check(code, display) {
    temp_display = display;
    let check = true;
    let back = null;
    let res = null;
    for (let i = 0; i < code.length; i++) {
        let goal = (check ? exec_test(code[i]) : exec_build(code[i]));
        if (true === goal)
            continue;
        if (false === goal) {
            temp_display = null;
            return false;
        }
        let temp = new Compound(".", [goal, undefined]);
        if (back === null) {
            res = temp;
        } else {
            back.args[1] = temp;
        }
        back = temp;
        check = false;
    }
    if (back === null) {
        res = call.args[1];
    } else {
        back.args[1] = call.args[1];
    }
    temp_display = null;
    cont(res);
    return true;
}


function Item(first, second, idx) {
    this.first = first;
    this.second = second;
    this.idx = idx;
}

function unify(first, second) {
    let stack = null;
    let log = null;
    try {
        for (; ;) {
            first = deref(first);
            second = deref(second);
            if (is_variable(first)) {
                if (!is_variable(second) || first !== second)
                    bind(second, first);
            } else if (is_variable(second)) {
                bind(first, second);
            } else if (!is_structure(first)) {
                if (first !== second)
                    break;
            } else if (!is_structure(second)) {
                break;
            } else if (first.args.length !== second.args.length) {
                break;
            } else {
                first = union_find(first);
                second = union_find(second);
                if (first.functor !== second.functor) {
                    break;
                } else if (first !== second) {
                    log = union_add(log, first, second);
                    if (0 !== first.args.length - 1) {
                        let item2 = new Item(first, second, 0);
                        stack = stack_push(stack, item2);
                    }
                    first = first.args[0];
                    second = second.args[0];
                    continue;
                }
            }
            let item = stack_peek(stack);
            if (item === null) {
                return true;
            } else {
                item.idx++;
                first = item.first.args[item.idx];
                second = item.second.args[item.idx];
                if (item.idx === item.first.args.length - 1)
                    stack_pop(stack);
            }
        }
        return false;
    } finally {
        union_undo(log);
    }
}

function union_find(obj) {
    if (is_frozen(obj))
        return obj;
    while (is_structure(obj.functor))
        obj = obj.functor;
    return obj;
}

function union_add(log, from, to) {
    if (is_frozen(from))
        return log;
    from.functor = to;
    if (log === null)
        log = new Array(0);
    log.push(from);
    return log;
}

function union_undo(log) {
    if (log === null)
        return;
    for (let i = log.length - 1; i >= 0; i--) {
        let elem = log[i];
        elem.functor = elem.functor.functor;
    }
}

function bind(source, term) {
    term.instantiated = source;
    term.tail = trail;
    if ((term.flags & VAR_MASK_STATE) === gc_mask)
        term.flags |= VAR_MASK_STATE;
    trail = term;
}

function unbind(mark) {
    while (mark !== trail) {
        let term = trail;
        if (engine.backtrail === term)
            engine.backtrail = term.tail;
        trail = term.tail;
        term.instantiated = undefined;
        term.tail = null;
    }
}


function check_nonvar(beta) {
    if (is_variable(beta))
        throw make_error("instantiation_error");
}

function check_callable(beta) {
    if (is_variable(beta) || is_number(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["callable", beta]));
    }
}

function lookup_eval(expr) {
    let functor;
    let arity;
    if (is_structure(expr)) {
        functor = expr.functor;
        arity = expr.args.length;
    } else {
        functor = expr;
        arity = 0;
    }
    return resolve_functor(functor, arity + 1);
}


let tasks = new Array(0);

let notify = () => {};

function Context() {
    this.trail = null;
    this.redo = null;
    this.call = "[]";
    this.gc_mask = VAR_MASK_ODD;
    this.engine = new Engine();
    this.engine.text_output = engine.text_output;
    this.engine.text_error = engine.text_error;
    this.engine.text_input = engine.text_input;
    tasks.push(this);
}

function ctx_ended(buf) {
    let k = tasks.lastIndexOf(buf);
    if (k !== -1)
        tasks.splice(k, 1);
    notify();
}


function group_teardown() {
    for (let i = 0; i < tasks.length; i++) {
        let buf = tasks[i];
        let msg = new Compound("system_error", ["user_exit"]);
        register_signal(buf, msg);
        invoke_interrupt(buf);
    }
}

async function group_gather_async() {
    while (tasks.length > 0) {
        solve_signal(null, 0, null);
        let prom = wait_promise(CTX_MAIN);
        await prom;
    }
    solve_signal(null, 0, null);

}

function wait_promise(buf) {
    return new Promise(resolve => {
        function handler() {
            notify = () => {};
            register_interrupt(buf, () => {});
            resolve();
        }
        notify = handler;
        register_interrupt(buf, () => {
            notify = () => {};
            register_interrupt(buf, () => {});
            resolve();
        });
    });
}


let ctx = CTX_MAIN;

function ctx_set(buf) {
    ctx = buf;
}

function ctx_switch(buf) {
    let 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;
}


function launch(form, buf, paras) {
    if (buf !== CTX_MAIN) {
        ctx_set(buf);
        ctx_switch(buf);
    }
    let back = engine.flags & SYS_MASK_FULL_ASYNC;
    engine.flags &= ~SYS_MASK_FULL_ASYNC;
    let snap = snap_setup();
    if (is_clause(form)) {
        call = melt_clause(form, paras);
    } else if (is_goal(form)) {
        call = melt_directive(form);
    } else {
        call = form;
    }
    let found;
    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;
}

function callback(form, buf, paras) {
    try {
        return launch(form, buf, paras);
    } catch (err) {
        return false;
    }
}

function melt_directive(goal) {
    let display;
    if (goal.size !== 0) {
        display = new Array(goal.size);
    } else {
        display = null;
    }
    let peek = goal.cutvar;
    if (peek !== -1)
        display[peek] = redo;
    return exec_body(goal.body, display);
}

function melt_clause(clause, paras) {
    let display;
    if (clause.size !== 0) {
        display = new Array(clause.size);
    } else {
        display = null;
    }
    if (exec_head(clause.head, display, paras)) {
        let peek = clause.cutvar;
        if (peek !== -1)
            display[peek] = redo;
        return exec_body(clause.body, display);
    } else {
        return "[]";
    }
}


async function launch_async(form, buf, paras) {
    gc_last += real_time();
    if (buf !== CTX_MAIN) {
        ctx_set(buf);
        ctx_switch(buf);
    }
    let back = engine.flags & SYS_MASK_FULL_ASYNC;
    engine.flags |= SYS_MASK_FULL_ASYNC;
    let found = true;
    let snap = snap_setup();
    if (is_clause(form)) {
        call = melt_clause(form, paras);
    } else if (is_goal(form)) {
        call = melt_directive(form);
    } else {
        call = form;
    }
    try {
        for (;;) {
            found = solve(snap, found);
            if (found === false) {
                break;
            } else if (found !== 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 function task_async(form, buf, paras) {
    try {
        await launch_async(form, buf, paras);
    } catch (err) {
        /* */
    }
}

function setDelay(proc, delay) {
    if (delay === 0 && fs !== undefined) {
        return setImmediate(proc);
    } else {
        return setTimeout(proc, delay);
    }
}

function register_interrupt(buf, func) {
    let en = determine_engine(buf);
    en.abort = func;
}

function register_signal(buf, msg) {
    let en = determine_engine(buf);
    en.signal = msg;
}

function invoke_interrupt(buf) {
    let en = determine_engine(buf);
    en.abort();
}

function determine_engine(buf) {
    if (buf !== CTX_MAIN) {
        if (buf !== ctx) {
            return buf.engine;
        } else {
            return engine;
        }
    } else {
        if (ctx !== CTX_MAIN) {
            return ctx.engine;
        } else {
            return engine;
        }
    }
}

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

function code_property(ch) {
    return pool[pool2[buf3[ch>>10]][(ch>>4)&0x3F]][ch&0xF];
}
function code_category(ch) {
    return code_property(ch) & 0x1F;
}
function code_numeric(ch) {
    return (code_property(ch) >> 5) - 1;
}


const MAX_ARITY = 2147483647;


function make_special(func) {
    let peek = new Provable();
    peek.flags |= MASK_PRED_SPECIAL;
    peek.func = func;
    return peek;
}

function make_check(func) {
    let peek = new Provable();
    peek.flags |= MASK_PRED_TEST;
    peek.func = func;
    return peek;
}

function make_arithmetic(func) {
    let peek = new Provable();
    peek.flags |= MASK_PRED_ARITH;
    peek.func = func;
    return peek;
}


function test_fail(args) {
    return false;
}

function test_cut(args) {
    let choice = exec_build(args[0]);
    more(choice);
    return true;
}

function test_mark(args) {
    let choice = redo;
    return exec_unify(args[0], choice);
}


function special_seq(args) {
    let temp = deref(args[0]);
    solve_mark(temp);
    temp = deref(args[1]);
    solve_seq(temp);
    return true;
}

function solve_mark(temp) {
    if (temp === "nothing") {
        /* */
    } else if (is_structure(temp) &&
            temp.functor === "just" &&
            temp.args.length === 1) {
        temp = deref(temp.args[0]);
        bind(redo, temp);
    } else {
        check_nonvar(temp);
        temp = copy_term(temp);
        throw make_error(new Compound("type_error", ["maybe", temp]));
    }
}

function solve_seq(peek) {
    let back = null;
    let res = null;
    while (is_structure(peek) &&
                peek.functor === "." &&
                peek.args.length === 2) {
        let temp = deref(peek.args[0]);
        temp = new Compound(".", [temp, undefined]);
        if (back === null) {
            res = temp;
        } else {
            back.args[1] = temp;
        }
        back = temp;
        peek = deref(peek.args[1]);
    }
    check_nil(peek);
    if (back === null) {
        res = call.args[1];
    } else {
        back.args[1] = call.args[1];
    }
    cont(res);
}

function special_alt(args) {
    let goal = deref(args[0]);
    return solve_alt(goal, -1, null);
}

function solve_alt(goal, at, choice) {
    if (is_structure(goal) &&
            goal.functor === "." &&
            goal.args.length === 2) {
        let mark = trail;
        let peek = deref(goal.args[0]);
        let temp = deref(peek.args[0]);
        solve_mark(temp);
        goal = deref(goal.args[1]);
        if (is_structure(goal) &&
                goal.functor === "." &&
                goal.args.length === 2) {
            if (choice === null) {
                choice = new Choice(solve_alt, goal, -1, mark);
            } else {
                choice.data = goal;
            }
            more(choice);
        }
        temp = deref(peek.args[1]);
        solve_seq(temp);
        return true;
    } else {
        return false;
    }
}


function test_sys_raise(args) {
    let problem = exec_build(args[0]);
    throw copy_term(problem);
}

function special_sys_trap(args) {
    let goal = deref(args[0]);
    let snap = snap_setup();
    goal = new Compound(".", [goal, "[]"]);
    cont(goal);
    return solve_catch(snap, true, null);
}

function solve_catch(snap, found, choice) {
    if (choice !== null) {
        choice.mark = null;
        choice.cont = "[]";
        choice.tail = null;
    }
    try {
        found = solve(snap, found);
    } catch (err) {
        snap_cleanup(snap);
        let goal = deref(call.args[0]);
        err = map_throwable(err);
        if (!unify(goal.args[1], err))
            throw err;
        goal = deref(goal.args[2]);
        goal = new Compound(".", [goal, call.args[1]]);
        cont(goal);
        return true;
    }
    if (found === false)
        return false;
    if (redo !== snap) {
        if (choice === null) {
            choice = new Choice(solve_catch, snap, false, trail);
        } else {
            choice.mark = trail;
            choice.cont = call;
            choice.tail = redo;
        }
        more(choice);
    } else {
        more(snap.tail);
    }
    if (found === true)
        cont(snap.cont.args[1]);
    return found;
}

function map_throwable(err) {
    if (err instanceof RangeError && err.message.includes("stack"))
        err = make_error(new Compound("system_error", ["stack_overflow"]));
    return err;
}


function test_os_sleep_promise(args) {
    let delay = exec_build(args[0]);
    check_integer(delay);
    if (delay < 0)
        throw make_error(new Compound("domain_error",
            ["not_less_than_zero", delay]));
    let buf = ctx;
    return exec_unify(args[1], sleep_promise(buf, delay));
}

function sleep_promise(buf, delay) {
    return new Promise(resolve => {
        function handler() {
            register_interrupt(buf, () => {});
            resolve();
        }
        let timer = setDelay(handler, delay);
        register_interrupt(buf, () => {
            clearTimeout(timer);
            register_interrupt(buf, () => {});
            resolve()
        });
    });
}

function test_os_import_promise(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let res = {};
    if (!exec_unify(args[1], res))
        return false;
    let buf = ctx;
    return exec_unify(args[2], import_promise(buf, url, res));
}

async function import_promise(buf, path, res) {
    try {
        let path2;
        if (fs !== undefined) {
            path2 = url.pathToFileURL(path);
        } else {
            path2 = path;
        }
        res.module = await import(path2);
    } catch (err) {
        if (err instanceof SyntaxError) {
            register_signal(buf,
                new Compound("syntax_error", ["bad_module"]));
        } else {
            register_signal(buf,
                new Compound("existence_error", ["module", path]));
        }
    }
}

function test_os_invoke_main(args) {
    let module = exec_build(args[0]);
    module.main();
    return true;
}


function special_yield(args) {
    if ((engine.flags & SYS_MASK_ALLOW_YIELD) === 0)
        throw make_error(new Compound("system_error", ["illegal_yield"]));
    cont(call.args[1]);
    more(new Choice(solve_signal, null, 0, trail));
    return deref(args[0]);
}

function special_shield(args) {
    let goal = deref(args[0]);
    let snap = snap_setup();
    goal = new Compound(".", [goal, "[]"]);
    cont(goal);
    return solve_shield(snap, true, null);
}

function solve_shield(snap, found, choice) {
    if (choice !== null) {
        choice.mark = null;
        choice.cont = "[]";
        choice.tail = null;
    }
    let back = engine.flags & SYS_MASK_ASYNC_MODE;
    engine.flags &= ~SYS_MASK_ASYNC_MODE;
    try {
        found = solve(snap, found);
    } catch (x) {
        engine.flags &= ~SYS_MASK_ASYNC_MODE;
        engine.flags |= back;
        snap_cleanup(snap);
        throw x;
    }
    engine.flags &= ~SYS_MASK_ASYNC_MODE;
    engine.flags |= back;
    if (found === false)
        return false;
    if (redo !== snap) {
        if (choice === null) {
            choice = new Choice(solve_shield, snap, false, trail);
        } else {
            choice.mark = trail;
            choice.cont = call;
            choice.tail = redo;
        }
        more(choice);
    } else {
        more(snap.tail);
    }
    if (found === true)
        cont(snap.cont.args[1]);
    return found;
}

function special_unshield(args) {
    let goal = deref(args[0]);
    let snap = snap_setup();
    goal = new Compound(".", [goal, "[]"]);
    cont(goal);
    return solve_unshield(snap, true, null);
}

function solve_unshield(snap, found, choice) {
    if (choice !== null) {
        choice.mark = null;
        choice.cont = "[]";
        choice.tail = null;
    }
    let back = engine.flags & SYS_MASK_ASYNC_MODE;
    engine.flags |= SYS_MASK_ASYNC_MODE;
    try {
        found = solve(snap, found);
    } catch (x) {
        engine.flags &= ~SYS_MASK_ASYNC_MODE;
        engine.flags |= back;
        snap_cleanup(snap);
        throw x;
    }
    engine.flags &= ~SYS_MASK_ASYNC_MODE;
    engine.flags |= back;
    if (found === false)
        return false;
    if (redo !== snap) {
        if (choice === null) {
            choice = new Choice(solve_unshield, snap, false, trail);
        } else {
            choice.mark = trail;
            choice.cont = call;
            choice.tail = redo;
        }
        more(choice);
    } else {
        more(snap.tail);
    }
    if (found === true)
        cont(snap.cont.args[1]);
    return found;
}

function special_call(args) {
    let goal = deref(args[0]);
    goal = new Compound(".", [goal, call.args[1]]);
    cont(goal);
    return true;
}


function check_atom(beta) {
    if (!is_atom(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["atom", beta]));
    }
}

function check_number(beta) {
    if (!is_number(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["number", beta]));
    }
}

function check_integer(beta) {
    if (!is_integer(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["integer", beta]));
    }
}

function check_atomic(beta) {
    if (is_variable(beta) || is_structure(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["atomic", beta]));
    }
}

function check_nil(beta) {
    if (beta === "[]")
        return;
    if (is_structure(beta) && beta.functor === "."
        && beta.args.length === 2) {
        throw make_error(new Compound("representation_error",
            ["max_arity"]));
    } else {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error",
            ["list", beta]));
    }
}


function test_unify(args) {
    let alpha = exec_build(args[0]);
    return exec_unify(args[1], alpha);
}

function test_copy_term(args) {
    let alpha = exec_build(args[0]);
    alpha = copy_term(alpha);
    return exec_unify(args[1], alpha);
}


function test_univ(args) {
    let alpha = exec_deref(args[0]);
    if (is_variable(alpha) || is_pending(alpha)) {
        let 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);
    }
}

function special_univ_pack(beta) {
    if (is_structure(beta) &&
        "." === beta.functor &&
        beta.args.length === 2) {
        /* */
    } else {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["list", beta]));
    }
    let functor = deref(beta.args[0]);
    check_atomic(functor);
    beta = deref(beta.args[1]);
    let args = list_objects(beta);
    if (args.length === 0) {
        /* */
    } else {
        if (is_number(functor))
            throw make_error(new Compound("type_error", ["atom", functor]));
        functor = new Compound(functor, args);
    }
    return functor;
}

function list_objects(obj) {
    let peek = obj;
    let i = 0;
    while (is_structure(peek) &&
            "." === peek.functor &&
            peek.args.length === 2 &&
            i < MAX_ARITY) {
        i++;
        peek = deref(peek.args[1]);
    }
    check_nil(peek);
    if (i === 0) {
        return VOID_ARGS;
    } else {
        let args = new Array(i);
        peek = obj;
        i = 0;
        while (is_structure(peek) &&
                "." === peek.functor &&
                peek.args.length === 2) {
            args[i++] = deref(peek.args[0]);
            peek = deref(peek.args[1]);
        }
        return args;
    }
}

function special_univ_unpack(alpha) {
    if (is_structure(alpha)) {
        let temp = alpha.args;
        alpha = alpha.functor;
        return new Compound(".", [alpha,
            objects_list(temp, 0, temp.length)]);
    } else {
        return new Compound(".", [alpha, "[]"]);
    }
}

function objects_list(args, off, count) {
    let res = "[]";
    for (let i = off + count - 1; i >= off; i--)
        res = new Compound(".", [args[i], res]);
    return res;
}

function test_functor(args) {
    let alpha = exec_deref(args[0]);
    if (is_variable(alpha) || is_pending(alpha)) {
        let functor = exec_build(args[1]);
        check_atomic(functor);
        let arity = exec_build(args[2]);
        check_integer(arity);
        if (arity < 0)
            throw make_error(new Compound("domain_error",
                ["not_less_than_zero", arity]));
        if (arity > MAX_ARITY)
            throw make_error(new Compound("representation_error",
                ["max_arity"]));
        arity = narrow_float(arity);
        if (arity === 0) {
            /* */
        } else {
            if (is_number(functor))
                throw make_error(new Compound("type_error", ["atom", functor]));
            let temp = new Array(arity);
            for (let i = 0; i < arity; i++)
                temp[i] = new Variable();
            functor = new Compound(functor, temp);
        }
        return exec_unify(alpha, functor);
    } else {
        alpha = exec_build(alpha);
        let functor;
        let arity;
        if (is_structure(alpha)) {
            functor = alpha.functor;
            arity = alpha.args.length;
        } else {
            functor = alpha;
            arity = 0;
        }
        if (!exec_unify(args[1], functor))
            return false;
        return exec_unify(args[2], norm_smallint(arity));
    }
}

function test_arg(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    let beta = exec_build(args[1]);
    check_callable(beta);
    let arity;
    if (is_structure(beta)) {
        arity = beta.args.length;
    } else {
        arity = 0;
    }
    if (alpha < 1 || arity < alpha)
        return false;
    beta = beta.args[alpha - 1];
    return exec_unify(args[2], beta);
}


function test_change_arg(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    let beta = exec_build(args[1]);
    check_callable(beta);
    let gamma = exec_build(args[2]);
    let arity;
    if (is_structure(beta)) {
        arity = beta.args.length;
    } else {
        arity = 0;
    }
    if (alpha < 1 || arity < alpha)
        return false;
    linkarg(gamma, beta, alpha);
    return true;
}

function linkarg(source, term, pos) {
    if (is_frozen(term))
        throw make_error(new Compound("permission_error",
            ["modify", "compound", term]));
    if ((term.walk & VAR_MASK_STATE) === gc_mask)
        mark2_term(source);
    term.args[pos-1] = source;
}


function test_term_variables(args) {
    let alpha = exec_build(args[0]);
    let res = null;
    let back = null;

    function term_variables2(node) {
        let peek = new Compound(".", [node, undefined]);
        if (back === null) {
            res = peek;
        } else {
            back.args[1] = peek;
        }
        back = peek;
        return false;
    }

    walk_vars(alpha, term_variables2, VAR_MASK_SEEN);
    if (back === null) {
        res = "[]";
    } else {
        back.args[1] = "[]";
    }
    walk_vars(alpha, node => false, 0);
    return exec_unify(args[1], res);
}

function walk_vars(first, acceptor, state) {
    let stack = null;
    for (; ; ) {
        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;
            }
        } else if (is_compound(first)) {
            if ((first.walk & VAR_MASK_SEEN) !== state) {
                first.walk = (first.walk & ~VAR_MASK_SEEN) | state;
                if (0 !== first.args.length - 1) {
                    first.walk &= ~VAR_MASK_SERNO;
                    stack = stack_push(stack, first);
                }
                first = first.args[0];
                continue;
            }
        }
        let item = stack_peek(stack);
        if (item === null) {
            return false;
        } else {
            item.walk++;
            first = item.args[item.walk & VAR_MASK_SERNO];
            if ((item.walk & VAR_MASK_SERNO) === item.args.length - 1)
                stack_pop(stack);
        }
    }
}


function test_reference(args) {
    let alpha = exec_build(args[0]);
    if (is_variable(alpha) || is_structure(alpha))
        return false;
    if (is_atom(alpha) || is_number(alpha))
        return false;
    return true;
}


function test_callable(args) {
    let alpha = exec_build(args[0]);
    if (is_variable(alpha) || is_number(alpha))
        return false;
    return true;
}

function test_var(args) {
    let alpha = exec_build(args[0]);
    return is_variable(alpha);
}

function test_nonvar(args) {
    let alpha = exec_build(args[0]);
    return !is_variable(alpha);
}

function test_compound(args) {
    let alpha = exec_build(args[0]);
    return is_structure(alpha);
}

function test_atomic(args) {
    let alpha = exec_build(args[0]);
    if (is_structure(alpha) || is_variable(alpha))
        return false;
    return true;
}

function test_atom(args) {
    let alpha = exec_build(args[0]);
    return is_atom(alpha);
}


function test_number(args) {
    let alpha = exec_build(args[0]);
    return is_number(alpha);
}

function test_integer(args) {
    let alpha = exec_build(args[0]);
    return is_integer(alpha);
}

function test_float(args) {
    let alpha = exec_build(args[0]);
    return is_float(alpha);
}


function is_bigint(alpha) {
    return typeof alpha === "bigint";
}

function norm_smallint(alpha) {
    if ((-94906266 <= alpha) && (alpha <= 94906266)) {
        return alpha;
    } else {
        return BigInt(alpha);
    }
}

function norm_bigint(alpha) {
    if ((-94906266 <= alpha) && (alpha <= 94906266)) {
        return Number(alpha);
    } else {
        return alpha;
    }
}

function widen_bigint(alpha) {
    if (!is_bigint(alpha)) {
        return BigInt(alpha);
    } else {
        return alpha;
    }
}

function narrow_float(alpha) {
    if (is_bigint(alpha)) {
        alpha = Number(alpha);
        if (Number.isFinite(alpha)) {
            return alpha;
        } else {
            throw make_error(new Compound("evaluation_error", ["float_overflow"]));
        }
    } else {
        return alpha;
    }
}

function norm_float(alpha) {
    if (Number.isNaN(alpha))
        throw make_error(new Compound("evaluation_error", ["undefined"]));
    if (!Number.isFinite(alpha))
        throw make_error(new Compound("evaluation_error", ["float_overflow"]));
    if ((-94906266 <= alpha) && (alpha <= 94906266)
        && Number.isInteger(alpha))
        return BigInt(alpha);
    return alpha;
}


function test_code_category(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    if (alpha < 0 || alpha > 0x10FFFF) {
        alpha = 0; // UNASSIGNED
    } else {
        alpha = code_category(alpha);
    }
    return exec_unify(args[1], alpha);
}

function test_code_numeric(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    if (alpha < 0 || alpha > 0x10FFFF) {
        alpha = -1; // UNASSIGNED
    } else {
        alpha = code_numeric(alpha);
    }
    return exec_unify(args[1], alpha);
}


function test_atom_integer(args) {
    let radix = exec_build(args[1]);
    check_integer(radix);
    if (radix < 2 || radix > 36)
        throw make_error(new Compound("domain_error", ["radix", radix]));
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let 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);
    }
}

function atom_integer_encode(num, radix) {
    let res;
    if (is_bigint(num)) {
        res = BigInt(num).toString(radix);
    } else {
        res = Number(num).toString(radix);
    }
    return res;
}

function atom_integer_decode(text, radix) {
    text = ascii_replace(text, radix, false);
    let res;
    let step = Math.trunc(52 / (32 - Math.clz32(radix - 1)));
    if (text.length <= step) {
        res = Number.parseInt(text, radix);
        if (isNaN(res))
            throw make_error(new Compound("syntax_error", ["illegal_number"]));
        res = norm_smallint(res);
    } else {
        if (0 < text.length && text.charCodeAt(0) === 45) {
            res = -bigint_parse(text, 1, step, radix);
        } else {
            res = bigint_parse(text, 0, step, radix);
        }
        res = norm_bigint(res);
    }
    return res;
}

function bigint_parse(str, help, step, radix) {
    if (help === str.length)
        throw make_error(new Compound("syntax_error", ["illegal_number"]));
    let res = BigInt(0);
    while (help + step < str.length) {
        let temp = Number.parseInt(str.slice(help, help + step), radix);
        if (isNaN(temp) || temp < 0)
            throw make_error(new Compound("syntax_error", ["illegal_number"]));
        res = res * BigInt(radix ** step) + BigInt(temp);
        help += step;
    }
    let temp = Number.parseInt(str.slice(help), radix);
    if (isNaN(temp) || temp < 0)
        throw make_error(new Compound("syntax_error", ["illegal_number"]));
    return res * BigInt(radix ** (str.length - help)) + BigInt(temp);
}

function ascii_replace(text, radix, expo) {
    let buf = "";
    let last = 0;
    let pos = 0;
    while (pos < text.length) {
        let ch = text.codePointAt(pos);
        let val = code_numeric(ch);
        if (val >= 0 && val < radix) {
            if (ch <= 127) { // ASCII
                /* */
            } else {
                if (val < 10) {
                    val += 48; // '0'
                } else {
                    val += 55; // 'A'-10
                }
                buf += text.slice(last, pos) + String.fromCodePoint(val);
                last = pos + char_count(ch);
            }
        } else if ((ch===43 || ch===45) && (pos===0 ||
            (expo && (text.charCodeAt(pos-1)===101 || text.charCodeAt(pos-1)===69)))) {
            /*  */
        } else if (expo && (ch===46 || ch===101 || ch===69)) {
            /*  */
        } else {
            throw make_error(new Compound("syntax_error", ["illegal_number"]));
        }
        pos += char_count(ch);
    }
    if (last !== 0) {
        buf += text.slice(last);
        return buf;
    } else {
        return text;
    }
}

function char_count(ch) {
    if (ch <= 0xFFFF) {
        return 1;
    } else {
        return 2;
    }
}


function test_atom_number(args) {
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let 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);
    }
}

function atom_number_encode(num) {
    if (is_integer(num)) {
        return num.toString();
    } else {
        num = narrow_float(num);
        let res = num.toPrecision(16);
        if (Number(res) !== num)
            res = num.toPrecision(17);
        return shape_number(res);
    }
}

function shape_number(res) {
    let peek = res.indexOf("e");
    if (peek !== -1) {
        res = shape_number_mantissa(res.slice(0, peek)) +
            "e" + shape_number_exponent(res.slice(peek + 1));
    } else {
        res = shape_number_mantissa(res);
    }
    return res;
}

function shape_number_mantissa(res) {
    if (res.indexOf(".") !== -1) {
        let pos = res.length;
        while (res.charCodeAt(pos - 1) === 48)  // '0'
            pos--;
        if (res.charCodeAt(pos - 1) === 46)  // '.'
            pos++;
        if (pos !== res.length)
            res = res.slice(0, pos);
    } else {
        res += ".0";
    }
    return res;
}

function shape_number_exponent(res) {
    if (res.startsWith("+"))
        res = res.slice(1);
    return res;
}

function atom_number_decode(text) {
    text = ascii_replace(text, 10, true);
    let res;
    if ((text.indexOf(".") !== -1) ||
        (text.indexOf("e") !== -1) ||
        (text.indexOf("E") !== -1)) {
        res = Number(text);
        if (isNaN(res))
            throw make_error(new Compound("syntax_error", ["illegal_number"]));
        res = norm_float(res);
    } else {
        if (text.length <= 8) {
            res = Number(text);
            if (isNaN(res))
                throw make_error(new Compound("syntax_error", ["illegal_number"]));
            res = norm_smallint(res);
        } else {
            try {
                res = BigInt(text);
            } catch (e) {
                throw make_error(new Compound("syntax_error", ["illegal_number"]));
            }
            res = norm_bigint(res);
        }
    }
    return res;
}


function test_atom_reference(args) {
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let obj = exec_build(args[1]);
        if (obj === true) {
            obj = "True";
        } else if (obj === false) {
            obj = "False";
        } else if (obj === null) {
            obj = "None";
        } else {
            obj = "Reference";
        }
        return exec_unify(text, obj);
    } else {
        text = exec_build(text);
        check_atom(text);
        let obj;
        if (text === "True") {
            obj = true;
        } else if (text === "False") {
            obj = false;
        } else if (text === "None") {
            obj = null;
        } else {
            obj = undefined;
        }
        if (obj === undefined)
            throw make_error(new Compound("syntax_error", ["illegal_reference"]));
        return exec_unify(args[1], obj);
    }
}


function test_os_get_gestalt(args) {
    let gestalt = new Map();
    let scm;
    if (fs !== undefined) {
        scm = process.env["TERM_SCHEME"];
    } else {
        scm  = "[]";
    }
    gestalt.set("sys_color", (scm !== undefined ? scm : "normal"));
    let loc = new Intl.DateTimeFormat().resolvedOptions().locale;
    gestalt.set("sys_locale", loc.replace("-", "_"));
    let res;
    if (fs !== undefined) {
        res = objects_list(process.argv, 2, process.argv.length - 2);
    } else {
        res  = "[]";
    }
    gestalt.set("argv", res);
    return exec_unify(args[0], gestalt);
}


// Albufeira compiler, control flow
add("fail", 0, make_check(test_fail));
add("$CUT", 1, make_check(test_cut));
add("$MARK", 1, make_check(test_mark));
add("$SEQ", 2, make_special(special_seq));
add("$ALT", 1, make_special(special_alt));
add("sys_raise", 1, make_check(test_sys_raise));
add("sys_trap", 3, make_special(special_sys_trap));

// Albufeira compiler, async flow
add("os_sleep_promise", 2, make_check(test_os_sleep_promise));
add("os_import_promise", 3, make_check(test_os_import_promise));
add("os_invoke_main", 1, make_check(test_os_invoke_main));
add("$YIELD", 1, make_special(special_yield));
add("shield", 1, make_special(special_shield));
add("unshield", 1, make_special(special_unshield));
add("call", 1, make_special(special_call));

// term specials
add("=", 2, make_check(test_unify));
add("copy_term", 2, make_check(test_copy_term));
add("=..", 2, make_check(test_univ));
add("functor", 3, make_check(test_functor));
add("arg", 3, make_check(test_arg));
add("change_arg", 3, make_check(test_change_arg));
add("term_variables", 2, make_check(test_term_variables));
add("reference", 1, make_check(test_reference));

// type specials
add("callable", 1, make_check(test_callable));
add("var", 1, make_check(test_var));
add("nonvar", 1, make_check(test_nonvar));
add("compound", 1, make_check(test_compound));
add("atomic", 1, make_check(test_atomic));
add("atom", 1, make_check(test_atom));
add("number", 1, make_check(test_number));
add("integer", 1, make_check(test_integer));
add("float", 1, make_check(test_float));

// atom specials
add("code_category", 2, make_check(test_code_category));
add("code_numeric", 2, make_check(test_code_numeric));
add("atom_integer", 3, make_check(test_atom_integer));
add("atom_number", 2, make_check(test_atom_number));
add("atom_reference", 2, make_check(test_atom_reference));

// locale specials
add("os_get_gestalt", 1, make_check(test_os_get_gestalt));

const MAX_BUF = 4096;

let codebase = "";
let bootbase = "";

function set_codebase(url) {
    codebase = url;
}

function set_bootbase(url) {
    bootbase = url;
}


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

function Sink() {
    this.buf = "";
    this.send = (fd, buf) => fd;
    this.last = -1;
    this.flags = 0;
    this.notify = fd => {};
    this.release = fd => {};
    this.data = undefined;
    this.indent = 0;
}

function test_current_output(args) {
    let alpha = engine.text_output;
    return exec_unify(args[0], alpha);
}

function test_current_error(args) {
    let alpha = engine.text_error;
    return exec_unify(args[0], alpha);
}


function test_set_output(args) {
    let obj = exec_build(args[0]);
    check_sink(obj);
    engine.text_output = obj;
    return true;
}

function test_set_error(args) {
    let obj = exec_build(args[0]);
    check_sink(obj);
    engine.text_error = obj;
    return true;
}

function check_sink(beta) {
    if (!(beta instanceof Sink)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["writer", beta]));
    }
}


function test_put_atom(args) {
    let stream = exec_build(args[0]);
    check_sink(stream);
    let text = exec_build(args[1]);
    check_atom(text);
    put_atom(stream, text);
    return true;
}

function put_atom(stream, text) {
    if (text.length > 0) {
        stream.last = last_code(text, text.length);
        if (stream.buf !== null) {
            stream.buf += text;
            if (stream.buf.length >= MAX_BUF)
                flush_buffer(stream);
        } else {
            stream.data = stream.send(stream.data, text);
        }
    }
}

function flush_buffer(stream) {
    if (stream.buf !== null && stream.buf.length > 0) {
        let text = stream.buf;
        stream.buf = "";
        stream.data = stream.send(stream.data, text);
    }
}

function last_code(text, pos) {
    let ch = text.charCodeAt(pos - 1);
    if (ch >= 0xDC00 && ch <= 0xDFFF && pos > 1) {
        let res2 = text.charCodeAt(pos - 2);
        if (res2 >= 0xD800 && res2 <= 0xDBFF)
            ch = ((res2 - 0xD7C0) << 10) + ch - 0xDC00;
    }
    return ch;
}


const MASK_SRC_SKIP = 0x00000001;
const MASK_SRC_AREAD = 0x00000002;

function Source() {
    this.buf = "";
    this.pos = 0;
    this.receive = fd => "";
    this.flags = 0;
    this.lineno = 0;
    this.release = fd => {};
    this.data = undefined;
    this.partial = undefined;
}

function test_current_input(args) {
    let alpha = engine.text_input;
    return exec_unify(args[0], alpha);
}

function test_set_input(args) {
    let obj = exec_build(args[0]);
    check_source(obj);
    engine.text_input = obj;
    return true;
}

function check_source(beta) {
    if (!(beta instanceof Source)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["reader", beta]));
    }
}


function test_os_get_code(args) {
    let stream = exec_build(args[0]);
    let pos = stream.pos;
    let buf = stream.buf;
    if (pos < buf.length) {
        let ch = buf.codePointAt(pos);
        pos += char_count(ch);
        if (ch === 13 || (ch === 10 && (stream.flags & MASK_SRC_SKIP) === 0))
            stream.lineno++;
        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;
    }
}

function test_os_peek_code(args) {
    let stream = exec_build(args[0]);
    let pos = stream.pos;
    let buf = stream.buf;
    if (pos < buf.length) {
        let ch = buf.codePointAt(pos);
        return exec_unify(args[1], ch);
    } else {
        return false;
    }
}


function test_os_open_promise_opts(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let opts = exec_build(args[1]);
    let stream = new Source();
    if (!exec_unify(args[2], stream))
        return false;
    let buf = ctx;
    let prom;
    if (fs !== undefined) {
        prom = open_file_promise_opts(buf, stream, url, opts);
    } else {
        throw make_error(new Compound("permission_error",
            ["access", "source_sink", url]));
    }
    return exec_unify(args[3], prom);
}

function get_encoding(opts) {
    if (opts !== null && opts.get("encoding") !== undefined) {
        return opts.get("encoding");
    } else {
        return "utf8";
    }
}

function open_file_promise_opts(buf, stream, url, opts) {
    return new Promise(resolve => {
        fs.open(url, (err, fd) => {
            if (!err) {
                let enc = get_encoding(opts);
                stream.data = fd;
                stream.receive = (buf, stream) => file_read_promise(enc, buf, stream);
                stream.release = file_close_promise;
                stream.partial = Buffer.alloc(0);
                stream.flags |= MASK_SRC_AREAD;
            } else {
                register_signal(buf, map_file_error(err, url));
            }
            resolve();
        });
    });
}

function map_file_error(err, url) {
    if (err.cause !== undefined) {
        let code = err.cause.code;
        if (code === "ENOTFOUND") {
            return new Compound("resource_error", ["unknown_host"]);
        } else {
            return new Compound("resource_error", ["connect_failed"]);
        }
    } else {
        let code = err.code;
        if (code === "ENOENT" || code === "EISDIR" || code === "EPERM") {
            return new Compound("existence_error",
                ["source_sink", url]);
        } else {
            return new Compound("resource_error", ["remote_error"]);
        }
    }
}


function test_os_read_promise(args) {
    let stream = exec_build(args[0]);
    let buf = ctx;
    return exec_unify(args[1], stream.receive(buf, stream));
}

function file_read_promise(enc, buf, stream) {
    return new Promise(resolve => {
        let res = Buffer.alloc(8192);
        stream.partial.copy(res, 0);
        let pos = stream.partial.length;
        fs.read(stream.data, res, pos, 8192-pos, null, (err, len, _) => {
            if (!err) {
                let last = last_valid(res, pos+len, enc);
                stream.buf = res.toString(enc, 0, last);
                stream.pos = 0;
                stream.partial = res.slice(last, pos+len);
            } else {
                register_signal(buf, map_stream_error(err));
            }
            resolve();
        });
    });
}

function last_valid(res, len, enc) {
    if (enc === "utf8") {
        let pos = len;
        while (pos > 0 && (res[pos-1] & 0xC0) === 0x80)
            pos--;
        if (pos > 0) {
            if ((res[pos - 1] & 0x80) === 0x00 && pos === len) {
                return len;
            } else if ((res[pos - 1] & 0xE0) === 0xC0 && pos === len - 1) {
                return len;
            } else if ((res[pos - 1] & 0xF0) === 0xE0 && pos === len - 2) {
                return len;
            } else if ((res[pos - 1] & 0xF8) === 0xF0 && pos === len - 3) {
                return len;
            } else {
                pos--;
            }
        }
        return pos;
    } else {
        return len;
    }
}

function map_stream_error(err) {
    let code = err.code;
    if (code === "ETIMEDOUT") {
        return new Compound("resource_error",
            ["socket_timeout"]);
    } else if (code === "EADDRINUSE") {
        return new Compound("resource_error",
            ["port_error"]);
    } else if (code === "ECONNRESET") {
        return new Compound("resource_error",
            ["remote_error"]);
    } else {
        return new Compound("resource_error",
            ["io_exception"]);
    }
}

function test_os_close_promise(args) {
    let stream = exec_build(args[0]);
    let buf = ctx;
    return exec_unify(args[1], stream.release(buf, stream));
}

function file_close_promise(buf, stream) {
    return new Promise(resolve => {
        fs.close(stream.data, err => {
            if (!err) {
                /* */
            } else {
                register_signal(buf, map_stream_error(err));
            }
            resolve();
        });
    });
}


function test_os_prop_promise(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let res = {};
    if (!exec_unify(args[1], res))
        return false;
    let buf = ctx;
    let prom;
    if (fs !== undefined) {
        prom = prop_file_promise(buf, url, res);
    } else {
        throw make_error(new Compound("permission_error",
            ["access", "source_sink", url]));
    }
    return exec_unify(args[2], prom);
}

function prop_file_promise(buf, url, res) {
    return new Promise(resolve => {
        fs.stat(url, (err, stats) => {
            if (!err) {
                let ftype = (stats.isFile() ? "regular" : (stats.isDirectory() ? "directory" : "other"));
                let mtime = Math.floor(stats.mtimeMs);

                res.last_modified = norm_smallint(mtime);
                res.absolute_path = path.resolve(url);
                res.type = ftype;
                res.can_write =((stats.mode & 0x80) !== 0 ? "true" : "false");
            } else {
                register_signal(buf, map_file_error(err, url));
            }
            resolve();
        });
    });
}


function test_os_stream_flags(args) {
    let obj = exec_build(args[0]);
    let flags;
    if (obj instanceof Source) {
        flags = obj.flags;
    } else {
        check_sink(obj);
        flags = obj.flags;
    }
    return exec_unify(args[1], flags);
}

function test_os_open_sync_opts(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let mode = exec_build(args[1]);
    check_atom(mode);
    let opts = exec_build(args[2]);
    let stream;
    if ("read" === mode) {
        throw make_error(new Compound("resource_error",
            ["not_implemented"]));
    } else if ("write" === mode) {
        stream = open_write(url, "w", opts);
    } else if ("append" === mode) {
        stream = open_write(url, "a", opts);
    } else {
        throw make_error(new Compound("domain_error",
            ["io_mode", mode]));
    }
    return exec_unify(args[3], stream);
}

function open_write(url, mode, opts) {
    if (fs !== undefined) {
        let file;
        try {
            file = fs.openSync(url, mode);
        } catch (err) {
            throw make_error(map_file_error(err, url));
        }
        let dst = new Sink();
        let enc = get_encoding(opts);
        dst.data = file;
        dst.send = (data, buf) => file_write(data, buf, enc);
        dst.release = file_close;
        return dst;
    } else {
        throw make_error(new Compound("resource_error", ["io_exception"]));
    }
}

function file_write(data, buf, enc) {
    try {
        fs.writeSync(data, buf, null, enc);
        return data;
    } catch (err) {
        throw make_error(map_stream_error(err));
    }
}

function file_close(data) {
    try {
        fs.closeSync(data);
    } catch (err) {
        throw make_error(map_stream_error(err));
    }
}


function test_flush_output(args) {
    let stream = exec_build(args[0]);
    check_sink(stream);
    stream_flush(stream);
    return true;
}

function stream_flush(stream) {
    flush_buffer(stream);
    stream.notify(stream.data);
}

function test_os_close_sync(args) {
    let stream = exec_build(args[0]);
    if (stream instanceof Sink) {
        /* */
    } else {
        check_source(stream);
    }
    stream_close(stream);
    return true;
}

function stream_close(stream) {
    if (stream instanceof Sink) {
        flush_buffer(stream);
        stream.release(stream.data);
    } else {
        stream.release(stream.data);
    }
}


function test_os_cntrl_sync(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    if (fs === undefined)
        throw make_error(new Compound("permission_error", ["access", "source_sink", url]));
    let prop = exec_build(args[1]);
    if (is_structure(prop) &&
        prop.functor === "last_modified" &&
        prop.args.length === 1) {
        let val = deref(prop.args[0]);
        check_integer(val);
        if (val < 0)
            throw make_error(new Compound("domain_error",
                ["not_less_than_zero", val]));
        val = new Date(narrow_float(val));
        try {
            fs.utimesSync(url, val, val);
        } catch (err) {
            throw make_error(map_file_error(err, url));
        }
    } else if (is_structure(prop) &&
            prop.functor === "can_write" &&
            prop.args.length === 1) {
        let val = deref(prop.args[0]);
        check_atom(val);
        if ("true" !== val && "false" !== val)
            throw make_error(new Compound("domain_error",
                ["boolean", val]));
        try {
            let stats = fs.statSync(url);
            if ("true" === val)
                fs.chmodSync(url, (stats.mode | 0x80));
            else
                fs.chmodSync(url, (stats.mode & ~0x80));
        } catch (err) {
            throw make_error(map_file_error(err, url));
        }
    } else {
        check_nonvar(prop);
        prop = copy_term(prop);
        throw make_error(new Compound("domain_error", ["prolog_property", prop]));
    }
    return true;
}

function test_os_read_sync(args) {
    let stream = exec_build(args[0]);
    stream.buf = stream.receive(stream.data);
    stream.pos = 0;
    return true;
}


function test_ir_anon_new(args) {
    let alpha = undefined;
    return exec_unify(args[0], new Quote(alpha));
}

function test_ir_place_new(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    alpha = new Place(alpha);
    return exec_unify(args[1], new Quote(alpha));
}

function test_ir_skeleton_new(args) {
    let alpha = exec_build(args[0]);
    let beta = exec_build(args[1]);
    beta = list_objects(beta);
    unquote_objects(beta);
    alpha = new Skeleton(alpha, beta);
    return exec_unify(args[2], new Quote(alpha));
}


function test_ir_make_frozen(args) {
    let alpha = exec_build(args[0]);
    let beta = exec_build(args[1]);
    beta = list_objects(beta);
    alpha = new Frozen(alpha, beta);
    return exec_unify(args[2], alpha);
}


function test_ir_pred_site(args) {
    let alpha = exec_build(args[0]);
    if (is_structure(alpha)) {
        if (is_atom(alpha.functor))
            alpha = new Compound(new Cache(alpha.functor), alpha.args);
    } else if (is_atom(alpha)) {
        alpha = new Cache(alpha);
    }
    return exec_unify(args[1], alpha);
}

function test_ir_is_site(args) {
    let alpha = exec_build(args[0]);
    if (is_structure(alpha))
        return is_cache(alpha.functor);
    return is_cache(alpha);
}

function test_ir_site_name(args) {
    let alpha = exec_build(args[0]);
    if (is_structure(alpha)) {
        if (is_cache(alpha.functor))
            alpha = new Compound(alpha.functor.name, alpha.args);
    } else if (is_cache(alpha)) {
        alpha = alpha.name;
    }
    return exec_unify(args[1], alpha);
}


function test_ir_clause_new(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    let beta = exec_build(args[1]);
    beta = list_objects(beta);
    let gamma = exec_build(args[2]);
    gamma = list_objects(gamma);
    let delta = exec_build(args[3]);
    check_integer(delta);
    let mue = exec_build(args[4]);
    if (is_structure(mue) && mue.functor === "just" && mue.args.length === 1) {
        mue = deref(mue.args[0]);
    } else {
        mue = undefined;
    }
    unquote_objects(beta);
    unquote_objects(gamma);
    return exec_unify(args[5], new Clause(alpha, beta, gamma, delta, mue));
}

function test_ir_clause_add(args) {
    let functor = exec_build(args[0]);
    check_atom(functor);
    let arity = exec_build(args[1]);
    check_integer(arity);
    let gamma = exec_build(args[2]);
    let flags = exec_build(args[3]);
    check_integer(flags);
    add_clause(functor, arity, gamma, flags);
    return true;
}


function test_ir_goal_new(args) {
    let alpha = exec_build(args[0]);
    check_integer(alpha);
    let beta = exec_build(args[1]);
    beta = list_objects(beta);
    let gamma = exec_build(args[2]);
    check_integer(gamma);
    unquote_objects(beta);
    return exec_unify(args[3], new Goal(alpha, beta, gamma));
}

function special_ir_goal_call(args) {
    let goal = deref(args[0]);
    check_goal(goal);
    goal = melt_directive(goal);
    solve_seq(goal);
    return true;
}

function check_goal(beta) {
    if (!is_goal(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["goal", beta]));
    }
}


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

function special_kb_clause_ref(args) {
    let head = deref(args[0]);
    check_callable(head);
    let flags = deref(args[1]);
    check_integer(flags);
    let peek = lookup_pred(head);
    if (peek === undefined)
        return false;
    if ((flags & MASK_FIND_DYNAMIC) !== 0)
        if ((peek.flags & MASK_PRED_DYNAMIC) === 0)
            make_error_find(head, flags);
    if (!is_logical(peek.rope))
        return false;
    if (is_structure(head)) {
        head = head.args;
    } else {
        head = VOID_ARGS;
    }
    peek = defined_clauses(peek, head);
    peek = snapshot_data(peek);
    if ((flags & MASK_FIND_REVERSE) === 0) {
        return solve2_ref(args, peek, 0, null);
    } else {
        return solve2_ref_reverse(args, peek, peek.length, null);
    }
}

function make_error_find(head, flags) {
    if ((flags & MASK_FIND_MODIFY) !== 0) {
        throw make_error(new Compound("permission_error",
            ["modify", "static_procedure", make_indicator_term(head)]));
    } else {
        throw make_error(new Compound("permission_error",
            ["access", "private_procedure", make_indicator_term(head)]));
    }
}

function solve_ref(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_ref(goal.args, rope, at, choice);
}

function solve_ref_reverse(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_ref_reverse(goal.args, rope, at, choice);
}

function solve2_ref(args, rope, at, choice) {
    let mark = trail;
    while (at < rope.length) {
        let clause = rope[at++];
        if (unify(args[2], clause)) {
            if (at < rope.length) {
                if (choice === null) {
                    choice = new Choice(solve_ref, rope, at, mark);
                } else {
                    choice.at = at;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
    }
    return false;
}

function solve2_ref_reverse(args, rope, at, choice) {
    let mark = trail;
    while (at > 0) {
        let clause = rope[--at];
        if (unify(args[2], clause)) {
            if (at > 0) {
                if (choice === null) {
                    choice = new Choice(solve_ref_reverse, rope, at, mark);
                } else {
                    choice.at = at;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
    }
    return false;
}

function test_kb_pred_touch(args) {
    let functor = exec_build(args[0]);
    check_atom(functor);
    let arity = exec_build(args[1]);
    check_integer(arity);
    let flags = exec_build(args[2]);
    check_integer(flags);
    pred_touch(functor, arity, flags);
    return true;
}


function test_kb_clause_remove(args) {
    let functor = exec_build(args[0]);
    check_atom(functor);
    let arity = exec_build(args[1]);
    check_integer(arity);
    let flags = exec_build(args[2]);
    check_integer(flags);
    let clause = exec_build(args[3]);
    check_clause(clause);
    return remove_clause(functor, arity, clause, flags);
}

function check_clause(beta) {
    if (!is_clause(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["clause", beta]));
    }
}

function test_kb_pred_destroy(args) {
    let functor = exec_build(args[0]);
    check_atom(functor);
    let arity = exec_build(args[1]);
    check_integer(arity);
    pred_destroy(functor, arity);
    return true;
}


function test_kb_make_defined(args) {
    let alpha = exec_build(args[0]);
    alpha = list_objects(alpha);
    let offset = exec_build(args[1]);
    check_integer(offset);
    return exec_unify(args[2], make_defined(alpha, offset));
}

function test_kb_pred_link(args) {
    let functor = exec_build(args[0]);
    check_atom(functor);
    let arity = exec_build(args[1]);
    check_integer(arity);
    let peek = pred_link(functor, arity);
    if (peek === undefined)
        return false;
    return exec_unify(args[2], peek);
}


function test_kb_is_link(args) {
    let alpha = exec_build(args[0]);
    if (is_structure(alpha))
        return is_provable(alpha.functor);
    return is_provable(alpha);
}

function test_kb_link_flags(args) {
    let peek = exec_build(args[0]);
    check_provable(peek);
    let res = peek.flags >> MASK_PRED_BITS;
    return exec_unify(args[1], res);
}

function check_provable(beta) {
    if (!is_provable(beta)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error",
            ["provable", beta]));
    }
}

function test_kb_pred_list(args) {
    let res = kb_pred_list();
    return exec_unify(args[0], res);
}

function kb_pred_list() {
    let back = null;
    let res = null;
    for (let functor in kb) {
        let temp = kb[functor];
        for (let i = 0; i < temp.length; i++) {
            let peek = temp[i]
            if (peek === undefined || peek.remover !== undefined)
                continue;
            peek = new Compound(".", [make_indicator(functor, i), undefined]);
            if (back === null) {
                res = peek;
            } else {
                back.args[1] = peek;
            }
            back = peek;
        }
    }
    if (back === null) {
        res = "[]";
    } else {
        back.args[1] = "[]";
    }
    return res;
}


function test_kb_clause_shard(args) {
    let clause = exec_build(args[0]);
    check_clause(clause);
    return exec_unify(args[1], clause.shard);
}

function test_kb_clause_arity(args) {
    let clause = exec_build(args[0]);
    check_clause(clause);
    let res = clause.head.length;
    return exec_unify(args[1], norm_smallint(res));
}


function special_kb_clause_head(args) {
    let clause = deref(args[0]);
    check_clause(clause);
    let head = deref(args[1]);
    let paras;
    if (is_structure(head)) {
        paras = head.args;
    } else {
        paras = VOID_ARGS;
    }
    let display;
    if (clause.size !== 0) {
        display = new Array(clause.size);
    } else {
        display = null;
    }
    if (!exec_head(clause.head, display, paras))
        return false;
    cont(call.args[1]);
    return true;
}

function special_kb_clause_data(args) {
    let clause = deref(args[0]);
    check_clause(clause);
    let head = deref(args[1]);
    let paras;
    if (is_structure(head)) {
        paras = head.args;
    } else {
        paras = VOID_ARGS;
    }
    let display;
    if (clause.size !== 0) {
        display = new Array(clause.size);
    } else {
        display = null;
    }
    if (!exec_head(clause.head, display, paras))
        return false;
    let temp;
    let peek = clause.cutvar;
    if (peek !== -1) {
        temp = new Variable();
        display[peek] = temp;
        temp = new Compound("just", [temp]);
    } else {
        temp = "nothing";
    }
    if (!unify(args[2], temp))
        return false;
    temp = exec_body(clause.body, display);
    if (!unify(args[3], temp))
        return false;
    cont(call.args[1]);
    return true;
}


function test_dg_get_partition(args) {
    return exec_unify(args[0], engine.partition);
}

function test_dg_set_partition(args) {
    let value = exec_build(args[0]);
    check_atom(value);
    set_partition(value);
    return true;
}


function test_sys_stat_map(args) {
    let res = {};
    res.wall = norm_smallint(Date.now());
    res.time = norm_smallint(real_time());
    res.maxinfs = norm_smallint(GC_MAX_INFERS);
    res.calls = norm_smallint(gc_enter);
    res.gctime = norm_smallint(gc_time);
    if (fs !== undefined) {
        res.used = norm_smallint(process.memoryUsage().heapUsed);
    } else if (performance.memory !== undefined) {
        res.used = norm_smallint(performance.memory.usedJSHeapSize);
    } else {
        res.used = 0;
    }
    return exec_unify(args[0], res);
}

function test_dg_gc_flags(args) {
    return exec_unify(args[0], norm_smallint(engine.flags));
}

function test_garbage_collect(args) {
    gc_major();
    if (fs !== 0) {
        // --expose-gc
        global.gc();
    } else {
        // --js-flags="--expose-gc"
        window.gc();
    }
    return true
}


function test_sys_flag_map(args) {
    let res = {};
    res.system_url = bootbase;
    res.foreign_ext = ".mjs";
    if (fs !== undefined) {
        res.host_info = (process.versions.bun !== undefined ? "bun" : "node")+", JavaScript "+process.versions.node;
        res.mach_info = os.cpus()[0].model.trim()+", "+os.version();
    } else {
        res.host_info = "N/A";
        res.mach_info = "N/A";
    }
    return exec_unify(args[0], res);
}


function test_os_get_workdir(args) {
    let url;
    if (fs !== undefined) {
        url = process.cwd()+path.sep;
    } else {
        url = codebase;
    }
    return exec_unify(args[0], url);
}

function test_os_set_workdir(args) {
    let url = exec_build(args[0]);
    check_atom(url);

    if (fs !== undefined) {
        try {
            process.chdir(url);
        } catch (err) {
            throw make_error(map_file_error(err, url));
        }
    } else {
        try {
            url = new URL(url, codebase).href;
        } catch (err) {
            throw make_error(new Compound("resource_error", ["base_url"]));
        }
        codebase = url;
    }
    return true;
}


function test_dg_clear_stage(args) {
    clear();
    return true;
}

function test_dg_get_stage(args) {
    return exec_unify(args[0], norm_smallint(stage));
}

function test_dg_set_stage(args) {
    let value = exec_build(args[0]);
    check_integer(value);
    set_stage(narrow_float(value));
    return true;
}


// stream specials, output
add("current_output", 1, make_check(test_current_output));
add("current_error", 1, make_check(test_current_error));
add("set_output", 1, make_check(test_set_output));
add("set_error", 1, make_check(test_set_error));
add("put_atom", 2, make_check(test_put_atom));

// stream specials, input
add("current_input", 1, make_check(test_current_input));
add("set_input", 1, make_check(test_set_input));
add("os_get_code", 2, make_check(test_os_get_code));
add("os_peek_code", 2, make_check(test_os_peek_code));

// stream specials, async
add("os_open_promise_opts", 4, make_check(test_os_open_promise_opts));
add("os_read_promise", 2, make_check(test_os_read_promise));
add("os_close_promise", 2, make_check(test_os_close_promise));
add("os_prop_promise", 3, make_check(test_os_prop_promise));

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

// intermediate representation, Albufeira code
add("ir_anon_new", 1, make_check(test_ir_anon_new));
add("ir_place_new", 2, make_check(test_ir_place_new));
add("ir_skeleton_new", 3, make_check(test_ir_skeleton_new));
add("ir_make_frozen", 3, make_check(test_ir_make_frozen));
add("ir_pred_site", 2, make_check(test_ir_pred_site));
add("ir_is_site", 1, make_check(test_ir_is_site));
add("ir_site_name", 2, make_check(test_ir_site_name));

// intermediate representation specials, consult text, internal only
add("ir_clause_new", 6, make_check(test_ir_clause_new));
add("ir_clause_add", 4, make_check(test_ir_clause_add));
add("ir_goal_new", 4, make_check(test_ir_goal_new));
add("ir_goal_call", 1, make_special(special_ir_goal_call));

// knowledge base specials, dynamic database, internal only
add("kb_clause_ref", 3, make_special(special_kb_clause_ref));
add("kb_pred_touch", 3, make_check(test_kb_pred_touch));
add("kb_clause_remove", 4, make_check(test_kb_clause_remove));
add("kb_pred_destroy", 2, make_check(test_kb_pred_destroy));

// knowledge base specials, linked provables, internal only
add("kb_make_defined", 2, make_check(test_kb_make_defined));
add("kb_make_defined", 3, make_check(test_kb_make_defined));
add("kb_pred_link", 3, make_check(test_kb_pred_link));
add("kb_is_link", 1, make_check(test_kb_is_link));
add("kb_link_flags", 2, make_check(test_kb_link_flags));
add("kb_pred_list", 1, make_check(test_kb_pred_list));

// knowledge base specials, meta data, internal only
add("kb_clause_shard", 2, make_check(test_kb_clause_shard));
add("kb_clause_arity", 2, make_check(test_kb_clause_arity));
add("kb_clause_head", 2, make_special(special_kb_clause_head));
add("kb_clause_data", 4, make_special(special_kb_clause_data));
add("dg_get_partition", 1, make_check(test_dg_get_partition));
add("dg_set_partition", 1, make_check(test_dg_set_partition));

// system specials, flags, internal only
add("sys_stat_map", 1, make_check(test_sys_stat_map));
add("sys_flags_get", 1, make_check(test_dg_gc_flags));
add("garbage_collect", 0, make_check(test_garbage_collect));
add("sys_flag_map", 1, make_check(test_sys_flag_map));
add("os_get_workdir", 1, make_check(test_os_get_workdir));
add("os_set_workdir", 1, make_check(test_os_set_workdir));

// system specials, staging, internal only
add("dg_clear_stage", 0, make_check(test_dg_clear_stage));
add("dg_get_stage", 1, make_check(test_dg_get_stage));
add("dg_set_stage", 1, make_check(test_dg_set_stage));



function test_eval(args) {
    let res = exec_eval(args[1]);
    return exec_unify(args[0], res);
}


function arit_neg(args) {
    let alpha = exec_eval(args[0]);
    return -alpha;
}

function arit_add(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (!is_bigint(alpha) && !is_bigint(beta)) {
            return norm_smallint(alpha + beta);
        } else {
            return norm_bigint(widen_bigint(alpha) + widen_bigint(beta));
        }
    } else {
        return norm_float(narrow_float(alpha) + narrow_float(beta));
    }
}

function arit_sub(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (!is_bigint(alpha) && !is_bigint(beta)) {
            return norm_smallint(alpha - beta);
        } else {
            return norm_bigint(widen_bigint(alpha) - widen_bigint(beta));
        }
    } else {
        return norm_float(narrow_float(alpha) - narrow_float(beta));
    }
}

function arit_mul(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (!is_bigint(alpha) && !is_bigint(beta)) {
            return norm_smallint(alpha * beta);
        } else {
            return norm_bigint(widen_bigint(alpha) * widen_bigint(beta));
        }
    } else {
        return norm_float(narrow_float(alpha) * narrow_float(beta));
    }
}

function arit_quot(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    beta = narrow_float(beta);
    if (beta === 0)
        throw make_error(new Compound("evaluation_error",["zero_divisor"]));
    return norm_float(narrow_float(alpha) / beta);
}

function arit_intquot(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (beta === 0)
            throw make_error(new Compound("evaluation_error",["zero_divisor"]));
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return Math.trunc(alpha / beta);
    } else {
        return norm_bigint(widen_bigint(alpha) / widen_bigint(beta));
    }
}

function arit_rem(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (beta === 0)
        throw make_error(new Compound("evaluation_error",["zero_divisor"]));
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return alpha % beta;
    } else {
        return norm_bigint(widen_bigint(alpha) % widen_bigint(beta));
    }
}


function arit_float(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        return norm_float(narrow_float(alpha));
    } else {
        return alpha;
    }
}

function arit_intpow(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (beta < 0)
            throw make_error(new Compound("domain_error",
                ["not_less_than_zero", beta]));
        if (!is_bigint(alpha) && !is_bigint(beta)) {
            if ((32 - Math.clz32(Math.abs(alpha))) * beta < 53) {
                return norm_smallint(Math.pow(alpha, beta));
            } else {
                return norm_bigint(widen_bigint(alpha) ** widen_bigint(beta));
            }
        } else {
            return norm_bigint(widen_bigint(alpha) ** widen_bigint(beta));
        }
    } else {
        return norm_float(Math.pow(narrow_float(alpha), narrow_float(beta)));
    }
}

function arit_div(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (beta === 0)
        throw make_error(new Compound("evaluation_error", ["zero_divisor"]));
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return Math.floor(alpha / beta);
    } else {
        return norm_bigint(bigint_div(
            widen_bigint(alpha), widen_bigint(beta)));
    }
}

function bigint_div(alpha, beta) {
    let temp = alpha / beta;
    if ((alpha < 0n) !== (beta < 0n)) {
        let res = alpha % beta;
        if (res !== 0n)
            temp--;
    }
    return temp;
}

function arit_mod(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (beta === 0)
        throw make_error(new Compound("evaluation_error",["zero_divisor"]));
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return smallint_mod(alpha, beta);
    } else {
        return norm_bigint(bigint_mod(
            widen_bigint(alpha), widen_bigint(beta)));
    }
}


function smallint_mod(alpha, beta) {
    let res = alpha % beta;
    if ((alpha < 0) !== (beta < 0)) {
        if (res !== 0)
            res += beta;
    }
    return res;
}

function bigint_mod(alpha, beta) {
    let res = alpha % beta;
    if ((alpha < 0n) !== (beta < 0n)) {
        if (res !== 0n)
            res += beta;
    }
    return res;
}


function arit_abs(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        if (alpha < 0) {
            return -alpha;
        } else {
            return alpha;
        }
    } else {
        return norm_float(Math.abs(narrow_float(alpha)));
    }
}

function arit_sign(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        if (alpha < 0) {
            return -1;
        } else if (alpha > 0) {
            return 1;
        } else {
            return 0;
        }
    } else {
        return norm_float(Math.sign(narrow_float(alpha)));
    }
}

function arit_min(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (alpha < beta) {
            return alpha;
        } else {
            return beta;
        }
    } else {
        return norm_float(Math.min(
            narrow_float(alpha), narrow_float(beta)));
    }
}

function arit_max(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    if (is_integer(alpha) && is_integer(beta)) {
        if (alpha > beta) {
            return alpha;
        } else {
            return beta;
        }
    } else {
        return norm_float(Math.max(
            narrow_float(alpha), narrow_float(beta)));
    }
}


function arit_truncate(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        return alpha;
    } else {
        return norm_smallint(Math.trunc(narrow_float(alpha)));
    }
}

function arit_floor(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        return alpha;
    } else {
        return norm_smallint(Math.floor(narrow_float(alpha)));
    }
}

function arit_ceiling(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        return alpha;
    } else {
        return norm_smallint(Math.ceil(narrow_float(alpha)));
    }
}

function arit_round(args) {
    let alpha = exec_eval(args[0]);
    if (is_integer(alpha)) {
        return alpha;
    } else {
        return norm_smallint(Math.round(narrow_float(alpha)));
    }
}


function test_numberequal(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return number_equal(alpha, beta);
}

function test_numbernotequal(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return !number_equal(alpha, beta);
}

function number_equal(alpha, beta) {
    if (is_integer(alpha) && is_integer(beta)) {
        return alpha === beta;
    } else {
        return narrow_float(alpha) === narrow_float(beta);
    }
}

function test_numberless(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return number_less(alpha, beta);
}

function test_numbergreaterequal(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return !number_less(alpha, beta);
}

function test_numbergreater(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return number_less(beta, alpha);
}

function test_numberlessequal(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return !number_less(beta, alpha);
}

function number_less(alpha, beta) {
    if (is_integer(alpha) && is_integer(beta)) {
        return alpha < beta;
    } else {
        return narrow_float(alpha) < narrow_float(beta);
    }
}


function arit_sin(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.sin(narrow_float(alpha)));
}

function arit_cos(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.cos(narrow_float(alpha)));
}

function arit_tan(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.tan(narrow_float(alpha)));
}

function arit_asin(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.asin(narrow_float(alpha)));
}

function arit_acos(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.acos(narrow_float(alpha)));
}

function arit_atan(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.atan(narrow_float(alpha)));
}

function arit_pi(args) {
    return Math.PI;
}


function arit_pow(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    return norm_float(Math.pow(narrow_float(alpha), narrow_float(beta)));
}

function arit_exp(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.exp(narrow_float(alpha)));
}

function arit_log(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.log(narrow_float(alpha)));
}

function arit_sqrt(args) {
    let alpha = exec_eval(args[0]);
    return norm_float(Math.sqrt(narrow_float(alpha)));
}

function arit_e(args) {
    return Math.E;
}

function arit_epsilon(args) {
    return Number.EPSILON;
}

function arit_atan2(args) {
    let alpha = exec_eval(args[0]);
    let beta = exec_eval(args[1]);
    alpha = narrow_float(alpha);
    beta = narrow_float(beta);
    if (alpha === 0 && beta === 0) {
        throw make_error(new Compound("evaluation_error", ["undefined"]));
    } else {
        return norm_float(Math.atan2(alpha, beta));
    }
}


function arit_not(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    return ~alpha;
}

function arit_and(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return alpha & beta;
    } else {
        return norm_bigint(widen_bigint(alpha) & widen_bigint(beta));
    }
}

function arit_or(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return norm_smallint(alpha | beta);
    } else {
        return norm_bigint(widen_bigint(alpha) | widen_bigint(beta));
    }
}

function arit_xor(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        return norm_smallint(alpha ^ beta);
    } else {
        return norm_bigint(widen_bigint(alpha) ^ widen_bigint(beta));
    }
}

function arit_shiftright(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        if (0 <= beta && beta < 32) {
            return alpha >> beta;
        } else if (0 > beta && beta < Math.clz32(Math.abs(alpha)) - 1) {
            return norm_smallint(alpha << -beta);
        } else {
            return norm_bigint(widen_bigint(alpha) >> widen_bigint(beta));
        }
    } else {
        return norm_bigint(widen_bigint(alpha) >> widen_bigint(beta));
    }
}

function arit_shiftleft(args) {
    let alpha = exec_eval(args[0]);
    check_integer(alpha);
    let beta = exec_eval(args[1]);
    check_integer(beta);
    if (!is_bigint(alpha) && !is_bigint(beta)) {
        if (0 < beta && beta < Math.clz32(Math.abs(alpha)) - 1) {
            return norm_smallint(alpha << beta);
        } else if (0 >= beta && -beta < 32) {
            return alpha >> -beta;
        } else {
            return norm_bigint(widen_bigint(alpha) << widen_bigint(beta));
        }
    } else {
        return norm_bigint(widen_bigint(alpha) << widen_bigint(beta));
    }
}


function test_equal(args) {
    let alpha = exec_build(args[0]);
    let beta = exec_build(args[1]);
    return equal_term(alpha, beta);
}

function test_notequal(args) {
    let alpha = exec_build(args[0]);
    let beta = exec_build(args[1]);
    return !equal_term(alpha, beta);
}

function equal_term(first, second) {
    let stack = null;
    let log = null;
    try {
        for (; ;) {
            first = deref(first);
            second = deref(second);
            if (!is_structure(first)) {
                if (first !== second)
                    break;
            } else if (!is_structure(second)) {
                break;
            } else if (first.args.length !== second.args.length) {
                break;
            } else {
                first = union_find(first);
                second = union_find(second);
                if (first.functor !== second.functor) {
                    break;
                } else if (first !== second) {
                    log = union_add(log, first, second);
                    if (0 !== first.args.length - 1) {
                        let item = new Item(first, second, 0);
                        stack = stack_push(stack, item);
                    }
                    first = first.args[0];
                    second = second.args[0];
                    continue;
                }
            }
            let item = stack_peek(stack);
            if (item === null) {
                return true;
            } else {
                item.idx++;
                first = item.first.args[item.idx];
                second = item.second.args[item.idx];
                if (item.idx === item.first.args.length - 1)
                    stack_pop(stack);
            }
        }
        return false;
    } finally {
        union_undo(log);
    }
}


function test_same_term(args) {
    let alpha = exec_build(args[0]);
    let beta = exec_build(args[1]);
    return (alpha === beta);
}

function test_hash_code(args) {
    let alpha = exec_build(args[0]);
    alpha = norm_smallint(object_hash_code(alpha));
    return exec_unify(args[1], alpha);
}

function object_hash_code(alpha) {
    if (is_variable(alpha)) {
        return variable_serno(alpha);
    } else if (is_atom(alpha)) {
        let res = 0;
        for (let i = 0; i < alpha.length; i++)
            res = (res * 31 + alpha.charCodeAt(i)) | 0;
        return res;
    } else if (is_number(alpha)) {
        if (is_integer(alpha)) {
            if (!is_bigint(alpha)) {
                return alpha;
            } else {
                let sign;
                if (alpha < 0) {
                    sign = -1;
                    alpha = -alpha;
                } else {
                    sign = 1;
                }
                alpha = alpha.toString(16);
                let res = 0;
                let i = alpha.length % 8;
                if (i > 0)
                    res = parseInt(alpha.substring(0, i), 16) | 0;
                for (; i < alpha.length; i += 8)
                    res = (res * 31 + parseInt(alpha.substring(i, i + 8), 16)) | 0;
                return res * sign;
            }
        } else {
            let beta = new Float64Array(1);
            beta[0] = narrow_float(alpha);
            let gamma = new Int32Array(beta.buffer);
            return gamma[0] ^ gamma[1];
        }
    } else if (alpha === null) {
        return 0;
    } else if (alpha === true) {
        return 1231;
    } else if (alpha === false) {
        return 1237;
    } else {
        return 2467;
    }
}

function variable_serno(alpha) {
    let 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;
}


function test_atom_codes(args) {
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let 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);
    }
}

function atom_codes_pack(peek) {
    let temp = peek;
    let i = 0;
    while (is_structure(temp) &&
        temp.functor === "." &&
        temp.args.length === 2 &&
        i < MAX_ARITY) {
        let ch = deref(temp.args[0]);
        check_integer(ch);
        if (ch < 0 || ch > 0x10FFFF)
            throw make_error(new Compound("type_error",
                ["character_code", ch]));
        i++;
        temp = deref(temp.args[1]);
    }
    check_nil(temp);
    let res = new Array(i);
    temp = peek;
    i = 0;
    while (is_structure(temp) &&
            temp.functor === "." &&
            temp.args.length === 2) {
        let ch = deref(temp.args[0]);
        res[i++] = ch;
        temp = deref(temp.args[1]);
    }
    return String.fromCodePoint(...res);
}

function atom_codes_unpack(text) {
    let back = null;
    let res;
    let i = 0;
    while (i < text.length) {
        let ch = text.codePointAt(i);
        let peek = new Compound(".", [ch, undefined]);
        if (back !== null) {
            back.args[1] = peek;
        } else {
            res = peek;
        }
        back = peek;
        i += char_count(ch);
    }
    if (back !== null) {
        back.args[1] = "[]";
    } else {
        res = "[]";
    }
    return res;
}

function test_char_code(args) {
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let ch = exec_build(args[1]);
        check_integer(ch);
        if (ch < 0 || ch > 0x10FFFF)
            throw make_error(new Compound("type_error",
                ["character_code", ch]));
        ch = String.fromCodePoint(ch);
        return exec_unify(text, ch);
    } else {
        text = exec_build(text);
        check_atom(text);
        let ch;
        if (text.length === 0 ||
            text.length !== char_count(ch = text.codePointAt(0)))
            throw make_error(new Compound("type_error",
                ["character", text]));
        return exec_unify(args[1], ch);
    }
}


function test_atom_length(args) {
    let text = exec_build(args[0]);
    check_atom(text);
    let res = atom_count(text, 0, text.length);
    return exec_unify(args[1], norm_smallint(res));
}

function atom_count(text, from, to) {
    let res = 0;
    while (from < to) {
        let ch = text.codePointAt(from);
        from += char_count(ch);
        res ++;
    }
    return res;
}

function special_atom_concat(args) {
    let first = deref(args[0]);
    let second = deref(args[1]);
    let third = deref(args[2]);
    if (is_variable(second)) {
        if (is_variable(first)) {
            check_atom(third);
            return solve2_concat(args, null, 0, null);
        } else {
            check_atom(first);
            check_atom(third);
            if (!third.startsWith(first))
                return false;
            if (!unify(second, third.substring(first.length)))
                return false;
        }
    } else if (is_variable(first)) {
        check_atom(second);
        check_atom(third);
        if (!third.endsWith(second))
            return false;
        if (!unify(first, third.substring(0,third.length-second.length)))
            return false;
    } else {
        check_atom(first);
        check_atom(second);
        if (!unify(third, first + second))
            return false;
    }
    cont(call.args[1]);
    return true;
}

function solve_concat(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_concat(goal.args, rope, at, choice);
}

function solve2_concat(args, rope, at, choice) {
    let text = deref(args[2]);
    let mark = trail;
    while (at <= text.length) {
        if (unify(args[0], text.substring(0, at)) &&
            unify(args[1], text.substring(at))) {
            at = atom_succ(text,at);
            if (at <= text.length) {
                if (choice === null) {
                    choice = new Choice(solve_concat, null, at, mark);
                } else {
                    choice.at = at;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
        at = atom_succ(text,at);
    }
    return false;
}

function atom_offset(text,pos,alpha) {
    if (alpha < 0)
        return -1;
    while (alpha > 0 && pos < text.length) {
        let ch = text.codePointAt(pos);
        pos += char_count(ch);
        alpha--;
    }
    if (alpha > 0)
        return -1;
    return pos;
}

function atom_succ(text, at) {
    if (at < text.length) {
        let ch = text.codePointAt(at);
        return at + char_count(ch);
    } else {
        return at + 1;
    }
}


function test_atom_join(args) {
    let alpha = exec_build(args[0]);
    let res = atom_join(alpha);
    return exec_unify(args[1], res);
}

function atom_join(res) {
    let peek = res;
    let i = 0;
    while (is_structure(peek) &&
        peek.functor === "." &&
        peek.args.length === 2 &&
        i < MAX_ARITY) {
        i++;
        peek = deref(peek.args[1]);
    }
    check_nil(peek);
    let elems = new Array(i);
    peek = res;
    i = 0;
    while (is_structure(peek) &&
        peek.functor === "." &&
        peek.args.length === 2) {
        let val = deref(peek.args[0]);
        check_atom(val);
        elems[i++] = val;
        peek = deref(peek.args[1]);
    }
    return elems.join("");
}


function special_sys_atom_match(args) {
    let text = deref(args[0]);
    check_atom(text);
    let part = deref(args[1]);
    check_atom(part);
    let alpha = deref(args[2]);
    if (is_variable(alpha)) {
        return solve2_match(args, 0, 0, null);
    } else {
        check_integer(alpha);
        alpha = atom_offset(text, 0, alpha);
        if (alpha < 0)
            return false;
        if (!text.startsWith(part, alpha))
            return false;
    }
    cont(call.args[1]);
    return true;
}

function solve_match(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_match(goal.args, rope, at, choice);
}

function solve2_match(args, res, at, choice) {
    let text = deref(args[0]);
    let part = deref(args[1]);
    let mark = trail;
    while (at + part.length <= text.length) {
        let pos = text.indexOf(part, at);
        if (pos < 0)
            return false;
        res += atom_count(text, at, pos);
        at = pos;
        if (unify(args[2], norm_smallint(res))) {
            at = atom_succ(text, at);
            res++;
            if (at + part.length <= text.length) {
                if (choice === null) {
                    choice = new Choice(solve_match, res, at, mark);
                } else {
                    choice.data = res;
                    choice.at = at;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
        at = atom_succ(text,at);
        res++;
    }
    return false;
}

function special_sys_atom_part(args) {
    let text = deref(args[0]);
    check_atom(text);
    let alpha = deref(args[1]);
    if (is_variable(alpha)) {
        let beta = deref(args[2]);
        check_integer(beta);
        beta = atom_offset(text, 0, beta);
        if (beta < 0)
            return false;
        return solve2_part(args, [0,0], beta, null);
    } else {
        check_integer(alpha);
        let beta = deref(args[2]);
        check_integer(beta);
        alpha = atom_offset(text, 0, alpha);
        if (alpha < 0)
            return false;
        beta = atom_offset(text, alpha, beta);
        if (beta < 0)
            return false;
        if (!unify(args[3], text.substring(alpha, beta)))
            return false;
    }
    cont(call.args[1]);
    return true;
}

function solve_part(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_part(goal.args, rope, at, choice);
}

function solve2_part(args, pair, to, choice) {
    let text = deref(args[0]);
    let mark = trail;
    while (to <= text.length) {
        if (unify(args[1], norm_smallint(pair[1])) &&
            unify(args[3], text.substring(pair[0], to))) {
            pair[0] = atom_succ(text, pair[0]);
            pair[1]++;
            to = atom_succ(text, to);
            if (to <= text.length) {
                if (choice === null) {
                    choice = new Choice(solve_part, pair, to, mark);
                } else {
                    choice.at = to;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
        pair[0] = atom_succ(text, pair[0]);
        pair[1]++;
        to = atom_succ(text, to);
    }
    return false;
}


function special_sys_last_atom_match(args) {
    let text = deref(args[0]);
    check_atom(text);
    let part = deref(args[1]);
    check_atom(part);
    let alpha = deref(args[2]);
    if (is_variable(alpha)) {
        let at = text.length - part.length;
        let res = atom_count(text, 0, at);
        return solve2_last_match(args, res, at, null);
    } else {
        check_integer(alpha);
        alpha = atom_offset(text, 0, alpha);
        if (alpha < 0)
            return false;
        if (!text.startsWith(part, alpha))
            return false;
    }
    cont(call.args[1]);
    return true;
}

function solve_last_match(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_last_match(goal.args, rope, at, choice);
}

function solve2_last_match(args, res, at, choice) {
    let text = deref(args[0]);
    let part = deref(args[1]);
    let mark = trail;
    while (at >= 0) {
        let pos = text.lastIndexOf(part, at);
        if (pos < 0)
            return false;
        res -= atom_count(text, pos, at);
        at = pos;
        if (unify(args[2], norm_smallint(res))) {
            at = atom_pred(text, at);
            res--;
            if (at >= 0) {
                if (choice === null) {
                    choice = new Choice(solve_last_match, res, at, mark);
                } else {
                    choice.data = res;
                    choice.at = at;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
        at = atom_pred(text, at);
        res--;
    }
    return false;
}

function atom_pred(text, at) {
    if (0 < at) {
        let ch = last_code(text, at);
        return at - char_count(ch);
    } else {
        return at - 1;
    }
}

function special_sys_last_atom_part(args) {
    let text = deref(args[0]);
    check_atom(text);
    let alpha = deref(args[1]);
    if (is_variable(alpha)) {
        let beta = deref(args[2]);
        check_integer(beta);
        beta = last_atom_offset(text, text.length, beta);
        if (beta < 0)
            return false;
        let res = atom_count(text, 0, beta);
        return solve2_last_part(args, [beta,res], text.length, null);
    } else {
        check_integer(alpha);
        let beta = deref(args[2]);
        check_integer(beta);
        alpha = atom_offset(text, 0, alpha);
        if (alpha < 0)
            return false;
        beta = atom_offset(text, alpha, beta);
        if (beta < 0)
            return false;
        if (!unify(args[3], text.substring(alpha, beta)))
            return false;
    }
    cont(call.args[1]);
    return true;
}

function last_atom_offset(text,pos,alpha) {
    if (alpha < 0)
        return -1;
    while (alpha > 0 && 0 < pos) {
        let ch = last_code(text, pos);
        pos -= char_count(ch);
        alpha--;
    }
    if (alpha > 0)
        return -1;
    return pos;
}

function solve_last_part(rope, at, choice) {
    let goal = deref(call.args[0]);
    return solve2_last_part(goal.args, rope, at, choice);
}

function solve2_last_part(args, pair, to, choice) {
    let text = deref(args[0]);
    let mark = trail;
    while (pair[0] >= 0) {
        if (unify(args[1], norm_smallint(pair[1])) &&
            unify(args[3], text.substring(pair[0], to))) {
            pair[0] = atom_pred(text, pair[0]);
            pair[1]--;
            to = atom_pred(text, to);
            if (pair[0] >= 0) {
                if (choice === null) {
                    choice = new Choice(solve_last_part, pair, to, mark);
                } else {
                    choice.at = to;
                }
                more(choice);
            }
            cont(call.args[1]);
            return true;
        }
        unbind(mark);
        pair[0] = atom_pred(text, pair[0]);
        pair[1]--;
        to = atom_pred(text, to);
    }
    return false;
}


// number specials, basic predicates
add("is", 2, make_check(test_eval));

// number specials, basic operations
add("-", 2, make_arithmetic(arit_neg));
add("+", 3, make_arithmetic(arit_add));
add("-", 3, make_arithmetic(arit_sub));
add("*", 3, make_arithmetic(arit_mul));
add("/", 3, make_arithmetic(arit_quot));
add("//", 3, make_arithmetic(arit_intquot));
add("rem", 3, make_arithmetic(arit_rem));

// number specials, more operations
add("float", 2, make_arithmetic(arit_float));
add("^", 3, make_arithmetic(arit_intpow));
add("div", 3, make_arithmetic(arit_div));
add("mod", 3, make_arithmetic(arit_mod));

// number specials, magnitude operations
add("abs", 2, make_arithmetic(arit_abs));
add("sign", 2, make_arithmetic(arit_sign));
add("min", 3, make_arithmetic(arit_min));
add("max", 3, make_arithmetic(arit_max));

// number specials, rounding operations
add("truncate", 2, make_arithmetic(arit_truncate));
add("floor", 2, make_arithmetic(arit_floor));
add("ceiling", 2, make_arithmetic(arit_ceiling));
add("round", 2, make_arithmetic(arit_round));

// number specials, magnitude predicates
add("=:=", 2, make_check(test_numberequal));
add("=\\=", 2, make_check(test_numbernotequal));
add("<", 2, make_check(test_numberless));
add(">=", 2, make_check(test_numbergreaterequal));
add(">", 2, make_check(test_numbergreater));
add("=<", 2, make_check(test_numberlessequal));

// number specials, trigonometric operations
add("sin", 2, make_arithmetic(arit_sin));
add("cos", 2, make_arithmetic(arit_cos));
add("tan", 2, make_arithmetic(arit_tan));
add("asin", 2, make_arithmetic(arit_asin));
add("acos", 2, make_arithmetic(arit_acos));
add("atan", 2, make_arithmetic(arit_atan));
add("pi", 1, make_arithmetic(arit_pi));

// number specials, exponential operations
add("**", 3, make_arithmetic(arit_pow));
add("exp", 2, make_arithmetic(arit_exp));
add("log", 2, make_arithmetic(arit_log));
add("sqrt", 2, make_arithmetic(arit_sqrt));
add("e", 1, make_arithmetic(arit_e));
add("epsilon", 1, make_arithmetic(arit_epsilon));
add("atan2", 3, make_arithmetic(arit_atan2));

// number specials, bitwise operations
add("\\", 2, make_arithmetic(arit_not));
add("/\\", 3, make_arithmetic(arit_and));
add("\\/", 3, make_arithmetic(arit_or));
add("xor", 3, make_arithmetic(arit_xor));
add(">>", 3, make_arithmetic(arit_shiftright));
add("<<", 3, make_arithmetic(arit_shiftleft));

// term specials, miscellaneous equality
add("==", 2, make_check(test_equal));
add("\\==", 2, make_check(test_notequal));
add("same_term", 2, make_check(test_same_term));
add("hash_code", 2, make_check(test_hash_code));

// atom specials, standard
add("atom_codes", 2, make_check(test_atom_codes));
add("char_code", 2, make_check(test_char_code));
add("atom_length", 2, make_check(test_atom_length));
add("atom_concat", 3, make_special(special_atom_concat));

// atom specials, non-standard
add("atom_join", 2, make_check(test_atom_join));
add("sys_atom_part", 4, make_special(special_sys_atom_part));
add("sys_atom_match", 3, make_special(special_sys_atom_match));
add("sys_last_atom_part", 4, make_special(special_sys_last_atom_part));
add("sys_last_atom_match", 3, make_special(special_sys_last_atom_match));

let xml_serializer;
if (fs === undefined) {
    xml_serializer = new XMLSerializer();
} else {
    xml_serializer = undefined;
}


function post(msg) {
    register_signal(CTX_MAIN, msg);
    invoke_interrupt(CTX_MAIN);
}

function perform(goal) {
    goal = new Compound(".", [goal, "[]"]);
    return launch(goal, CTX_MAIN, VOID_ARGS);
}

async function perform_async(goal) {
    goal = new Compound(".", [goal, "[]"]);
    return await launch_async(goal, CTX_MAIN, VOID_ARGS);
}


const FFI_FUNC = 0x00000100;

function register(functor, arity, func, flags) {
    let res;
    if ((flags & FFI_FUNC) !== 0) {
        res = make_check(args => invoke_func(func, args));
    } else {
        res = make_check(args => invoke(func, args));
    }
    add(functor, arity, res);
}

function invoke(func, args) {
    let temp = new Array(args.length);
    for (let i = 0; i < temp.length; i++)
        temp[i] = exec_build(args[i]);
    func(...temp);
    return true;
}

function invoke_func(func, args) {
    let temp = new Array(args.length - 1);
    for (let i = 0; i < temp.length; i++)
        temp[i] = exec_build(args[i]);
    let res = func(...temp);
    return exec_unify(args[args.length-1], res);
}


function set_cursor(elem) {
    let dom = engine.text_output.data;
    dom.data = elem;

    dom = engine.text_error.data;
    dom.data = elem;
}

function html_encode(buf) {
    return xml_serializer.serializeToString(new Text(buf));
}

function html_send(data, buf) {
    buf = html_encode(buf);
    put_atom(data, buf);
    return data;
}

function fiddle_flush(data) {
    if (data.hasAttribute("cell-clear")) {
        data.innerHTML = "";
        data.removeAttribute("cell-clear");
    }
}

function fiddle_out(data, buf) {
    if (data.hasAttribute("cell-clear")) {
        data.innerHTML = "";
        data.removeAttribute("cell-clear");
    }
    let depth = 0;
    let k = buf.indexOf("<");
    let i = 0;
    while (k !== -1) {
        let k2 = buf.indexOf(">", k+1);
        if (k2 === -1)
            throw make_error(new Compound("syntax_error",
                ["missing_angle"]));
        if (buf.charCodeAt(k+1) === 47) { // '/'
            if (depth > 0) {
                depth--;
            } else {
                data.insertAdjacentHTML("beforeend", buf.substring(i, k));
                data = data.parentElement;
                i = k2 + 1;
            }
        } else if (buf.charCodeAt(k2-1) !== 47) { // '/'
            depth++;
        }
        k = buf.indexOf("<", k2+1);
    }
    data.insertAdjacentHTML("beforeend", buf.substring(i));
    while (depth > 0) {
        data = data.lastElementChild;
        depth--;
    }
    return data;
}


function set_input(text) {
    let src = engine.text_input;
    src.data = undefined;
    src.receive = fd => "";
    src.flags &= ~MASK_SRC_AREAD;
    src.buf = text;
    src.pos = 0;
    src.lineno = 0;
}


function set_caret_wait(elem) {
    let src = engine.text_input;
    src.data = elem;
    src.receive = fiddle_in_promise;
    src.flags |= MASK_SRC_AREAD;
    src.buf = "";
    src.pos = 0;
    src.lineno = 0;
}

function fiddle_in_promise(buf, stream) {
    return new Promise(resolve => {
        function keydown_handler(event) {
            if (event.key === "Enter") {
                event.preventDefault();

                let elem = stream.data;
                elem.insertAdjacentText("beforeend", "\n");
                elem.setAttribute("contenteditable", "false");
                elem.insertAdjacentHTML("afterend", "<span></span>");

                set_cursor(elem);
                stream.data = elem.nextElementSibling;
                stream.buf = elem.innerText;
                stream.pos = 0;

                elem = stream.data.parentElement;
                elem.removeEventListener("keydown", keydown_handler);
                register_interrupt(buf, () => {});
                resolve();
            }
        }

        let elem = stream.data;
        window.getSelection().collapse(elem, 0);
        elem.scrollIntoView();

        elem = stream.data.parentElement;
        elem.addEventListener("keydown", keydown_handler);
        register_interrupt(buf, () => {
            elem.removeEventListener("keydown", keydown_handler);
            register_interrupt(buf, () => {});
            resolve();
        });
    });
}


function shield_buttons(flag) {
    let pres = document.getElementsByClassName("nb_box");
    for (let num = 0; num < pres.length; num++) {
        let btn = pres[num].nextElementSibling;
        btn.disabled = flag;
    }
}

function rollback_stage(num) {
    let pres = document.getElementsByClassName("nb_box");
    while (num < stage) {
        set_stage(stage-1);
        let out = pres[stage].getElementsByClassName("nb_out")[0];
        if (num === stage) {
            out.setAttribute("cell-clear", "true");
        } else {
            out.innerHTML = "";
        }
        clear();
    }
}

async function advance_async(num) {
    let pres = document.getElementsByClassName("nb_box");
    while (num >= stage) {
        let btn = pres[stage].nextElementSibling;
        btn.disabled = false;
        btn.firstChild.className = "hack_box";
        let out = pres[stage].getElementsByClassName("nb_out")[0];
        set_cursor(out);
        engine.text_output.flags |= MASK_DST_FEAT;
        let txt = pres[stage].getElementsByClassName("nb_txt")[0];
        set_input(txt.innerText);
        try {
            await perform_async(new Compound("ensure_loaded", ["user"]));
            await group_gather_async();
            perform("flush_output");
        } catch (err) {
            group_teardown();
            perform(new Compound("sys_print_error", [err]));
        }
        set_stage(stage+1);
        btn.disabled = true;
        btn.firstChild.className = "hack_arrow";
    }
}

async function goto_async(form) {
    let pres = document.getElementsByClassName("nb_box");
    let num = [].indexOf.call(pres,form);
    let btn = form.nextElementSibling;
    if (btn.firstChild.className === "hack_arrow") {
        shield_buttons(true);
        rollback_stage(num);
        await advance_async(num);
        shield_buttons(false);
    } else {
        post(new Compound("system_error", ["user_abort"]));
    }
}


async function instrument_document_async() {
    let pres = Array.from(document.querySelectorAll(".code, .raw"));
    for (let num = 0; num < pres.length; num++) {
        let pre = pres[num];

        if (pre.className === "code") {
            pre.insertAdjacentHTML("beforebegin", '<div class="nb_flex"></div>');
            pre.previousElementSibling.appendChild(pre);

            /* modify text */
            let text = pre.innerHTML;
            text = '<div class="nb_txt" contenteditable="plaintext-only">' + text
                + '</div><div class="nb_out"></div>'
            pre.innerHTML = text;
            pre.className = "nb_box";

            /* create button */
            pre.insertAdjacentHTML("afterend", '&nbsp;<button class="nb_btn" disabled>' +
                '<div class="hack_arrow"></div>' +
                '</button>');
            let btn = pre.nextElementSibling;
            btn.addEventListener("click", async function () {
                await goto_async(pre);
            });
            btn.disabled = false;

            /* instrument text */
            let txt = pre.getElementsByClassName("nb_txt")[0];
            perform(new Compound("instrument_elem", [txt]));

        } else {
            /* colorize text */
            perform(new Compound("colorize_elem", [pre]));
        }

    }
}


function test_ir_object_new(args) {
    let res = new Map();
    return exec_unify(args[0], res);
}

function test_ir_object_current(args) {
    let obj = exec_build(args[0]);
    let key = exec_build(args[1]);
    check_atom(key);
    let res;
    if (obj instanceof Map) {
        res = obj.get(key);
    } else {
        try {
            res = obj[key];
        } catch (err) {
            res = undefined;
        }
    }
    if (res === undefined)
        return false;
    return exec_unify(args[2], res);
}


function test_ir_object_set(args) {
    let obj = exec_build(args[0]);
    let key = exec_build(args[1]);
    check_atom(key);
    let value = exec_build(args[2]);
    if (obj instanceof Map) {
        obj.set(key, value);
    } else {
        try {
            obj[key] = value;
        } catch (err) {
            throw make_error(new Compound("permission_error",
                ["field", "modify", key]));
        }
    }
    return true;
}

function test_ir_object_reset(args) {
    let obj = exec_build(args[0]);
    let key = exec_build(args[1]);
    check_atom(key);
    if (obj instanceof Map) {
        obj.delete(key);
    } else {
        try {
            delete obj[key];
        } catch (err) {
            throw make_error(new Compound("permission_error",
                ["field", "modify", key]));
        }
    }
    return true;
}

function test_ir_object_keys(args) {
    let obj = exec_build(args[0]);
    if (obj instanceof Map) {
        obj = obj.keys();
    } else {
        obj = Object.keys(obj);
    }
    obj = set_to_list(obj);
    return exec_unify(args[1], obj);
}

function set_to_list(temp) {
    let back = null;
    let res = null;
    if (temp !== null) {
        for (let peek of temp) {
            peek = new Compound(".", [peek, undefined]);
            if (back === null) {
                res = peek;
            } else {
                back.args[1] = peek;
            }
            back = peek;
        }
    }
    if (back === null) {
        res = "[]";
    } else {
        back.args[1] = "[]";
    }
    return res;
}


function test_ir_float_value(args) {
    let alpha = exec_deref(args[0]);
    if (is_variable(alpha) || is_pending(alpha)) {
        let beta = exec_build(args[1]);
        check_number(beta);
        let res = norm_float(narrow_float(beta));
        return exec_unify(alpha, res);
    } else {
        alpha = exec_build(alpha)
        check_number(alpha);
        let res = narrow_float(alpha);
        return exec_unify(args[1], res);
    }
}


function Timer(id) {
    this.id = id;
}

function test_os_call_later(args) {
    let goal = exec_build(args[0]);
    check_goal(goal);
    let delay = exec_build(args[1]);
    check_integer(delay);
    if (delay < 0)
        throw make_error(new Compound("domain_error",
            ["not_less_than_zero", delay]));
    delay = narrow_float(delay);
    let buf = ctx;
    let id = setDelay(() => callback(goal, buf, VOID_ARGS), delay);
    return exec_unify(args[2], new Timer(id));
}

function test_timer_cancel(args) {
    let tid = exec_build(args[0]);
    check_timer(tid);
    clearTimeout(tid.id);
    return true;
}

function check_timer(beta) {
    if (!(beta instanceof Timer)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["timer", beta]));
    }
}


function test_current_task(args) {
    return exec_unify(args[0], ctx);
}

function test_task_abort(args) {
    let buf = exec_build(args[0]);
    check_task(buf);
    let msg = exec_build(args[1]);
    msg = copy_term(msg);
    register_signal(buf, msg);
    invoke_interrupt(buf);
    return true;
}

function check_task(beta) {
    if ((beta !== CTX_MAIN) &&
        !(beta instanceof Context)) {
        check_nonvar(beta);
        beta = copy_term(beta);
        throw make_error(new Compound("type_error", ["task", beta]));
    }
}

function test_os_task_create(args) {
    let goal = exec_build(args[0]);
    check_goal(goal);
    let buf = new Context();
    setDelay(async () => await task_async(goal, buf, VOID_ARGS), 0);
    return exec_unify(args[1], buf);
}


function test_net_open_promise_opts(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let opts = exec_build(args[1]);
    let stream = new Source();
    if (!exec_unify(args[2], stream))
        return false;
    let buf = ctx;
    let prom;
    if (fs !== undefined) {
        prom = open_http_promise_opts(buf, stream, url, opts);
    } else {
        try {
            url = new URL(url, codebase).href;
        } catch (err) {
            throw make_error(
                new Compound("resource_error", ["base_url"]));
        }
        prom = open_http_promise_opts(buf, stream, url, opts);
    }
    return exec_unify(args[3], prom);
}

async function open_http_promise_opts(buf, stream, url, opts) {
    let paras = {};
    if (opts !== null && opts.get("method") !== undefined) {
        paras.method = opts.get("method");
    } else if (opts !== null && opts.get("body") !== undefined) {
        paras.method = "POST";
    } else {
        paras.method = "GET";
    }
    if (opts !== null && opts.get("body") !== undefined) {
        let opts2 = opts.get("body");
        if (fs !== undefined) {
            let enc = get_encoding(opts2);
            paras.body = Buffer.from(opts2.get("text"), enc);
        } else {
            paras.body = opts2.get("text");
        }
    }
    if (opts !== null && opts.get("headers") !== undefined)
        paras.headers = opts.get("headers");
    let contr = new AbortController();
    paras.signal = contr.signal;
    register_interrupt(buf, () => contr.abort("ABORT"));
    try {
        let response = await fetch(url, paras);
        register_interrupt(buf, () => {});
        if (response.status < 200 || 399 < response.status) {
            register_signal(buf, map_http_result(response.status, url));
        } else {
            if (opts !== null) {
                opts.set("uri", response.url);
                opts.set("status", response.status);
                let res = new Map();
                let map = response.headers;
                for (let key of map.keys())
                    res.set(key, map.get(key));
                opts.set("fields", res);
            }
            if (!response.body) {
                /* */
            } else {
                let enc = get_encoding(opts);
                stream.data = response.body.getReader();
                stream.receive = (buf, stream) => http_read_promise(enc, buf, stream);
                stream.release = http_close_promise;
                stream.flags |= MASK_SRC_AREAD;
            }
        }
    } catch (err) {
        register_interrupt(buf, () => {});
        if ("ABORT" !== err)
            register_signal(buf, map_file_error(err, url));
    }
}

async function http_read_promise(enc, buf, stream) {
    try {
        let {done, value} = await stream.data.read();
        let res;
        if (done) {
            res = "";
        } else {
            if (fs !== undefined) {
                res = Buffer.from(value.buffer).toString(enc);
            } else {
                let txt = new TextDecoder("utf8");
                res = txt.decode(value);
            }
        }
        stream.buf = res;
        stream.pos = 0;
    } catch (err) {
        register_signal(buf, map_stream_error(err));
    }
}

function http_close_promise(buf, stream) {
    return stream.data.cancel();
}

function map_http_result(res, url) {
    switch (res) {
        case 403: // Forbidden
            return new Compound("permission_error",
                ["open", "source_sink", url]);
        case 404: // Not Found
            return new Compound("existence_error",
                ["source_sink", url]);
        case 405: // Method Not Allowed
            return new Compound("resource_error",
                ["illegal_method"]);
        case 500: // Internal Server Error
            return new Compound("resource_error",
                ["internal_error"]);
        case 503: // Service Unavailable
            return new Compound("resource_error",
                ["service_unavailable"]);
        default:
            return new Compound("resource_error",
                ["io_exception"]);
    }
}


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

function test_net_prop_promise(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    let res = {};
    if (!exec_unify(args[1], res))
        return false;
    let buf = ctx;
    let prom;
    if (fs !== undefined) {
        prom = prop_http_promise(buf, url, res);
    } else {
        try {
            url = new URL(url, codebase).href;
        } catch (err) {
            throw make_error(
                new Compound("resource_error", ["base_url"]));
        }
        prom = prop_http_promise(buf, url, res);
    }
    return exec_unify(args[2], prom);
}

async function prop_http_promise(buf, url, res) {
    let paras = {};
    paras.method = "HEAD";
    let contr = new AbortController();
    paras.signal = contr.signal;
    register_interrupt(buf, () => contr.abort("ABORT"));
    try {
        let response = await fetch(url, paras);
        register_interrupt(buf, () => { });
        if (response.status !== 200) {
            register_signal(buf, map_http_result(response.status, url));
        } else {
            let val = response.headers.get("Last-Modified");
            let mtime = (val !== null ? sys_time_parse(
                val, HTTP_TIME, 1) : -1);

            res.last_modified = norm_smallint(mtime);
            res.absolute_path = response.url;
            res.type = "regular";
            res.can_write = "false";
        }
    } catch(err) {
        register_interrupt(buf, () => {});
        if ("ABORT" !== err)
            register_signal(buf, map_file_error(err, url));
    }
}


function test_net_open_sync_opts(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    throw make_error(new Compound("permission_error",
        ["access", "source_sink", url]));
}

function test_net_cntrl_sync(args) {
    let url = exec_build(args[0]);
    check_atom(url);
    throw make_error(new Compound("permission_error",
        ["access", "source_sink", url]));
}


function test_sys_atom_time(args) {
    let fmt = exec_build(args[1]);
    check_atom(fmt);
    let flag = exec_build(args[2]);
    check_integer(flag);
    let text = exec_deref(args[0]);
    if (is_variable(text) || is_pending(text)) {
        let tms = exec_build(args[3]);
        check_integer(tms);
        let res = sys_time_format(fmt, narrow_float(tms), flag);
        if (res === null)
            throw make_error(new Compound("domain_error",
                ["time_format", fmt]));
        return exec_unify(text, res);
    } else {
        text = exec_build(text);
        check_atom(text);
        let tms = sys_time_parse(text, fmt, flag);
        if (isNaN(tms))
            throw make_error(new Compound("syntax_error", ["illegal_date"]));
        if (tms === null)
            throw make_error(new Compound("domain_error",
                ["time_format", fmt]));
        return exec_unify(args[3], norm_smallint(tms));
    }
}

function sys_time_parse(res, pat, utc) {
    let year = 1900; let month = 1; let day = 1;
    let hour = 0; let  minute = 0; let second = 0;
    let j = 0;
    for (let i = 0; i < pat.length; i++) {
        let ch = pat.charCodeAt(i);
        if (ch === 37) { // %
            i++;
            let k;
            switch (pat.charCodeAt(i)) {
                case 37: // %
                    if (j < res.length && res.charCodeAt(j) === 37) {
                        j++;
                    } else {
                        return NaN;
                    }
                    break;
                case 97: // a
                    k = scan_alphanum(res, j);
                    let f = new Intl.DateTimeFormat((utc !== 0 ? "en-US":undefined), {weekday: "short"});
                    let weekday = parse_weekday(res.substring(j, k), f);
                    if (isNaN(weekday))
                        return NaN;
                    j = k;
                    break;
                case 98: // b
                    k = scan_alphanum(res, j);
                    let g = new Intl.DateTimeFormat((utc !== 0 ? "en-US":undefined), {month: "short"});
                    month = parse_month(res.substring(j, k), g);
                    if (isNaN(month))
                        return NaN;
                    j = k;
                    break;
                case 100: // d
                    k = scan_integer(res, j);
                    day = Number.parseInt(res.substring(j, k));
                    if (isNaN(day))
                        return NaN;
                    j = k;
                    break;
                case 109: // m
                    k = scan_integer(res, j);
                    month = Number.parseInt(res.substring(j, k));
                    if (isNaN(month))
                        return NaN;
                    j = k;
                    break;
                case 89: // Y
                    k = scan_integer(res, j);
                    year = Number.parseInt(res.substring(j, k));
                    if (isNaN(year))
                        return NaN;
                    j = k;
                    break;
                case 72: // H
                    k = scan_integer(res, j);
                    hour = Number.parseInt(res.substring(j, k));
                    if (isNaN(hour))
                        return NaN;
                    j = k;
                    break;
                case 77: // M
                    k = scan_integer(res, j);
                    minute = Number.parseInt(res.substring(j, k));
                    if (isNaN(minute))
                        return NaN;
                    j = k;
                    break;
                case 83: // S
                    k = scan_integer(res, j);
                    second = Number.parseInt(res.substring(j, k));
                    if (isNaN(second))
                        return NaN;
                    j = k;
                    break;
                default:
                    return null;
            }
        } else {
            if (j < res.length && res.charCodeAt(j) === ch) {
                j++;
            } else {
                return NaN;
            }
        }
    }
    if (utc !== 0) {
        return Date.UTC(year, month - 1, day, hour, minute, second);
    } else {
        return new Date(year, month - 1, day, hour, minute, second).getTime();
    }
}

function scan_alphanum(res, j) {
    let ch;
    while (j < res.length && ((48 <= (ch = res.charCodeAt(j)) && ch <= 57) ||
        (65 <= ch && ch <= 90) ||
        (97 <= ch && ch <= 122)))
        j++;
    return j;
}

function parse_weekday(str, fmt) {
    str = str.toLowerCase();
    for (let i=1; i < 8; i++) {
        let wday = new Date(Date.UTC(2001,0,i,0,0,0));
        let val = fmt.format(wday);
        val = val.toLowerCase();
        if (str === val)
            return i;
    }
    return NaN;
}

function parse_month(str, fmt) {
    str = str.toLowerCase();
    for (let i=1; i < 13; i++) {
        let mon = new Date(Date.UTC(2001,i-1,1,0,0,0));
        let val = fmt.format(mon);
        val = val.toLowerCase();
        if (str === val)
            return i;
    }
    return NaN;
}

function scan_integer(res, j) {
    let ch;
    while (j < res.length && 48 <= (ch = res.charCodeAt(j)) && ch <= 57)
        j++;
    return j;
}

function sys_time_format(pat, tms, utc) {
    let date = new Date(tms);
    let buf = "";
    let k = 0;
    for (let i = 0; i < pat.length; i++) {
        let ch = pat.charCodeAt(i);
        if (ch === 37) { // %
            buf += pat.substring(k, i);
            i++;
            if (i < pat.length) {
                switch (pat.charCodeAt(i)) {
                    case 37: // %
                        buf += "%";
                        break;
                    case 97: // a
                        let f;
                        if (utc !== 0) {
                            f = new Intl.DateTimeFormat("en-US", {timeZone: "UTC", weekday: "short"});
                        } else {
                            f = new Intl.DateTimeFormat(undefined, {weekday: "short"});
                        }
                        buf += f.format(date);
                        break;
                    case 98: // b
                        let g;
                        if (utc !== 0) {
                            g = new Intl.DateTimeFormat("en-US", {timeZone: "UTC", month: "short"});
                        } else {
                            g = new Intl.DateTimeFormat(undefined, {month: "short"});
                        }
                        buf += g.format(date);
                        break;
                    case 100: // d
                        buf = append_padded(buf, (utc !== 0 ? date.getUTCDate():date.getDate()));
                        break;
                    case 109: // m
                        buf = append_padded(buf, (utc !== 0 ? date.getUTCMonth():date.getMonth())+1);
                        break;
                    case 89: // Y
                        buf += (utc !== 0 ? date.getUTCFullYear():date.getFullYear());
                        break;
                    case 72: // H
                        buf = append_padded(buf, (utc !== 0 ? date.getUTCHours():date.getHours()));
                        break;
                    case 77: // M
                        buf = append_padded(buf, (utc !== 0 ? date.getUTCMinutes():date.getMinutes()));
                        break;
                    case 83: // S
                        buf = append_padded(buf, (utc !== 0 ? date.getUTCSeconds():date.getSeconds()));
                        break;
                    default:
                        return null;
                }
                k = i + 1;
            } else {
                k = i;
            }
        }
    }
    buf += pat.substring(k, pat.length);
    return buf;
}

function append_padded(buf, value) {
    if (value < 10)
        buf += '0';
    buf += value.toString();
    return buf;
}


// object specials
add("ir_object_new", 1, make_check(test_ir_object_new));
add("ir_object_current", 3, make_check(test_ir_object_current));
add("ir_object_set", 3, make_check(test_ir_object_set));
add("ir_object_reset", 2, make_check(test_ir_object_reset));
add("ir_object_keys", 2, make_check(test_ir_object_keys));

// object specials II
add("ir_float_value", 2, make_check(test_ir_float_value));

// system specials, coroutines
add("os_call_later", 3, make_check(test_os_call_later));
add("timer_cancel", 1, make_check(test_timer_cancel));
add("current_task", 1, make_check(test_current_task));
add("task_abort", 2, make_check(test_task_abort));
add("os_task_create", 2, make_check(test_os_task_create));

// net specials, async
add("net_open_promise_opts", 4, make_check(test_net_open_promise_opts));
add("net_prop_promise", 3, make_check(test_net_prop_promise));

// net specials, sync
add("net_open_sync_opts", 4, make_check(test_net_open_sync_opts));
add("net_cntrl_sync", 2, make_check(test_net_cntrl_sync));

// atom specials, time
add("sys_atom_time", 4, make_check(test_sys_atom_time));


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


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










export {add, Clause, run, check_goal, clear, set_partition,
    Goal, Cache, make_defined, set_stage, VOID_ARGS,
    Context, is_provable, is_cache, launch_async, launch,
    task_async, callback}

export function get_cont() {
    return call;
}
export function get_mark() {
    return trail;
}
export function get_engine() {
    return engine;
}
export function get_ctx() {
    return ctx;
}
export function get_stage() {
    return stage;
}
export function get_codebase() {
    return codebase;
}
export function get_gc_enter() {
    return gc_enter;
}
export function get_bootbase() {
    return bootbase;
}

export {make_special, make_arithmetic, check_atomic, is_frozen,
    make_check, cont, make_error, check_clause, register_interrupt,
    check_nonvar, check_atom, fs, url, register_signal, MAX_ARITY,
    check_number, check_integer, check_callable, Item,
    assoc_get, assoc_set,
    stack_push, stack_peek, stack_pop, is_compound}

export {Variable, Compound, is_variable, is_structure,
    is_atom, is_number, is_integer, is_float, unify,
    exec_deref, is_pending,
    union_find, union_add, union_undo, walk_vars,
    VAR_MASK_SEEN, VAR_MASK_SERNO, VAR_MASK_STATE,
    equal_term, bind, exec_unify, variable_serno,
    deref, copy_term, exec_eval, exec_build, set_to_list,
    objects_list, list_objects, object_hash_code}

export {Source, Sink, stream_close, stream_flush,
    check_source, check_sink, put_atom, MASK_DST_FEAT,
    MASK_SRC_AREAD, get_encoding, map_stream_error,
    set_bootbase, set_codebase, file_read_promise}

export {post, perform, goto_async, FFI_FUNC, register,
    instrument_document_async, perform_async}

export {is_bigint, norm_smallint, widen_bigint,
    norm_bigint, narrow_float, norm_float, char_count}

export {fiddle_out, fiddle_in_promise, html_send, html_encode,
    set_cursor, set_caret_wait, set_input, fiddle_flush}