package lambdapi

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

Install

Dune Dependency

Authors

Maintainers

Sources

lambdapi-2.4.1.tbz
sha256=221dff97ab245c49b7e6480fa2a3a331ab70eb86dd5d521e2c73151029bbb787
sha512=a39961bb7f04f739660a98a52981d4793709619cd21310ca6982ba78af81ef09e01c7517ee3b8b2687b09f7d2614d878c1d69494ca6ab8ef8205d240c216ce8a

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.