module Looping:Looping interface.sig
..end
Handling looping is similar at various scales in the data structures: literals, indexes, schemata, blocks. Hence the following interface.
ex. of looping schemata: /\i=1..n-1 P_i loops on /\i=1..n P_i (i.e. they are equivalent up to n).
The notion extends similarly to blocks.
The current implementation finally uses classical data structures for handling sets of data. The original difficulty with classical data structures is that those allow to find data which is equal to another data in a set whereas we do not want equality but equality up to an equivalence. The first implementations implemented this equivalence hard-wired and usual data structures could not be used. Now we just put every inserted data in a normal form so that we can easily use classical data structures. So the interface is now just a particular subset of usual operations on classical data structures.
The final data structure is a particular kind of trie. So every sub-data involved in a block (schema, literal, index) has to provide a way of mapping its objects to other data. Those maps are used to construct the children of a node in the trie.
Author(s): Vincent Aravantinos
See also
module type LoopingMap =sig
..end