Module LustreIdent
Lustre identifier
An identifier is a string with a (possibly empty) list of integer indexes.
This module also provides some pre-defined identifiers that are used in the translation.
- author
- Christoph Sticksel
type t
= private Ident.t * int list
An identifier is a string with integer indexes
val hash : t -> int
Hash an identifier
Constructors and Converters
val string_of_ident : bool -> t -> string
Return a string representation of the identifier
string_of_ident safe ident
returns the identifier with the indexes appended in[
and]
ifsafe
isfalse
. Otherwise the indexes are appended separated by_
, which makes the string a valid Lustre identifier.
val mk_string_ident : string -> t
Construct an identifier of a string
val to_scope : t -> Scope.t
Return a scope of an identifier
The indexes of the identifier become separate scope levels.
val pp_print_ident : bool -> Stdlib.Format.formatter -> t -> unit
Pretty-print an identifier
pp_print_ident safe ident
prints the indexes separated by_
ifsafe
istrue
as instring_of_ident
.
Reserved Identifiers
val reserved_scope : Scope.t
Scope for reserved identifiers
val user_scope : Scope.t
Scope for identifiers in user input
val abs_ident : t
Identifier for abstracted variables
val oracle_ident : t
Identifier for oracle inputs
val instance_ident : t
Identifier for unique identifier for node instance
val init_flag_ident : t
Identifier for first instant flag
val inst_ident : t
Identifier for instantiated variables in node calls
val index_ident : t
Identifier for index variables in arrays