Admin User, erstellt 06. Apr. 2025
/**
* 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
* Dogelog is a deposited trademark of XLOG Technologies AG.
*/
/**
* subsumes(X, Y): [N208 8.2.4]
* The built-in succeeds if X subsumes Y.
*/
% subsumes(+Term, +Term)
subsumes(X, Y) :-
subsumes_term(X, Y),
X = Y.
/**
* unnumbervars(S, N, T):
* The predicate succeeds in T with a copy of S with compounds of
* the form ‘$VAR’(<index>) and <index> greater or equal N are
* replaced by fresh variables.
*/
% unnumbervars(+Term, +Integer, -Term)
unnumbervars(S, N, T) :-
sys_unnumbervars(S, N, _, H),
H = T.
% sys_unnumbervars(+Term, +Integer, -List, -Term)
sys_unnumbervars(V, _, _, V) :- var(V), !.
sys_unnumbervars('$VAR'(M), N, U, V) :- integer(M), N =< M, !,
K is M-N, nth0(K, U, V).
sys_unnumbervars(S, N, U, T) :-
S =.. [F|L],
sys_unnumbervars_list(L, N, U, R),
T =.. [F|R].
% sys_unnumbervars_list(+List, +Integer, -List, -List)
sys_unnumbervars_list([], _, _, []).
sys_unnumbervars_list([X|L], N, U, [Y|R]) :-
sys_unnumbervars(X, N, U, Y),
sys_unnumbervars_list(L, N, U, R).