fluents.pl -- Fluents in mongolog programs.

Fluents are functional predicates that change their value over time. Documents with a dedicated time field are used to represent fluents. Any existing database collection with time index may be used as a backend for fluents. At any timepoint, the document with the latest stamp before the timepoint provides fluent value. There can only be one fluent value at a time. However, fluents may have additional "key" arguments. For each combination of key arguments a different value is stored. The value of a fluent is given by the remaining "value" arguments. Each argument may be an atomic value, or a compound term. Fluents support assert/1 and retractall/1 for adding and removing them from the database. All key arguments must be grounded, value arguments maybe grounded to apply additional filtering based on the fluent value.

author
- Daniel Beßler
license
- BSD
 mongolog_add_fluent(+Functor, +ArgFields, +TimeField, +Options) is semidet
Register a fluent predicate that stores facts in the database. Functor is the functor of a n-ary predicate, and Fields is a n-elemental list of keys associated to the different arguments of the predicate. TimeKey is the document field where the time is stored. Options may have the same options as accepted by mongolog_add_predicate/3.

Current limitation: there cannot be predicates with the same functor, but different arity.

Arguments:
Functor- functor of the predicate
ArgFields- field names of predicate arguments
TimeField- field name of time value
Options- option list
 mongolog_add_fluent(+Functor, +ArgFields, +TimeField) is semidet
Same as mongolog_add_fluent/4 with empty options list.
Arguments:
Functor- functor of the predicate
ArgFields- field names of predicate arguments
TimeField- field name of time value
 mongolog_drop_fluent(+Functor) is det
Delete all facts associated to predicate with given functor.
Arguments:
Functor- functor of the predicate