flowlog.c)This document lists the built-in predicates and
arithmetic evaluable functors implemented by Flowlog
(flowlog.c).
Notes:
member/2) are not built in; define them in your
program if you need them.flowlog_engine=wam,
flowlog_engine=wamvm, and
flowlog_engine=interp/tree). When the active engine cannot
safely execute a query it may fall back; see IMPLEMENTATION.md.true/0fail/0false/0!/0repeat/0call/1..8once/1(\+)/1','/2(';')/2(->)/2(:)/2catch/3throw/1(=)/2(\\=)/2(==)/2(\\==)/2(=@=)/2(\\=@=)/2compare/3(@<)/2, (@=<)/2,
(@>)/2, (@>=)/2(=..)/2functor/3arg/3copy_term/2term_variables/2unify_with_occurs_check/2subsumes_term/2acyclic_term/1ground/1var/1nonvar/1atom/1integer/1float/1number/1atomic/1compound/1callable/1is/2(<)/2, (=<)/2,
(>)/2, (>=)/2(=:=)/2, (=\\=)/2evaluable_property/2atom_chars/2atom_codes/2atom_concat/3atom_length/2number_chars/2number_codes/2char_code/2sub_atom/5sub_string/5char_conversion/2current_char_conversion/2length/2sort/2msort/2keysort/2findall/3bagof/3setof/3dynamic/1 (as a predicate and as a load-time
directive)current_predicate/1predicate_property/2asserta/1assertz/1assert/1retract/1retractall/1abolish/1clause/2numbervars/3op/3 (as a predicate and as a load-time directive)current_op/3current_prolog_flag/2set_prolog_flag/2 (also supported as a load-time
directive for a small whitelist)current_input/1, current_output/1,
current_error/1set_input/1, set_output/1,
set_error/1open/3, open/4close/1, close/2stream_property/2set_stream/2set_stream_position/2at_end_of_stream/0,
at_end_of_stream/1get_code/1, get_code/2get_char/1, get_char/2get_byte/1, get_byte/2peek_code/1, peek_code/2peek_char/1, peek_char/2peek_byte/1, peek_byte/2unget_code/1, unget_code/2unget_char/1, unget_char/2unget_byte/1, unget_byte/2put_code/1, put_code/2put_char/1, put_char/2put_byte/1, put_byte/2tab/1, tab/2nl/0, nl/1flush_output/0, flush_output/1read/1, read/2read_term/2, read_term/3write/1, write/2writeq/1, writeq/2write_canonical/1, write_canonical/2write_term/2, write_term/3listing/0, listing/1trace/0, notrace/0debug/0, nodebug/0current_rule/1countall/2Parallelism is configured via Prolog flags (see PARALLELISM.md), but Flowlog
also exposes introspection helpers:
flowlog_and_safe/2flowlog_and_safe_goal/2Flowlog keeps a few predicates for compatibility with other builds. In this build they return fixed values:
flowlog_cpuproc_id/1flowlog_n_cpuproc/1flowlog_in_cpuproc/1flowlog_taskjob_id/1flowlog_n_taskjob/1flowlog_last_tc_cp_mask/1flowlog_last_tc_cp_count/1flowlog_last_tc_worker_count/1flowlog_last_tc_start_ok/1flowlog_last_tc_start_error_code/1flowlog_last_tc_start_error_text/1flowlog_db_epochs/2These predicates are not ISO Prolog. They are used internally (tests/benchmarks) and may change:
$flowlog_sleep_ms/1 (deterministic sleep in
milliseconds; integer >= 0)These functors are accepted by is/2 and numeric
comparisons:
pi/0e/0epsilon/0(+)/1(-)/1abs/1sign/1floor/1ceiling/1truncate/1round/1float_integer_part/1float_fractional_part/1float/1(\\)/1 (bitwise not)sin/1, cos/1, tan/1asin/1, acos/1, atan/1sqrt/1, log/1, exp/1(+)/2(-)/2(*)/2(/)/2(//)/2 (truncating integer division)rem/2div/2 (floor division)mod/2min/2, max/2(/\\)/2 (bitwise and)(\\/)/2 (bitwise or)xor/2(<<)/2, (>>)/2(**)/2(^)/2atan2/2