package goblint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b729c94adb383a39aea32eb005c988dfd44b92af22ee6a4eedf4239542ac6c26
sha512=643b98770e5fe5644324c95c9ae3a9f698f25c8b11b298f0751d524e0b20af368b2a465fc8200b75a73d48fc9a053fd90f5e8920d4db070927f93188bb8687e0
doc/goblint.common/Cilfacade/index.html
Module Cilfacade
GoblintCil utilities.
module E = GoblintCil.Errormsginclude module type of struct include Cilfacade0 end
Cilfacade functions to avoid dependency cycles.
val get_labelLoc : GoblintCil.label -> GoblintCil.locationval get_labelsLoc : GoblintCil.label list -> GoblintCil.Cil.locationFollowing functions are similar to Cil versions, but return expression location instead of entire statement location, where possible.
val eloc_fallback :
eloc:GoblintCil.location ->
loc:GoblintCil.location ->
GoblintCil.locationval get_instrLoc : GoblintCil.instr -> GoblintCil.locationGet expression location for Cil.instr.
val get_stmtLoc : GoblintCil.stmt -> GoblintCil.Cil.locationGet expression location for Cil.stmt.
val create_var : GoblintCil.varinfo -> GoblintCil.varinfoCommand for assigning an id to a varinfo. All varinfos directly created by Goblint should be modified by this method
val isCharType : GoblintCil.Cil.typ -> boolIs character type (N1570 6.2.5.15)?
val isFloatType : GoblintCil.Cil.typ -> boolval isVLAType : GoblintCil.Cil.typ -> boolval is_first_field : GoblintCil.fieldinfo -> boolval current_file : GoblintCil.file refval parse : Fpath.t -> GoblintCil.Cil.fileval print : GoblintCil.file -> unitval rmTemps : GoblintCil.Cil.file -> unitval visitors : (string * (GoblintCil.fundec -> GoblintCil.cilVisitor)) list refval register_preprocess :
string ->
(GoblintCil.fundec -> GoblintCil.cilVisitor) ->
unitval do_preprocess : GoblintCil.file -> unitval getAST : Fpath.t -> GoblintCil.Cil.fileclass addConstructors : GoblintCil.fundec list -> object ... endval getMergedAST : GoblintCil.Cil.file list -> GoblintCil.Cil.fileval callConstructors : GoblintCil.file -> GoblintCil.fileval in_section : (string -> bool) -> GoblintCil.attribute list -> boolval is_init : GoblintCil.attribute list -> boolval is_exit : GoblintCil.attribute list -> booltype startfuns =
GoblintCil.fundec list * GoblintCil.fundec list * GoblintCil.fundec listval getFuns : GoblintCil.file -> startfunsval getFirstStmt : GoblintCil.fundec -> GoblintCil.stmtval get_ikind : GoblintCil.Cil.typ -> GoblintCil.ikindval get_fkind : GoblintCil.Cil.typ -> GoblintCil.fkindval ptrdiff_ikind : unit -> GoblintCil.ikindval ptr_ikind : unit -> GoblintCil.ikindCil.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 of GoblintCil.exp * GoblintCil.typ(*typeOffset: Index on a non-array
*)| Field_NonCompound of GoblintCil.fieldinfo * GoblintCil.typ(*typeOffset: Field on a non-compound
*)
exception TypeOfError of typeOfErrorval stringLiteralType : GoblintCil.typ refval typeOfRealAndImagComponents : GoblintCil.typ -> GoblintCil.typval isComplexFKind : GoblintCil.fkind -> boolval typeOf : GoblintCil.exp -> GoblintCil.typval typeOfInit : GoblintCil.init -> GoblintCil.typval typeOfLval : GoblintCil.lval -> GoblintCil.typval typeOffset : GoblintCil.typ -> GoblintCil.offset -> GoblintCil.typval typeBlendAttributes :
GoblintCil.attributes ->
GoblintCil.typ ->
GoblintCil.typval typeSigBlendAttributes :
GoblintCil.attributes ->
GoblintCil.typsig ->
GoblintCil.typsigval mkCast : e:GoblintCil.exp -> newt:GoblintCil.typ -> GoblintCil.Cil.expCil.mkCast using our typeOf.
val get_ikind_exp : GoblintCil.exp -> GoblintCil.ikindval get_fkind_exp : GoblintCil.exp -> GoblintCil.fkindval makeBinOp :
GoblintCil.Cil.binop ->
GoblintCil.exp ->
GoblintCil.exp ->
GoblintCil.Cil.expMake Cil.BinOp with correct implicit casts inserted.
val pretty_typsig_like_typ : unit -> GoblintCil.typsig -> GoblintCil.Pretty.docPretty-print typsig like typ, because d_typsig prints with CIL constructors.
val locs : (int, unit) Hashtbl.tHashSet of line numbers
class countFnVisitor : object ... endVisitor to count locs appearing inside a fundec.
val fnvis : countFnVisitorval countLoc : GoblintCil.fundec -> intCount the number of unique locations appearing in fundec fn. Uses Cilfacade.locs hashtable for intermediate computations
val fundec_return_type : GoblintCil.fundec -> GoblintCil.typmodule 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.
module IntH : sig ... endclass stmtSidVisitor : GoblintCil.stmt IntH.t -> object ... endval stmt_sids : GoblintCil.stmt IntH.t ResettableLazy.tval pseudo_return_stmt_sids : GoblintCil.stmt IntH.tval find_stmt_sid : IntH.key -> GoblintCil.stmtFind stmt by its sid.
module FunLocH : sig ... endmodule LocSet : sig ... endContains the locations of the upjumping gotos and the respective functions * they are being called in.
val stmt_pretty_short : unit -> GoblintCil.stmt -> GoblintCil.Pretty.docval add_function_declarations : GoblintCil.Cil.file -> unitGiven a Cil.file, reorders its globals, inserts function declarations before function definitions. This function may be used after a code transformation to ensure that the order of globals yields a compilable program.