package lambdapi

  1. Overview
  2. Docs
Proof assistant for the λΠ-calculus modulo rewriting

Install

Dune Dependency

Authors

Maintainers

Sources

lambdapi-2.5.1.tbz
sha256=2c251021b6fac40c05282ca183902da5b1008e69d9179d7a9543905c2c21a28a
sha512=69535f92766e6fedc2675fc214f0fb699bde2a06aa91d338c93c99756235a293cf16776f6328973dda07cf2ad402e58fe3104a08f1a896990c1778b42f7f9fcf

doc/src/lambdapi.core/ghost.ml.html

Source file ghost.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(** Define a ghost signature that contain symbols used by the kernel
    but not defined by the user. *)

open Timed
open Term
open Lplib
open Extra
open Common

(** The signature holding ghost symbols. *)
let sign =
  (* a path that's not in the image of the parser *)
  let path = Path.ghost "ghost" in
  let sign = { (Sign.dummy ()) with sign_path = path } in
  Sign.loaded := Path.Map.add path sign !(Sign.loaded);
  sign

(** The path of the ghost signature *)
let path = sign.sign_path

(** [mem s] returns [true] if [s] is a ghost symbol. *)
let mem s = StrMap.mem s.sym_name !(sign.sign_symbols)

(** [iter f] iters function [f] on ghost symbols. *)
let iter : (sym -> unit) -> unit = fun f ->
  StrMap.iter (fun _ s -> f s) !(sign.sign_symbols)
OCaml

Innovation. Community. Security.