package lambdapi

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

Install

Dune Dependency

Authors

Maintainers

Sources

lambdapi-2.6.0.tbz
sha256=d01e5f13db2eaba6e4fe330667149e0059d4886c651ff9d6b672db2dfc9765ed
sha512=33b68c972aca37985ed73c527076198e7d4961c7e27c89cdabfe4d1cff97cd41ccfb85ae9499eb98ad9a0aefd920bc55555df6393fc441ac2429e4d99cddafa8

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.