package soteria

  1. Overview
  2. Docs
Soteria is a toolkit for writing symbolic bug-finding tools

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.0.tar.gz
md5=8f15271b81e34caa12a39e3b7a63313a
sha512=5f6987cf362bc06402d9bed324c7b060384d7ef02479e2a614ca4b4122cc65082f6afc892c398c6562b0eb42fc13d6cc77e76c2518221590576215aaa00ee5bd

doc/soteria/Soteria/Logs/Config/index.html

Module Logs.Config

type log_kind =
  1. | Stderr
  2. | Html

The forms of logging currently supported by Soteria.

type t = {
  1. level : Level.t option;
    (*

    The current level of logging, None if disabled.

    *)
  2. kind : log_kind;
    (*

    The kind of logging to use.

    *)
  3. always_log_smt : bool;
    (*

    Whether to always log SMT queries, even when the level is above Level.t.Smt.

    *)
  4. no_color : bool;
    (*

    Whether to disable colors in stderr logging.

    *)
  5. hide_unstable : bool;
    (*

    Whether to hide unstable values like durations (e.g. for diffing purposes).

    *)
}
type cli
val make : ?level:Level.t option -> ?kind:log_kind -> ?always_log_smt:bool -> ?no_color:bool -> ?hide_unstable:bool -> unit -> t
val cmdliner_term : unit -> cli Cmdliner.Term.t

A Cmdliner term for parsing cli arguments and obtain a Config.t.

val set_and_lock : t -> unit

Bypass CLI parsing, and manually set the configuration.

val check_set_and_lock : cli -> unit

Receives a CLI input configuration (obtained from parsing the Cli arguments using Soteria.Logs.Config.cmdliner_term), checks that parsing went correctly, sets the contained configuration as global configuartion, and locks the configuration to prevent the configuration to be modified during execution.

val with_interject : interject:((unit -> unit) -> unit) -> (unit -> 'a) -> 'a

with_interject ~interject f runs f while using interject as function to interact with Stderr.

This is mostly used to define Soteria.Terminal.Progress_bar.run, which requires interjecting while printing a progress bar to the terminal. Users of Soteria should probably use Soteria.Terminal.Progress_bar directly, and ignore this function.