An incremental algorithm to construct a lattice from a collection of sets is derived, refined, analyzed, and related to a similar previously published algorithm for constructing concept lattices. The lattice constructed by the algorithm is the one obtained by closing the collection of sets with respect to set intersection. The analysis explains the empirical efficiency of the related concept lattice construction algorithm that had been observed in previous studies. The derivation highlights the effectiveness of a correctness-byconstruction approach to algorithm development.
We describe an implementation of LDTA 2011 Tool Challenge tasks in Objective Caml language. Instead of using some dedicated domain-specific tools we utilize typical functional programming machinery such as polymorphic functions, monads and combinators; in addition we extensively use an idiom of type-driven transformers, which can be considered as a form of datatype-generic programming. Our implementation provides a good example of utilization of Objective Caml specific features such as open and implicitly defined types. As a result we provide a highly modular implementation built up of separately compiled components combined in a type-safe manner.