package goblint-cil

  1. Overview
  2. Docs
A front-end for the C programming language that facilitates program analysis and transformation

Install

Dune Dependency

Authors

Maintainers

Sources

goblint-cil-1.8.2.tbz
sha256=f4711e3fa53c482cdef2d7ed62b287d859ce55ef8b4ddfdc6071e81034c3bc89
sha512=8a861aa04aed7684a7c86207cfd5b63503984917fe53ae4866890242cb0db38d2c4f7bd5a5565fd094da064fb290e67071bae6874377e10d2005330c71cc13a2

doc/goblint-cil/Alpha/index.html

Module Alpha

ALPHA conversion

type 'a undoAlphaElement

This is the type of the elements that are recorded by the alpha * conversion functions in order to be able to undo changes to the tables * they modify. Useful for implementing * scoping

type 'a alphaTableData

This is the type of the elements of the alpha renaming table. These * elements can carry some data associated with each occurrence of the name.

val newAlphaName : alphaTable:(string, 'a alphaTableData ref) Hashtbl.t -> undolist:'a undoAlphaElement list ref option -> lookupname:string -> data:'a -> string * 'a

Create a new name based on a given name. The new name is formed from a * prefix (obtained from the given name by stripping a suffix consisting of ___ * followed by up to 9 digits), followed by a special separator and then by a * positive integer suffix. The first argument is a table mapping name * prefixes to some data that specifies what suffixes have been used and how * to create the new one. This function updates the table with the new * largest suffix generated. The "undolist" argument, when present, will be * used by the function to record information that can be used by * Alpha.undoAlphaChanges to undo those changes. Note that the undo * information will be in reverse order in which the action occurred. Returns * the new name and, if different from the lookupname, the location of the * previous occurrence. This function knows about the location implicitly * from the Cil.currentLoc.

val registerAlphaName : alphaTable:(string, 'a alphaTableData ref) Hashtbl.t -> undolist:'a undoAlphaElement list ref option -> lookupname:string -> data:'a -> unit

Register a name with an alpha conversion table to ensure that when later * we call newAlphaName we do not end up generating this one

val docAlphaTable : unit -> (string, 'a alphaTableData ref) Hashtbl.t -> Pretty.doc

Split the name in preparation for newAlphaName. The prefix returned is used to index into the hashtable. The next result value is a separator (either empty or the separator chosen to separate the original name from the index)

val getAlphaPrefix : lookupname:string -> string
val undoAlphaChanges : alphaTable:(string, 'a alphaTableData ref) Hashtbl.t -> undolist:'a undoAlphaElement list -> unit

Undo the changes to a table

OCaml

Innovation. Community. Security.