package smtml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file solver_mode.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(* SPDX-License-Identifier: MIT *)
(* Copyright (C) 2023-2024 formalsec *)
(* Written by the Smtml programmers *)

type t =
  | Batch
  | Cached
  | Incremental

let pp fmt = function
  | Batch -> Fmt.string fmt "batch"
  | Cached -> Fmt.string fmt "cached"
  | Incremental -> Fmt.string fmt "incremental"

let of_string = function
  | "batch" -> Ok Batch
  | "cached" -> Ok Cached
  | "incremental" -> Ok Incremental
  | _mode -> Error (`Msg (Fmt.str "unknown prover mode"))

let conv = Cmdliner.Arg.conv (of_string, pp)
OCaml

Innovation. Community. Security.