JavaScript "dogelog"

Admin User, created Mar 08. 2024
         
/**
* Modern Albufeira Prolog Interpreter
*
* Warranty & Liability
* To the extent permitted by applicable law and unless explicitly
* otherwise agreed upon, XLOG Technologies AG makes no warranties
* regarding the provided information. XLOG Technologies AG assumes
* no liability that any problems might be solved with the information
* provided by XLOG Technologies AG.
*
* Rights & License
* All industrial property rights regarding the information - copyright
* and patent rights in particular - are the sole property of XLOG
* Technologies AG. If the company was not the originator of some
* excerpts, XLOG Technologies AG has at least obtained the right to
* reproduce, change and translate the information.
*
* Reproduction is restricted to the whole unaltered document. Reproduction
* of the information is only allowed for non-commercial uses. Selling,
* giving away or letting of the execution of the library is prohibited.
* The library can be distributed as part of your applications and libraries
* for execution provided this comment remains unchanged.
*
* Restrictions
* Only to be distributed with programs that add significant and primary
* functionality to the library. Not to be distributed with additional
* software intended to replace any components of the library.
*
* Trademarks
* Jekejeke is a registered trademark of XLOG Technologies AG.
*/
/*********************************************************************/
/* Import Native API */
/*********************************************************************/
/* embedding native API */
import {Clause, add, Cache, make_defined, engine, set_stage, clear, stage
} from "./nova/store.mjs";
import {
run, Goal, launch, ctx, launch_async, Context
} from "./nova/machine.mjs";
import {check_goal, check_clause
} from "./nova/runtime.mjs";
/* registry native API */
import {call, cont, unify, make_error, fs, http,
bind, unbind, trail, check_nonvar, check_callable,
register_signal, register_interrupt
} from "./nova/machine.mjs";
import {
check_atom, check_number, make_arithmetic, make_check,
check_integer, check_atomic
} from "./nova/special.mjs";
/* term native API */
import {Variable, is_variable, Compound, is_compound
} from "./nova/store.mjs";
import {
is_atom, is_number, is_integer, is_float,
copy_term, deref, exec_eval, exec_unify, exec_build
} from "./nova/machine.mjs";
import {compare_term, equal_term
} from "./nova/eval.mjs";
/* stream native API */
import {Source, Sink, set_cursor, stream_close, stream_flush,
check_source, check_sink, put_atom, flush_buffer, codebase,
open_write, open_file_promise, open_http_promise,
map_http_result, MASK_SRC_AREAD, http_read_promise,
http_close_promise, map_file_error, map_stream_error
} from "./nova/runtime.mjs";
/* specific native API */
import {
is_bigint, norm_smallint, norm_bigint, widen_bigint,
char_count, narrow_float, norm_float, make_special
} from "./nova/special.mjs";
/* specific browser API */
import {fiddle_out, fiddle_err
} from "./nova/runtime.mjs";
/*********************************************************************/
/* Export Native API */
/*********************************************************************/
/* embedding native API */
export {add, Clause, run, check_goal, clear,
Goal, Cache, make_defined, launch, set_stage,
launch_async, Context}
/* registry native API */
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 {make_special, make_arithmetic, check_atomic,
make_check, cont, make_error, check_clause, register_interrupt,
check_nonvar, check_atom, fs, http, register_signal,
check_number, check_integer, check_callable}
/* term native API */
export {Variable, Compound, is_variable, is_compound,
is_atom, is_number, is_integer, is_float, unify,
equal_term, compare_term, bind, unbind, exec_unify,
deref, copy_term, exec_eval, exec_build}
/* stream native API */
export {Source, Sink, set_cursor, stream_close, stream_flush,
check_source, check_sink, put_atom, flush_buffer,
MASK_SRC_AREAD, open_write, open_file_promise,
open_http_promise, map_http_result, map_file_error,
map_stream_error, http_read_promise, http_close_promise}
/* specific native API */
export {is_bigint, norm_smallint, widen_bigint,
norm_bigint, narrow_float, norm_float, char_count}
/* specific browser API */
export {fiddle_out, fiddle_err}