package goblint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=2f4f2e25b765452f0e336941f35f6cb396d7c213a2d347abe5d35febc5159b1f
sha512=e96af4cad91f6985c8db93c194925853e96cad0ec1a0d9f4d32bbe16d3e5fa1e305f54be02839f21ba89ad2af0c2d5d7aa819ade221ce097dc4dbd0fcd8c8500
doc/goblint.lib/Goblint_lib/Cilfacade/index.html
Module Goblint_lib.Cilfacade
Helpful functions for dealing with Cil.
module GU = Goblintutilinclude module type of struct include Cilfacade0 end
Cilfacade functions to avoid dependency cycles.
Following functions are similar to Cil versions, but return expression location instead of entire statement location, where possible.
val current_file : GoblintCil.file refval parse : Fpath.t -> GoblintCil__.Cil.fileclass allBBVisitor : object ... endclass patchLabelsGotosVisitor : (GoblintCil.stmt -> GoblintCil.stmt option) -> object ... endmodule StatementHashTable : sig ... endclass copyandPatchLabelsVisitor : (GoblintCil.stmt ref * GoblintCil.stmt ref ref) -> object ... endclass loopUnrollingVisitor : object ... endval visitors : (string * (GoblintCil.fundec -> GoblintCil.cilVisitor)) list refval getAST : Fpath.t -> GoblintCil__.Cil.fileclass addConstructors : GoblintCil.fundec list -> object ... endval getFuns : GoblintCil.file -> startfunsCil.typeOf, etc reimplemented to raise sensible exceptions instead of printing all errors directly...
type typeOfError = | RealImag_NonNumerical(*unexpected non-numerical type for argument to __real__/__imag__
*)| StartOf_NonArray(*typeOf: StartOf on a non-array
*)| Mem_NonPointer of GoblintCil.exp(*typeOfLval: Mem on a non-pointer (exp)
*)| Index_NonArray(*typeOffset: Index on a non-array
*)| Field_NonCompound(*typeOffset: Field on a non-compound
*)
exception TypeOfError of typeOfErrorval stringLiteralType : GoblintCil.typ refCil.mkCast using our typeOf.
Make Cil.BinOp with correct implicit casts inserted.
val locs : (int, unit) Hashtbl.tHashSet of line numbers
class countFnVisitor : object ... endVisitor to count locs appearing inside a fundec.
val fnvis : countFnVisitorCount the number of unique locations appearing in fundec fn. Uses Cilfacade.locs hashtable for intermediate computations
module StmtH : sig ... endval stmt_fundecs : GoblintCil.fundec StmtH.t ResettableLazy.tval pseudo_return_to_fun : GoblintCil.fundec StmtH.tval find_stmt_fundec : StmtH.key -> GoblintCil.fundecFind fundec which the stmt is in.
module VarinfoH : sig ... endval varinfo_fundecs : GoblintCil.fundec VarinfoH.t ResettableLazy.tval find_varinfo_fundec : VarinfoH.key -> GoblintCil.fundecFind fundec by the function's varinfo (has the function name and type).
module StringH : sig ... endval name_fundecs : GoblintCil.fundec StringH.t ResettableLazy.tval find_name_fundec : StringH.key -> GoblintCil.fundecFind fundec by the function's name.
val varinfo_roles : varinfo_role VarinfoH.t ResettableLazy.tval find_varinfo_role : VarinfoH.key -> varinfo_roleFind the role of the varinfo.
val is_varinfo_formal : VarinfoH.key -> boolval find_scope_fundec : VarinfoH.key -> GoblintCil.fundec optionFind the scope of the varinfo. If varinfo is a local or a formal argument of fundec, then returns Some fundec. If varinfo is a global or a function itself, then returns None.
val original_names : string VarinfoH.t ResettableLazy.tval find_original_name : VarinfoH.key -> string optionFind the original name (in input source code) of the varinfo. If it was renamed by CIL, then returns the original name before renaming. If it wasn't renamed by CIL, then returns the same name. If it was inserted by CIL (or Goblint), then returns None.