package alba

  1. Overview
  2. Docs
Alba compiler

Install

Dune Dependency

Authors

Maintainers

Sources

0.4.3.tar.gz
sha256=062f33c55ef39706c4290dff67d5a00bf009051fd757f9352be527f629ae21fc
md5=eb4edc4d6b7e15b83d6397bd34994153

doc/alba.core/Alba_core/Gamma_algo/Make/index.html

Module Gamma_algo.MakeSource

Parameters

module Gamma : GAMMA

Signature

Sourceval type_of_term : Term.t -> Gamma.t -> Term.typ

type_of_term term gamma

Compute the type of term

Precondition: term must be welltyped and the context valid.

Sourceval split_type : Term.typ -> Gamma.t -> (Term.Pi_info.t * Term.typ) list * Term.typ
Sourceval split_kind : Term.typ -> Gamma.t -> ((Term.Pi_info.t * Term.typ) list * Term.Sort.t) option

split_kind k gamma:

Compute the arguments and the sort of the kind k. If typ does not reduce to a kind, then return None.

Precondition: k must be welltyped and the context gamma must be valid.

A kind has the form

all (x: A) (y: B) .... : s

where s is a sort.

Sourceval sort_of_kind : Term.typ -> Gamma.t -> Term.Sort.t option

sort_of_kind typ gamma

Compute the sort of the kind typ. If typ does not reduce to a kind, then return None.

Precondition: typ must be welltyped and the context gamma must be valid.

A kind has the form

all (x: A) (y: B) .... : s

where s is a sort.

Sourceval is_kind : Term.typ -> Gamma.t -> bool

is_kind typ gamma

Is the welltyped term typ in the valid context gamma a kind?

Sourceval key_split : Term.t -> Gamma.t -> Term.t * (Term.t * Term.Application_info.t) list
Sourceval key_normal : Term.t -> Gamma.t -> Term.t

keynormal term gamma

Compute the key normal form of the welltyped term term in the valid context gamma.

Sourceval normalize_pi : Term.typ -> Gamma.t -> Term.typ

normalize_pi typ gamma

Precondition:

typ must be a valid type

Result: typ is expanded until the form

    all (a: A) (b: B) ... : R

is reached where R cannot be expanded further into a product type.

Sourceval normalize : Term.t -> Gamma.t -> Term.t

normalize term gamma

Compute the normal form of the welltyped term term in the valid context gamma.

Sourceval check_naming_convention : string -> Term.typ -> Gamma.t -> (unit, name_violation) result
OCaml

Innovation. Community. Security.