123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196(* This file is free software, part of Archsat. See file "LICENSE" for more details. *)(** Solver State
This module defines various interfaces for states used in main loops of solvers
(or other binaries) using dolmen. *)(** {1 Useful type aliases} *)typesource=[|`Stdin|`Fileofstring|`Rawofstring*string]typephase=[|`Parsing|`Include|`Typing|`Solving]typemode=[|`Full|`Incremental](** {1 Signatures} *)(** This modules defines the smallest signatures for a solver state that allow
to instantiate the {Pipeline.Make} functor. *)moduletypePipeline=sigtypet(** The type of values recording options for the current run. *)valtime_limit:t->float(** The time limit for one original statement (in seconds). *)valsize_limit:t->float(** The size limit for one original statement (in octets). *)end(** This modules defines the smallest signatures for a solver state that allow
to instantiate the {Parser.Pipe} functor. *)moduletypeParser_pipe=sigtypet(** The type of state *)typeterm(** The type of solver terms. *)valwarn:?loc:Dolmen.Std.Loc.full->t->('a,Format.formatter,unit,t)format4->'a(** Emit a warning *)valinput_file_loc:t->Dolmen.Std.Loc.file(** CUrrent input file location meta-data. *)valset_input_file_loc:t->Dolmen.Std.Loc.file->t(** Set the input file location meta-data. *)valstart:phase->unit(** Hook at the start of a phase *)valstop:phase->unit(** Hook at the end of a phase *)valprelude:t->string(** Some prelude to print at the begining of lines when in interactive mode. *)valis_interactive:t->bool(** Whether we are running in interactive mode. *)valset_mode:t->mode->t(* Set the input mode. *)valset_lang:t->Logic.language->t(** Set the input language. *)valinput_mode:t->modeoption(** Return the current mode (if any). *)valinput_lang:t->Logic.languageoption(** Return the input language (if any). *)valinput_dir:t->string(** Return the directory of the input source (e.g. the directory of the
input file, or the current directory if in interactive mode). *)valinput_source:t->source(** Return the input source. *)valfile_not_found:loc:Dolmen.Std.Loc.full->dir:string->file:string->'a(** Callback for when a file specified by the input source is not found. *)end(** This modules defines the smallest signatures for a solver state that allow
to instantiate the {Typer.Make} functor. *)moduletypeTyper=sigtypety_state(** The type of state used by the typer. *)typet(** The type for the global state. *)valwarn:?loc:Dolmen.Std.Loc.full->t->('a,Format.formatter,unit,t)format4->'a(** Emit a warning *)valinput_file_loc:t->Dolmen.Std.Loc.file(** CUrrent input file location meta-data. *)valinput_lang:t->Logic.languageoption(** The current input language. *)valtypecheck:t->bool(** Whether to type-check expressions. *)valstrict_typing:t->bool(** Whether to be strict about typing warnings/errors *)valty_state:t->ty_state(** Returns the typing state associated. *)valset_ty_state:t->ty_state->t(** Set the typing state. *)end(** This modules defines the smallest signatures for a solver state that allow
to instantiate the {Typer.Pipe} functor. *)moduletypeTyper_pipe=sigtypet(** The type of state *)valinput_lang:t->Logic.languageoption(** Return the input language (if any). *)end(** This modules defines the smallest signatures for a solver state that allow
to instantiate the {Headers.Pipe} functor. *)moduletypeHeader_pipe=sigtypet(** The type of state *)typeheader_state(** The type of state used for the header check*)valwarn:?loc:Dolmen.Std.Loc.full->t->('a,Format.formatter,unit,t)format4->'a(** Emit an error. *)valerror:?code:Code.t->?loc:Dolmen.Std.Loc.full->t->('a,Format.formatter,unit,t)format4->'a(** Emit an error. *)valinput_file_loc:t->Dolmen.Std.Loc.file(** CUrrent input file location meta-data. *)valinput_lang:t->Logic.languageoption(** Return the input language (if any). *)valheader_state:t->header_state(** Get the header-check state. *)valset_header_state:t->header_state->t(** Set the header-check state. *)valcheck_headers:t->bool(** Whether to check the headers. *)valallowed_licenses:t->stringlist(** Licenses allowed. An empty list means all licenses are allowed. *)valallowed_lang_version:t->stringoption(** Language version number allowed. [None] means allowing everything. *)end