Next: , Previous: , Up: Built-Ins   [Contents][Index]


4.6 Other Relations

true()

Always succeeds.
rel true()

false()

Always fails.
rel false()

Term1 = Term2

Succeeds if Term1 and Term2 unify.

Any function calls in each argument term are evaluated first using strict evaluation - expression arguments evaluated first - as with every relation call.
rel =(??term, ??term)

Term1 =@ Term2

Succeeds if Term1 and Term2 unify without instantiating variables in Term2 (one-sided unification).


rel =@(??term, @term)

N1 > N2

Succeeds if N1 is numberically greater than N2.
rel >(!num, !num)

N1 >= N2

Succeeds if N1 is numberically greater than or equal to N2.
rel >=(!num, !num)

N1 < N2

Succeeds if N1 is numberically less than N2.
rel <(!num, !num)

N1 =< N2

Succeeds if N1 is numberically less than or equal to N2.
rel =<(!num, !num)

X in T

Succeeds if X is a term and and T is a list, tuple, or set of terms and X is an element of T or if X and T are both strings and X is a single character string occurring in T.

rel ?T in !list(T),
    ??T in !list(??T),
    ?T in !tuple(T),
    ??T in !tuple(??T),
    ?T in !set(T),
    ?string in !string

string2term(S, T)

Succeeds if T is the term obtained by parsing the string S as a Qulog term.
rel string2term(!string, ??term)

this_thread_name(Name)

Succeeds if Name is the name of this thread
current_thread : rel(?atom)

get_active_resources(ResourceInfo)

Succeeds if ResourceInfo is the list of terms res(atom,list(resource)) giving resources used by each running task in a multi-tasking agent. The atom is task name.
rel get_active_resources(?term)

get_waiting_resources(ResourceInfo)

Succeeds if ResourceInfo is the list of terms res(atom,list(resource)) giving resources needed by each waiting task in a multi-tasking agent. The atom is task name.
rel get_waiting_resources(?term)


Next: , Previous: , Up: Built-Ins   [Contents][Index]