package acgtk
Install
Dune Dependency
Authors
Maintainers
Sources
sha512=5d380a947658fb1201895cb4cb449b1f60f54914c563e85181d628a89f045c1dd7b5b2226bb7865dd090f87caa9187e0ea6c7a4ee3dc3dda340d404c4e76c7c2
doc/acgtk.datalogLib/DatalogLib/Datalog_AbstractSyntax/AbstractSyntax/Predicate/PredIdTable/index.html
Module Predicate.PredIdTable
Source
identifier
is the type of the identifier stored in the table. It is meant to be associated with a string
The type of the table
This exception can be raised when some identifier or some symbol is not found in a query
find_id_of_sym sym t
returns the identifier of the string sym
stored in t
. Raises CT_Not_found
if no such identifier exists.
find_id_of_sym_opt sym t
returns Some id
where id
is the identifier of the string sym
stored in t
, and returns None
if no such identifier exists.
find_sym_from_id id t
returns the string (i.e. the symbol) corresponding to the identifier id
in table t
. Raises CT_Not_found
if no such symbol exists.
add_sym sym t
returns a pair (id,t')
where id
is the identifier associated with sym
in t'
. If sym
already was in t
then t'
=t
and id
is the identifier which it was associated with. Otherwise, a new identifier is generated and the new association is stored in t'
.
pp f t
pretty prints the table t
on the formatter f
fold f table a
returns f id1 sym1 (f id2 sym2 ( ... ( f idN symN a) ... ))
where the (id,sym)
pairs are the ones that are stored in the table table
. The order of these key-value pairs in the table is unspecified.