Utility modules used throughout SWAL for logging, wall-clock profiling, statistics collection, and sequence enumeration.
Utils.Profiler — Wall-clock profiler with five named phases: TeacherMem, TeacherEq, LearnerEnc, LearnerSolve, Misc. Use Utils.Profiler.on to scope a computation to a phase. Call Utils.Profiler.lap at the end of each learning round to snapshot and reset the counters.Utils.Odometer — Mixed-radix counter for enumerating all length-n sequences over a domain. Used by the teacher's BFS over Σ*.Utils.Logger — Thin wrapper around Dolog adding color-coded level prefixes and timestamps. Each component creates its own logger via Logger.Make(struct let name = "Component" end). Logger.fatal logs then calls Stdlib.exit 1.Utils.Time — Wall-clock timestamp (Unix.tm) with ISO-8601 formatting. Used by Utils.Logger and serialized into the output JSON.