package libsail

  1. Overview
  2. Docs
Sail is a language for describing the instruction semantics of processors

Install

dune-project
 Dependency

Authors

Maintainers

Sources

sail-0.20.3.tbz
sha256=0b223ed83f521ad87eaacd88186390fbaf0b944f63c6a04a3ebdf96a1ff5a60c
sha512=83298218175c7a9ff7f0a304021287a2b9c20523cb16e1b8bf0ede81fa8e256a32b309626bc1553a5b46d68e44821524c27a5de0fb2f2d7f013025f61ce76519

doc/libsail/Libsail/Specialize/index.html

Module Libsail.SpecializeSource

Rewrites for removing polymorphism from specifications

Sourceval opt_ddump_spec_ast : (string * int) option ref
Sourcetype specialization
Sourceval typ_specialization : specialization

Only specialize Type- kinded polymorphism.

Sourceval int_specialization : specialization

(experimental) specialise Int-kinded definitions

Sourceval int_specialization_with_externs : specialization

(experimental) specialise Int-kinded definitions, including externs

Sourceval polymorphic_functions : specialization -> ('a, 'b) Ast.def list -> Ast_compare.IdSet.t

Returns an IdSet with the function ids that have X-kinded parameters, e.g. val f : forall ('a : X). 'a -> 'a. The first argument specifies what X should be - it should be one of: is_int_kopt, is_order_kopt, or is_typ_kopt from Ast_util, or some combination of those.

Sourceval add_initial_calls : Ast_compare.IdSet.t -> unit
Sourceval get_initial_calls : unit -> Ast.id list

specialize returns an AST with all the Order and Type polymorphism removed, as well as the environment produced by type checking that AST with Type_check.initial_env. The env parameter is the environment to return if there is no polymorphism to remove, in which case specialize returns the AST unmodified.

specialize' n performs at most n specialization passes. Useful for int_specialization which is not guaranteed to terminate.

return all instantiations of a function id, with the instantiations filtered according to the specialization.

Sourceval string_of_instantiation : Ast.typ_arg Ast_compare.KBindings.t -> string