package lilis

  1. Overview
  2. Docs

The symbolic environment is the dictionary to compress and decompress streams.

type t

A string <-> int mapping, used by the compression functions.

val extract : string stream -> (string * 'b) rule list -> 'c rule list -> t

Create a symbol environment from an axiom and a bunch of rules.

val add_rule : t -> (string * 'a) rule -> t

Add symbols from a rule to a symbolic environment.

val add_post_rule : t -> 'a rule -> t

Like add_rule but allow polymorphic rules. Ignore the right-hand side of the rule.

val add_axiom : t -> string stream -> t

Add symbols from an axiom to symbolic environment.