package acgtk

  1. Overview
  2. Docs
Abstract Categorial Grammar development toolkit

Install

dune-project
 Dependency

Authors

Maintainers

Sources

acg-2.2.0-20251107.tar.gz
sha512=07f391d052090bb70c10ec511fdc53af764954cbe1c30093778984c5ed41a4327573fdac0890c6fd619ff9827725572eb7b8a7545bd8ccb7f5bddb84d2d7f7cc

doc/acgtk.datalogLib/DatalogLib/Datalog_AbstractSyntax/ConstGen/Table/index.html

Module ConstGen.TableSource

Table implements correspondance tables with the current identifiers

Sourcetype identifier = id

identifier is the type of the identifier stored in the table. It is meant to be associated with a string

Sourcetype table

The type of the table

Sourceval empty : table

empty is an empty table

Sourceval find_id_of_sym : string -> table -> identifier option

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.

Sourceval find_sym_from_id : identifier -> table -> string

find_sym_from_id id t returns the string (i.e. the symbol) corresponding to the identifier id in table t.

Sourceval add_sym : string -> table -> identifier * table

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'.

Sourceval pp : Format.formatter -> table -> unit

pp f t pretty prints the table t on the formatter f

Sourceval fold : (identifier -> string -> 'a -> 'a) -> table -> 'a -> 'a

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.