YAP 7.1.0
Atom to Atomic Family of Built-ins.

Maintain a light-weight map where the key is an atom, and the value can be any constant. More...

Detailed Description

Maintain a light-weight map where the key is an atom, and the value can be any constant.


Class Documentation

◆ set_value/2

class set_value/2

set_value(+ A,+ C)

Associate atom A with constant C

The set_value and get_value built-ins give a fast alternative to the internal data-base This is a simple form of implementing a global counter

read_and_increment_counter(Value) :-
get_value(counter, Value),
Value1 is Value+1,
set_value(counter, Value1).

This predicate is YAP specific

◆ get_value/2

class get_value/2

get_value(+ A,- V)

In YAP, atoms can be associated with constants If one such association exists for atom A, unify the second argument with the constant Otherwise, unify V with []

This predicate is YAP specific