From 96c50da8a990b4777ef56e033e9816fd26766e0e Mon Sep 17 00:00:00 2001 From: sim642 Date: Wed, 2 Oct 2024 08:39:28 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20goblint/?= =?UTF-8?q?cil@98095b42267618b8b2583890c9ef88fdd03e06a7=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/goblint-cil/Dataslicing/index.html | 2 +- api/goblint-cil/GoblintCil/Alpha/index.html | 2 +- api/goblint-cil/GoblintCil/Cabs/index.html | 2 +- api/goblint-cil/GoblintCil/Cabs2cil/index.html | 2 +- api/goblint-cil/GoblintCil/Cabshelper/index.html | 2 +- .../GoblintCil/Cabsvisit/class-nopCabsVisitor/index.html | 2 +- .../GoblintCil/Cabsvisit/class-type-cabsVisitor/index.html | 2 +- api/goblint-cil/GoblintCil/Cabsvisit/index.html | 2 +- api/goblint-cil/GoblintCil/Cfg/index.html | 2 +- api/goblint-cil/GoblintCil/Check/index.html | 2 +- .../GoblintCil/Cil/class-defaultCilPrinterClass/index.html | 2 +- .../Cil/class-descriptiveCilPrinterClass/index.html | 2 +- api/goblint-cil/GoblintCil/Cil/class-nopCilVisitor/index.html | 2 +- .../GoblintCil/Cil/class-plainCilPrinterClass/index.html | 2 +- .../GoblintCil/Cil/class-type-cilPrinter/index.html | 2 +- .../GoblintCil/Cil/class-type-cilVisitor/index.html | 2 +- .../Cil/class-type-descriptiveCilPrinter/index.html | 2 +- api/goblint-cil/GoblintCil/Cil/index.html | 2 +- api/goblint-cil/GoblintCil/Cilint/index.html | 2 +- api/goblint-cil/GoblintCil/Cillower/index.html | 2 +- .../GoblintCil/Ciltools/class-attribute_checker/index.html | 2 +- .../GoblintCil/Ciltools/class-callBBVisitor/index.html | 2 +- .../GoblintCil/Ciltools/class-sidVisitor/index.html | 2 +- .../GoblintCil/Ciltools/class-vidVisitor/index.html | 2 +- api/goblint-cil/GoblintCil/Ciltools/index.html | 2 +- api/goblint-cil/GoblintCil/Cilutil/index.html | 2 +- api/goblint-cil/GoblintCil/Cprint/index.html | 2 +- .../Dataflow/BackwardsDataFlow/argument-1-T/index.html | 2 +- .../GoblintCil/Dataflow/BackwardsDataFlow/index.html | 2 +- .../Dataflow/ForwardsDataFlow/argument-1-T/index.html | 2 +- .../GoblintCil/Dataflow/ForwardsDataFlow/index.html | 2 +- api/goblint-cil/GoblintCil/Dataflow/index.html | 2 +- .../Dataflow/module-type-BackwardsTransfer/index.html | 2 +- .../Dataflow/module-type-ForwardsTransfer/index.html | 2 +- api/goblint-cil/GoblintCil/Dominators/index.html | 2 +- api/goblint-cil/GoblintCil/Errormsg/index.html | 2 +- api/goblint-cil/GoblintCil/Escape/index.html | 2 +- .../Expcompare/class-volatileFinderClass/index.html | 2 +- api/goblint-cil/GoblintCil/Expcompare/index.html | 2 +- api/goblint-cil/GoblintCil/Feature/index.html | 2 +- api/goblint-cil/GoblintCil/Formatcil/index.html | 2 +- api/goblint-cil/GoblintCil/Frontc/index.html | 2 +- api/goblint-cil/GoblintCil/GrowArray/index.html | 2 +- api/goblint-cil/GoblintCil/Inthash/index.html | 2 +- api/goblint-cil/GoblintCil/Machdep/index.html | 2 +- api/goblint-cil/GoblintCil/Machdepenv/index.html | 2 +- api/goblint-cil/GoblintCil/Mergecil/index.html | 2 +- api/goblint-cil/GoblintCil/Patch/index.html | 2 +- .../Pretty/MakeMapPrinter/argument-1-Map/index.html | 2 +- api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/index.html | 2 +- .../Pretty/MakeSetPrinter/argument-1-Set/index.html | 2 +- api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/index.html | 2 +- api/goblint-cil/GoblintCil/Pretty/index.html | 2 +- api/goblint-cil/GoblintCil/RmUnused/index.html | 2 +- api/goblint-cil/GoblintCil/Stats/index.html | 2 +- api/goblint-cil/GoblintCil/Trace/index.html | 2 +- api/goblint-cil/GoblintCil/Util/index.html | 2 +- api/goblint-cil/GoblintCil/Whitetrack/index.html | 2 +- .../GoblintCil/class-defaultCilPrinterClass/index.html | 2 +- .../GoblintCil/class-descriptiveCilPrinterClass/index.html | 2 +- api/goblint-cil/GoblintCil/class-nopCilVisitor/index.html | 2 +- .../GoblintCil/class-plainCilPrinterClass/index.html | 2 +- api/goblint-cil/GoblintCil/class-type-cilPrinter/index.html | 2 +- api/goblint-cil/GoblintCil/class-type-cilVisitor/index.html | 2 +- .../GoblintCil/class-type-descriptiveCilPrinter/index.html | 2 +- api/goblint-cil/GoblintCil/index.html | 2 +- api/goblint-cil/Liveness/L/index.html | 2 +- api/goblint-cil/Liveness/LiveFlow/index.html | 2 +- api/goblint-cil/Liveness/Usedef/VS/index.html | 2 +- .../Liveness/Usedef/class-useDefVisitorClass/index.html | 2 +- api/goblint-cil/Liveness/Usedef/index.html | 2 +- .../Liveness/class-deadnessVisitorClass/index.html | 2 +- api/goblint-cil/Liveness/class-doFeatureClass/index.html | 2 +- .../Liveness/class-livenessVisitorClass/index.html | 2 +- api/goblint-cil/Liveness/class-nullAdderClass/index.html | 2 +- api/goblint-cil/Liveness/index.html | 2 +- .../Makecfg/MakeCFG/class-callBBVisitor/index.html | 2 +- api/goblint-cil/Makecfg/MakeCFG/class-vidVisitor/index.html | 2 +- api/goblint-cil/Makecfg/MakeCFG/index.html | 2 +- api/goblint-cil/Makecfg/index.html | 2 +- api/goblint-cil/Ptranal/index.html | 2 +- api/goblint-cil/Syntacticsearch/CodeQuery/index.html | 2 +- api/goblint-cil/Syntacticsearch/FuncDatatype/index.html | 2 +- .../FuncFunction/class-find_calls_usesvar_with_tmp/index.html | 2 +- .../FuncFunction/class-find_calls_with_tmp/index.html | 2 +- .../FuncFunction/class-fun_find_returns/index.html | 2 +- .../FuncFunction/class-fun_find_sig/index.html | 2 +- .../FuncFunction/class-fun_find_uses/index.html | 2 +- .../FuncFunction/class-fun_find_uses_in_fun/index.html | 2 +- .../FuncFunction/class-fun_find_usesvar_in_fun/index.html | 2 +- api/goblint-cil/Syntacticsearch/FuncFunction/index.html | 2 +- .../FuncVar/class-var_find_def_in_fun/index.html | 2 +- .../FuncVar/class-var_search_in_expr/index.html | 2 +- api/goblint-cil/Syntacticsearch/FuncVar/index.html | 2 +- api/goblint-cil/Syntacticsearch/QueryMapping/index.html | 2 +- api/goblint-cil/Syntacticsearch/ResultPrinter/index.html | 2 +- api/goblint-cil/Syntacticsearch/index.html | 2 +- api/goblint-cil/Zrapp/class-zraCilPrinterClass/index.html | 2 +- api/goblint-cil/Zrapp/index.html | 2 +- api/goblint-cil/index.html | 2 +- api/index.html | 2 +- api/odoc.support/odoc.css | 2 +- examples/ex1.txt | 2 +- examples/ex10.txt | 2 +- examples/ex11.txt | 2 +- examples/ex12.txt | 2 +- examples/ex13.txt | 2 +- examples/ex14.txt | 2 +- examples/ex15.txt | 2 +- examples/ex16.txt | 2 +- examples/ex17.txt | 2 +- examples/ex18.txt | 2 +- examples/ex19.txt | 2 +- examples/ex2.txt | 2 +- examples/ex20.txt | 2 +- examples/ex21.txt | 2 +- examples/ex22.txt | 2 +- examples/ex23.txt | 2 +- examples/ex3.txt | 2 +- examples/ex4.txt | 2 +- examples/ex5.txt | 2 +- examples/ex6.txt | 2 +- examples/ex7.txt | 2 +- examples/ex8.txt | 2 +- examples/ex9.txt | 2 +- header.html | 4 ++-- index.html | 2 +- 127 files changed, 128 insertions(+), 128 deletions(-) diff --git a/api/goblint-cil/Dataslicing/index.html b/api/goblint-cil/Dataslicing/index.html index b78fc90ed..f367435db 100644 --- a/api/goblint-cil/Dataslicing/index.html +++ b/api/goblint-cil/Dataslicing/index.html @@ -1,2 +1,2 @@ -Dataslicing (goblint-cil.Dataslicing)

Module Dataslicing

val feature : GoblintCil.Feature.t
+Dataslicing (goblint-cil.Dataslicing)

Module Dataslicing

val feature : GoblintCil.Feature.t
diff --git a/api/goblint-cil/GoblintCil/Alpha/index.html b/api/goblint-cil/GoblintCil/Alpha/index.html index 6c694ce9d..4291985d7 100644 --- a/api/goblint-cil/GoblintCil/Alpha/index.html +++ b/api/goblint-cil/GoblintCil/Alpha/index.html @@ -1,5 +1,5 @@ -Alpha (goblint-cil.GoblintCil.Alpha)

Module GoblintCil.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 : +Alpha (goblint-cil.GoblintCil.Alpha)

Module GoblintCil.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 Stdlib.ref) Stdlib.Hashtbl.t -> undolist:'a undoAlphaElement list Stdlib.ref option -> lookupname:string -> diff --git a/api/goblint-cil/GoblintCil/Cabs/index.html b/api/goblint-cil/GoblintCil/Cabs/index.html index 27e56fdbc..2946223d3 100644 --- a/api/goblint-cil/GoblintCil/Cabs/index.html +++ b/api/goblint-cil/GoblintCil/Cabs/index.html @@ -1,2 +1,2 @@ -Cabs (goblint-cil.GoblintCil.Cabs)

Module GoblintCil.Cabs

This file was originally part of Hugues Casee's frontc 2.0, and has been extensively changed since. ** ** 1.0 3.22.99 Hugues Cassé First version. ** 2.0 George Necula 12/12/00: Many extensions *

type cabsloc = {
  1. lineno : int;
  2. filename : string;
  3. byteno : int;
  4. columnno : int;
  5. ident : int;
  6. endLineno : int;
  7. endByteno : int;
  8. endColumnno : int;
}
type typeSpecifier =
  1. | Tvoid
  2. | Tchar
  3. | Tbool
  4. | Tshort
  5. | Tint
  6. | Tlong
  7. | Tint64
  8. | Tint128
  9. | Tfloat
  10. | Tfloat32
  11. | Tfloat64
  12. | Tfloat128
  13. | Tfloat32x
  14. | Tfloat64x
  15. | Tdouble
  16. | Tsigned
  17. | Tsizet
  18. | Tunsigned
  19. | Tnamed of string
  20. | Tstruct of string * field_group list option * attribute list
  21. | Tunion of string * field_group list option * attribute list
  22. | Tenum of string * enum_item list option * attribute list
  23. | TtypeofE of expression
  24. | TtypeofT of specifier * decl_type
  25. | Tdefault
    (*

    "default" in generic associations

    *)
  26. | Tauto
    (*

    GCC __auto_type

    *)
and storage =
  1. | NO_STORAGE
  2. | AUTO
  3. | STATIC
  4. | EXTERN
  5. | REGISTER
and funspec =
  1. | INLINE
  2. | VIRTUAL
  3. | EXPLICIT
and cvspec =
  1. | CV_CONST
  2. | CV_VOLATILE
  3. | CV_RESTRICT
  4. | CV_COMPLEX
  5. | CV_ATOMIC
and spec_elem =
  1. | SpecTypedef
  2. | SpecCV of cvspec
  3. | SpecAttr of attribute
  4. | SpecStorage of storage
  5. | SpecInline
  6. | SpecNoreturn
  7. | SpecType of typeSpecifier
  8. | SpecPattern of string
and specifier = spec_elem list
and decl_type =
  1. | JUSTBASE
  2. | PARENTYPE of attribute list * decl_type * attribute list
  3. | ARRAY of decl_type * attribute list * expression
  4. | PTR of attribute list * decl_type
  5. | PROTO of decl_type * single_name list * bool
and name_group = specifier * name list
and field_group = specifier * (name * expression option) list
and init_name_group = specifier * init_name list
and name = string * decl_type * attribute list * cabsloc
and init_name = name * init_expression
and single_name = specifier * name
and enum_item = string * attribute list * expression * cabsloc
and definition =
  1. | FUNDEF of single_name * block * cabsloc * cabsloc
  2. | DECDEF of init_name_group * cabsloc
  3. | TYPEDEF of name_group * cabsloc
  4. | ONLYTYPEDEF of specifier * cabsloc
  5. | GLOBASM of string * cabsloc
  6. | PRAGMA of expression * cabsloc
  7. | LINKAGE of string * cabsloc * definition list
  8. | TRANSFORMER of definition * definition list * cabsloc
  9. | EXPRTRANSFORMER of expression * expression * cabsloc
  10. | STATIC_ASSERT of expression * string * cabsloc
and file = string * definition list
and block = {
  1. blabels : string list;
  2. battrs : attribute list;
  3. bstmts : statement list;
}
and asm_details = {
  1. aoutputs : (string option * string * expression) list;
  2. ainputs : (string option * string * expression) list;
  3. aclobbers : string list;
}
and statement =
  1. | NOP of cabsloc
  2. | COMPUTATION of expression * cabsloc
  3. | BLOCK of block * cabsloc
  4. | SEQUENCE of statement * statement * cabsloc
  5. | IF of expression * statement * statement * cabsloc * cabsloc
  6. | WHILE of expression * statement * cabsloc * cabsloc
  7. | DOWHILE of expression * statement * cabsloc * cabsloc
  8. | FOR of for_clause * expression * expression * statement * cabsloc * cabsloc
  9. | BREAK of cabsloc
  10. | CONTINUE of cabsloc
  11. | RETURN of expression * cabsloc * cabsloc
  12. | SWITCH of expression * statement * cabsloc * cabsloc
  13. | CASE of expression * statement * cabsloc * cabsloc
  14. | CASERANGE of expression * expression * statement * cabsloc * cabsloc
  15. | DEFAULT of statement * cabsloc * cabsloc
  16. | LABEL of string * statement * cabsloc
  17. | GOTO of string * cabsloc
  18. | COMPGOTO of expression * cabsloc
  19. | DEFINITION of definition
  20. | ASM of attribute list * string list * asm_details option * cabsloc
and for_clause =
  1. | FC_EXP of expression
  2. | FC_DECL of definition
and binary_operator =
  1. | ADD
  2. | SUB
  3. | MUL
  4. | DIV
  5. | MOD
  6. | AND
  7. | OR
  8. | BAND
  9. | BOR
  10. | XOR
  11. | SHL
  12. | SHR
  13. | EQ
  14. | NE
  15. | LT
  16. | GT
  17. | LE
  18. | GE
  19. | ASSIGN
  20. | ADD_ASSIGN
  21. | SUB_ASSIGN
  22. | MUL_ASSIGN
  23. | DIV_ASSIGN
  24. | MOD_ASSIGN
  25. | BAND_ASSIGN
  26. | BOR_ASSIGN
  27. | XOR_ASSIGN
  28. | SHL_ASSIGN
  29. | SHR_ASSIGN
and unary_operator =
  1. | MINUS
  2. | PLUS
  3. | NOT
  4. | BNOT
  5. | MEMOF
  6. | ADDROF
  7. | PREINCR
  8. | PREDECR
  9. | POSINCR
  10. | POSDECR
and expression =
  1. | NOTHING
  2. | UNARY of unary_operator * expression
  3. | LABELADDR of string
  4. | BINARY of binary_operator * expression * expression
  5. | QUESTION of expression * expression * expression
  6. | CAST of specifier * decl_type * init_expression
  7. | CALL of expression * expression list
  8. | COMMA of expression list
  9. | CONSTANT of constant
  10. | PAREN of expression
  11. | VARIABLE of string
  12. | REAL of expression
  13. | IMAG of expression
  14. | CLASSIFYTYPE of expression
  15. | EXPR_SIZEOF of expression
  16. | TYPE_SIZEOF of specifier * decl_type
  17. | EXPR_ALIGNOF of expression
  18. | TYPE_ALIGNOF of specifier * decl_type
  19. | INDEX of expression * expression
  20. | MEMBEROF of expression * string
  21. | MEMBEROFPTR of expression * string
  22. | GNU_BODY of block
  23. | EXPR_PATTERN of string
  24. | GENERIC of expression * ((specifier * decl_type) * expression) list
and constant =
  1. | CONST_INT of string
  2. | CONST_FLOAT of string
  3. | CONST_COMPLEX of string
  4. | CONST_CHAR of int64 list
  5. | CONST_WCHAR of int64 list * wchar_type
  6. | CONST_STRING of string * encoding
  7. | CONST_WSTRING of int64 list * wchar_type
and wchar_type =
  1. | WCHAR_T
  2. | CHAR16_T
  3. | CHAR32_T
  4. | CHAR
  5. | CHAR_UTF8
and encoding =
  1. | NO_ENCODING
  2. | UTF8
and init_expression =
  1. | NO_INIT
  2. | SINGLE_INIT of expression
  3. | COMPOUND_INIT of (initwhat * init_expression) list
and initwhat =
  1. | NEXT_INIT
  2. | INFIELD_INIT of string * initwhat
  3. | ATINDEX_INIT of expression * initwhat
  4. | ATINDEXRANGE_INIT of expression * expression
and attribute = string * expression list
+Cabs (goblint-cil.GoblintCil.Cabs)

Module GoblintCil.Cabs

This file was originally part of Hugues Casee's frontc 2.0, and has been extensively changed since. ** ** 1.0 3.22.99 Hugues Cassé First version. ** 2.0 George Necula 12/12/00: Many extensions *

type cabsloc = {
  1. lineno : int;
  2. filename : string;
  3. byteno : int;
  4. columnno : int;
  5. ident : int;
  6. endLineno : int;
  7. endByteno : int;
  8. endColumnno : int;
}
type typeSpecifier =
  1. | Tvoid
  2. | Tchar
  3. | Tbool
  4. | Tshort
  5. | Tint
  6. | Tlong
  7. | Tint64
  8. | Tint128
  9. | Tfloat
  10. | Tfloat32
  11. | Tfloat64
  12. | Tfloat128
  13. | Tfloat32x
  14. | Tfloat64x
  15. | Tdouble
  16. | Tsigned
  17. | Tsizet
  18. | Tunsigned
  19. | Tnamed of string
  20. | Tstruct of string * field_group list option * attribute list
  21. | Tunion of string * field_group list option * attribute list
  22. | Tenum of string * enum_item list option * attribute list
  23. | TtypeofE of expression
  24. | TtypeofT of specifier * decl_type
  25. | Tdefault
    (*

    "default" in generic associations

    *)
  26. | Tauto
    (*

    GCC __auto_type

    *)
and storage =
  1. | NO_STORAGE
  2. | AUTO
  3. | STATIC
  4. | EXTERN
  5. | REGISTER
and funspec =
  1. | INLINE
  2. | VIRTUAL
  3. | EXPLICIT
and cvspec =
  1. | CV_CONST
  2. | CV_VOLATILE
  3. | CV_RESTRICT
  4. | CV_COMPLEX
  5. | CV_ATOMIC
and spec_elem =
  1. | SpecTypedef
  2. | SpecCV of cvspec
  3. | SpecAttr of attribute
  4. | SpecStorage of storage
  5. | SpecInline
  6. | SpecNoreturn
  7. | SpecType of typeSpecifier
  8. | SpecPattern of string
and specifier = spec_elem list
and decl_type =
  1. | JUSTBASE
  2. | PARENTYPE of attribute list * decl_type * attribute list
  3. | ARRAY of decl_type * attribute list * expression
  4. | PTR of attribute list * decl_type
  5. | PROTO of decl_type * single_name list * bool
and name_group = specifier * name list
and field_group = specifier * (name * expression option) list
and init_name_group = specifier * init_name list
and name = string * decl_type * attribute list * cabsloc
and init_name = name * init_expression
and single_name = specifier * name
and enum_item = string * attribute list * expression * cabsloc
and definition =
  1. | FUNDEF of single_name * block * cabsloc * cabsloc
  2. | DECDEF of init_name_group * cabsloc
  3. | TYPEDEF of name_group * cabsloc
  4. | ONLYTYPEDEF of specifier * cabsloc
  5. | GLOBASM of string * cabsloc
  6. | PRAGMA of expression * cabsloc
  7. | LINKAGE of string * cabsloc * definition list
  8. | TRANSFORMER of definition * definition list * cabsloc
  9. | EXPRTRANSFORMER of expression * expression * cabsloc
  10. | STATIC_ASSERT of expression * string * cabsloc
and file = string * definition list
and block = {
  1. blabels : string list;
  2. battrs : attribute list;
  3. bstmts : statement list;
}
and asm_details = {
  1. aoutputs : (string option * string * expression) list;
  2. ainputs : (string option * string * expression) list;
  3. aclobbers : string list;
}
and statement =
  1. | NOP of cabsloc
  2. | COMPUTATION of expression * cabsloc
  3. | BLOCK of block * cabsloc
  4. | SEQUENCE of statement * statement * cabsloc
  5. | IF of expression * statement * statement * cabsloc * cabsloc
  6. | WHILE of expression * statement * cabsloc * cabsloc
  7. | DOWHILE of expression * statement * cabsloc * cabsloc
  8. | FOR of for_clause * expression * expression * statement * cabsloc * cabsloc
  9. | BREAK of cabsloc
  10. | CONTINUE of cabsloc
  11. | RETURN of expression * cabsloc * cabsloc
  12. | SWITCH of expression * statement * cabsloc * cabsloc
  13. | CASE of expression * statement * cabsloc * cabsloc
  14. | CASERANGE of expression * expression * statement * cabsloc * cabsloc
  15. | DEFAULT of statement * cabsloc * cabsloc
  16. | LABEL of string * statement * cabsloc
  17. | GOTO of string * cabsloc
  18. | COMPGOTO of expression * cabsloc
  19. | DEFINITION of definition
  20. | ASM of attribute list * string list * asm_details option * cabsloc
and for_clause =
  1. | FC_EXP of expression
  2. | FC_DECL of definition
and binary_operator =
  1. | ADD
  2. | SUB
  3. | MUL
  4. | DIV
  5. | MOD
  6. | AND
  7. | OR
  8. | BAND
  9. | BOR
  10. | XOR
  11. | SHL
  12. | SHR
  13. | EQ
  14. | NE
  15. | LT
  16. | GT
  17. | LE
  18. | GE
  19. | ASSIGN
  20. | ADD_ASSIGN
  21. | SUB_ASSIGN
  22. | MUL_ASSIGN
  23. | DIV_ASSIGN
  24. | MOD_ASSIGN
  25. | BAND_ASSIGN
  26. | BOR_ASSIGN
  27. | XOR_ASSIGN
  28. | SHL_ASSIGN
  29. | SHR_ASSIGN
and unary_operator =
  1. | MINUS
  2. | PLUS
  3. | NOT
  4. | BNOT
  5. | MEMOF
  6. | ADDROF
  7. | PREINCR
  8. | PREDECR
  9. | POSINCR
  10. | POSDECR
and expression =
  1. | NOTHING
  2. | UNARY of unary_operator * expression
  3. | LABELADDR of string
  4. | BINARY of binary_operator * expression * expression
  5. | QUESTION of expression * expression * expression
  6. | CAST of specifier * decl_type * init_expression
  7. | CALL of expression * expression list
  8. | COMMA of expression list
  9. | CONSTANT of constant
  10. | PAREN of expression
  11. | VARIABLE of string
  12. | REAL of expression
  13. | IMAG of expression
  14. | CLASSIFYTYPE of expression
  15. | EXPR_SIZEOF of expression
  16. | TYPE_SIZEOF of specifier * decl_type
  17. | EXPR_ALIGNOF of expression
  18. | TYPE_ALIGNOF of specifier * decl_type
  19. | INDEX of expression * expression
  20. | MEMBEROF of expression * string
  21. | MEMBEROFPTR of expression * string
  22. | GNU_BODY of block
  23. | EXPR_PATTERN of string
  24. | GENERIC of expression * ((specifier * decl_type) * expression) list
and constant =
  1. | CONST_INT of string
  2. | CONST_FLOAT of string
  3. | CONST_COMPLEX of string
  4. | CONST_CHAR of int64 list
  5. | CONST_WCHAR of int64 list * wchar_type
  6. | CONST_STRING of string * encoding
  7. | CONST_WSTRING of int64 list * wchar_type
and wchar_type =
  1. | WCHAR_T
  2. | CHAR16_T
  3. | CHAR32_T
  4. | CHAR
  5. | CHAR_UTF8
and encoding =
  1. | NO_ENCODING
  2. | UTF8
and init_expression =
  1. | NO_INIT
  2. | SINGLE_INIT of expression
  3. | COMPOUND_INIT of (initwhat * init_expression) list
and initwhat =
  1. | NEXT_INIT
  2. | INFIELD_INIT of string * initwhat
  3. | ATINDEX_INIT of expression * initwhat
  4. | ATINDEXRANGE_INIT of expression * expression
and attribute = string * expression list
diff --git a/api/goblint-cil/GoblintCil/Cabs2cil/index.html b/api/goblint-cil/GoblintCil/Cabs2cil/index.html index 92e7192d0..aca2bcdb1 100644 --- a/api/goblint-cil/GoblintCil/Cabs2cil/index.html +++ b/api/goblint-cil/GoblintCil/Cabs2cil/index.html @@ -1,5 +1,5 @@ -Cabs2cil (goblint-cil.GoblintCil.Cabs2cil)

Module GoblintCil.Cabs2cil

val convFile : Cabs.file -> Cil.file

The main entry point

val forceRLArgEval : bool Stdlib.ref

Turn on tranformation that forces correct parameter evaluation order

val silenceLongDoubleWarning : bool Stdlib.ref

By default, we warn as large constants cannot be appropriately represented as OCaml floats. This can be set to true by tools that are aware of this problem and only use the string component of CReal to avoid emitting warnings that are spurious in that context.

val nocil : int Stdlib.ref

Set this integer to the index of the global to be left in CABS form. Use -1 to disable

val addNestedScopeAttr : bool Stdlib.ref

Add an attribute to all variables which are not declared at the top scope, so tools building on CIL can know which variables were pulled up. Should be disabled when printing CIL code, as compilers will warn about this attribute.

val allowDuplication : bool Stdlib.ref

Indicates whether we're allowed to duplicate small chunks of code.

val doCollapseCallCast : bool Stdlib.ref

If false, the destination of a Call instruction should always have the same type as the function's return type. Where needed, CIL will insert a temporary to make this happen.

If true, the destination type may differ from the return type, so there is an implicit cast. This is useful for analyses involving malloc, because the instruction "T* x = malloc(...);" won't be broken into two instructions, so it's easy to find the allocation type.

This is false by default. Set to true to replicate the behavior of CIL 1.3.5 and earlier.

val cacheGlobals : bool Stdlib.ref

Disables caching of globals during parsing. This is handy when we want to parse additional source files without hearing about confclits.

val typeForTypeof : (Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code for processing typeof.

val typeForInsertedVar : (Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code that creates temporary local vars. By default this is the identity function, but you can overwrite it if you need to change the types of cabs2cil-introduced temp variables.

val typeForInsertedCast : (Cil.typ -> Cil.typ) Stdlib.ref

Like typeForInsertedVar, but for casts. Casts in the source code are exempt from this hook.

val typeForCombinedArg : +Cabs2cil (goblint-cil.GoblintCil.Cabs2cil)

Module GoblintCil.Cabs2cil

val convFile : Cabs.file -> Cil.file

The main entry point

val forceRLArgEval : bool Stdlib.ref

Turn on tranformation that forces correct parameter evaluation order

val silenceLongDoubleWarning : bool Stdlib.ref

By default, we warn as large constants cannot be appropriately represented as OCaml floats. This can be set to true by tools that are aware of this problem and only use the string component of CReal to avoid emitting warnings that are spurious in that context.

val nocil : int Stdlib.ref

Set this integer to the index of the global to be left in CABS form. Use -1 to disable

val addNestedScopeAttr : bool Stdlib.ref

Add an attribute to all variables which are not declared at the top scope, so tools building on CIL can know which variables were pulled up. Should be disabled when printing CIL code, as compilers will warn about this attribute.

val allowDuplication : bool Stdlib.ref

Indicates whether we're allowed to duplicate small chunks of code.

val doCollapseCallCast : bool Stdlib.ref

If false, the destination of a Call instruction should always have the same type as the function's return type. Where needed, CIL will insert a temporary to make this happen.

If true, the destination type may differ from the return type, so there is an implicit cast. This is useful for analyses involving malloc, because the instruction "T* x = malloc(...);" won't be broken into two instructions, so it's easy to find the allocation type.

This is false by default. Set to true to replicate the behavior of CIL 1.3.5 and earlier.

val cacheGlobals : bool Stdlib.ref

Disables caching of globals during parsing. This is handy when we want to parse additional source files without hearing about confclits.

val typeForTypeof : (Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code for processing typeof.

val typeForInsertedVar : (Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code that creates temporary local vars. By default this is the identity function, but you can overwrite it if you need to change the types of cabs2cil-introduced temp variables.

val typeForInsertedCast : (Cil.typ -> Cil.typ) Stdlib.ref

Like typeForInsertedVar, but for casts. Casts in the source code are exempt from this hook.

val typeForCombinedArg : ((string, string) Stdlib.Hashtbl.t -> Cil.typ -> Cil.typ) Stdlib.ref

A hook into the code that merges arguments in function types.

val attrsForCombinedArg : ((string, string) Stdlib.Hashtbl.t -> Cil.attributes -> diff --git a/api/goblint-cil/GoblintCil/Cabshelper/index.html b/api/goblint-cil/GoblintCil/Cabshelper/index.html index b120802c9..214a56220 100644 --- a/api/goblint-cil/GoblintCil/Cabshelper/index.html +++ b/api/goblint-cil/GoblintCil/Cabshelper/index.html @@ -1,2 +1,2 @@ -Cabshelper (goblint-cil.GoblintCil.Cabshelper)

Module GoblintCil.Cabshelper

val nextident : int Stdlib.ref
val getident : unit -> int
val currentLoc : unit -> Cabs.cabsloc
val cabslu : Cabs.cabsloc
val string_of_loc : Cabs.cabsloc -> string
val commentsGA : (Cabs.cabsloc * string * bool) GrowArray.t
val missingFieldDecl : string * Cabs.decl_type * 'a list * Cabs.cabsloc
val isStatic : Cabs.spec_elem list -> bool
val isExtern : Cabs.spec_elem list -> bool
val isInline : Cabs.spec_elem list -> bool
val isTypedef : Cabs.spec_elem list -> bool
val get_definitionloc : Cabs.definition -> Cabs.cabsloc
val get_statementloc : Cabs.statement -> Cabs.cabsloc
val explodeStringToInts : string -> int64 list
val valueOfDigit : char -> int64
val d_cabsloc : unit -> Cabs.cabsloc -> Pretty.doc
+Cabshelper (goblint-cil.GoblintCil.Cabshelper)

Module GoblintCil.Cabshelper

val nextident : int Stdlib.ref
val getident : unit -> int
val currentLoc : unit -> Cabs.cabsloc
val cabslu : Cabs.cabsloc
val string_of_loc : Cabs.cabsloc -> string
val commentsGA : (Cabs.cabsloc * string * bool) GrowArray.t
val missingFieldDecl : string * Cabs.decl_type * 'a list * Cabs.cabsloc
val isStatic : Cabs.spec_elem list -> bool
val isExtern : Cabs.spec_elem list -> bool
val isInline : Cabs.spec_elem list -> bool
val isTypedef : Cabs.spec_elem list -> bool
val get_definitionloc : Cabs.definition -> Cabs.cabsloc
val get_statementloc : Cabs.statement -> Cabs.cabsloc
val explodeStringToInts : string -> int64 list
val valueOfDigit : char -> int64
val d_cabsloc : unit -> Cabs.cabsloc -> Pretty.doc
diff --git a/api/goblint-cil/GoblintCil/Cabsvisit/class-nopCabsVisitor/index.html b/api/goblint-cil/GoblintCil/Cabsvisit/class-nopCabsVisitor/index.html index 82e17f088..55d05b681 100644 --- a/api/goblint-cil/GoblintCil/Cabsvisit/class-nopCabsVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Cabsvisit/class-nopCabsVisitor/index.html @@ -1,5 +1,5 @@ -nopCabsVisitor (goblint-cil.GoblintCil.Cabsvisit.nopCabsVisitor)

Class Cabsvisit.nopCabsVisitor

method vexpr : GoblintCil__.Cabs.expression -> +nopCabsVisitor (goblint-cil.GoblintCil.Cabsvisit.nopCabsVisitor)

Class Cabsvisit.nopCabsVisitor

method vexpr : GoblintCil__.Cabs.expression -> GoblintCil__.Cabs.expression visitAction
method vinitexpr : GoblintCil__.Cabs.init_expression -> GoblintCil__.Cabs.init_expression visitAction
method vstmt : GoblintCil__.Cabs.statement -> GoblintCil__.Cabs.statement list visitAction
method vblock : GoblintCil__.Cabs.block -> GoblintCil__.Cabs.block visitAction
method vvar : string -> string
method vdef : GoblintCil__.Cabs.definition -> diff --git a/api/goblint-cil/GoblintCil/Cabsvisit/class-type-cabsVisitor/index.html b/api/goblint-cil/GoblintCil/Cabsvisit/class-type-cabsVisitor/index.html index 622c9f735..bb96c710d 100644 --- a/api/goblint-cil/GoblintCil/Cabsvisit/class-type-cabsVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Cabsvisit/class-type-cabsVisitor/index.html @@ -1,5 +1,5 @@ -cabsVisitor (goblint-cil.GoblintCil.Cabsvisit.cabsVisitor)

Class type Cabsvisit.cabsVisitor

method vexpr : GoblintCil__.Cabs.expression -> +cabsVisitor (goblint-cil.GoblintCil.Cabsvisit.cabsVisitor)

Class type Cabsvisit.cabsVisitor

method vexpr : GoblintCil__.Cabs.expression -> GoblintCil__.Cabs.expression visitAction
method vinitexpr : GoblintCil__.Cabs.init_expression -> GoblintCil__.Cabs.init_expression visitAction
method vstmt : GoblintCil__.Cabs.statement -> GoblintCil__.Cabs.statement list visitAction
method vblock : GoblintCil__.Cabs.block -> GoblintCil__.Cabs.block visitAction
method vvar : string -> string
method vdef : GoblintCil__.Cabs.definition -> diff --git a/api/goblint-cil/GoblintCil/Cabsvisit/index.html b/api/goblint-cil/GoblintCil/Cabsvisit/index.html index 45ab423c7..c4e91889d 100644 --- a/api/goblint-cil/GoblintCil/Cabsvisit/index.html +++ b/api/goblint-cil/GoblintCil/Cabsvisit/index.html @@ -1,5 +1,5 @@ -Cabsvisit (goblint-cil.GoblintCil.Cabsvisit)

Module GoblintCil.Cabsvisit

type 'a visitAction =
  1. | SkipChildren
  2. | ChangeTo of 'a
  3. | DoChildren
  4. | ChangeDoChildrenPost of 'a * 'a -> 'a
type nameKind =
  1. | NVar
    (*

    Variable or function prototype name

    *)
  2. | NFun
    (*

    Function definition name

    *)
  3. | NField
    (*

    The name of a field

    *)
  4. | NType
    (*

    The name of a type

    *)
class type cabsVisitor = object ... end
val visitCabsTypeSpecifier : +Cabsvisit (goblint-cil.GoblintCil.Cabsvisit)

Module GoblintCil.Cabsvisit

type 'a visitAction =
  1. | SkipChildren
  2. | ChangeTo of 'a
  3. | DoChildren
  4. | ChangeDoChildrenPost of 'a * 'a -> 'a
type nameKind =
  1. | NVar
    (*

    Variable or function prototype name

    *)
  2. | NFun
    (*

    Function definition name

    *)
  3. | NField
    (*

    The name of a field

    *)
  4. | NType
    (*

    The name of a type

    *)
class type cabsVisitor = object ... end
val visitCabsTypeSpecifier : cabsVisitor -> Cabs.typeSpecifier -> Cabs.typeSpecifier
val visitCabsSpecifier : cabsVisitor -> Cabs.specifier -> Cabs.specifier
val visitCabsDeclType : cabsVisitor -> bool -> Cabs.decl_type -> Cabs.decl_type

Visits a decl_type. The bool argument is saying whether we are ina function definition and thus the scope in a PROTO should extend until the end of the function

val visitCabsDefinition : diff --git a/api/goblint-cil/GoblintCil/Cfg/index.html b/api/goblint-cil/GoblintCil/Cfg/index.html index ce8dc469d..914b18e06 100644 --- a/api/goblint-cil/GoblintCil/Cfg/index.html +++ b/api/goblint-cil/GoblintCil/Cfg/index.html @@ -1,2 +1,2 @@ -Cfg (goblint-cil.GoblintCil.Cfg)

Module GoblintCil.Cfg

Code to compute the control-flow graph of a function or file. This will fill in the preds and succs fields of Cil.stmt

This is required for several other extensions, such as Dataflow.

val computeFileCFG : Cil.file -> unit

Compute the CFG for an entire file, by calling cfgFun on each function.

val clearFileCFG : Cil.file -> unit

clear the sid, succs, and preds fields of each statement.

val cfgFun : Cil.fundec -> int

Compute a control flow graph for fd. Stmts in fd have preds and succs filled in

val clearCFGinfo : Cil.fundec -> unit

clear the sid, succs, and preds fields of each statment in a function

val printCfgChannel : Stdlib.out_channel -> Cil.fundec -> unit

print control flow graph (in dot form) for fundec to channel

val printCfgFilename : string -> Cil.fundec -> unit

Print control flow graph (in dot form) for fundec to file

val start_id : int Stdlib.ref

Next statement id that will be assigned.

val allStmts : Cil.file -> Cil.stmt list

Return all statements in a file - valid after computeFileCfg only

+Cfg (goblint-cil.GoblintCil.Cfg)

Module GoblintCil.Cfg

Code to compute the control-flow graph of a function or file. This will fill in the preds and succs fields of Cil.stmt

This is required for several other extensions, such as Dataflow.

val computeFileCFG : Cil.file -> unit

Compute the CFG for an entire file, by calling cfgFun on each function.

val clearFileCFG : Cil.file -> unit

clear the sid, succs, and preds fields of each statement.

val cfgFun : Cil.fundec -> int

Compute a control flow graph for fd. Stmts in fd have preds and succs filled in

val clearCFGinfo : Cil.fundec -> unit

clear the sid, succs, and preds fields of each statment in a function

val printCfgChannel : Stdlib.out_channel -> Cil.fundec -> unit

print control flow graph (in dot form) for fundec to channel

val printCfgFilename : string -> Cil.fundec -> unit

Print control flow graph (in dot form) for fundec to file

val start_id : int Stdlib.ref

Next statement id that will be assigned.

val allStmts : Cil.file -> Cil.stmt list

Return all statements in a file - valid after computeFileCfg only

diff --git a/api/goblint-cil/GoblintCil/Check/index.html b/api/goblint-cil/GoblintCil/Check/index.html index f4cfac893..85266f118 100644 --- a/api/goblint-cil/GoblintCil/Check/index.html +++ b/api/goblint-cil/GoblintCil/Check/index.html @@ -1,2 +1,2 @@ -Check (goblint-cil.GoblintCil.Check)

Module GoblintCil.Check

type checkFlags =
  1. | NoCheckGlobalIds
  2. | IgnoreInstructions of Cil.instr -> bool
    (*

    Ignore the specified instructions

    *)
val checkFile : checkFlags list -> Cil.file -> bool
val checkStandaloneExp : vars:Cil.varinfo list -> Cil.exp -> bool
+Check (goblint-cil.GoblintCil.Check)

Module GoblintCil.Check

type checkFlags =
  1. | NoCheckGlobalIds
  2. | IgnoreInstructions of Cil.instr -> bool
    (*

    Ignore the specified instructions

    *)
val checkFile : checkFlags list -> Cil.file -> bool
val checkStandaloneExp : vars:Cil.varinfo list -> Cil.exp -> bool
diff --git a/api/goblint-cil/GoblintCil/Cil/class-defaultCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/Cil/class-defaultCilPrinterClass/index.html index 73c7e59e4..305137a34 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-defaultCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-defaultCilPrinterClass/index.html @@ -1,5 +1,5 @@ -defaultCilPrinterClass (goblint-cil.GoblintCil.Cil.defaultCilPrinterClass)

Class Cil.defaultCilPrinterClass

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> +defaultCilPrinterClass (goblint-cil.GoblintCil.Cil.defaultCilPrinterClass)

Class Cil.defaultCilPrinterClass

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

Attribute parameter

method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

Attribute lists

method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

method pExp : unit -> exp -> GoblintCil__.Pretty.doc

Print expressions

method pInit : unit -> init -> GoblintCil__.Pretty.doc

Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

method dInit : Stdlib.out_channel -> int -> init -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

diff --git a/api/goblint-cil/GoblintCil/Cil/class-descriptiveCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/Cil/class-descriptiveCilPrinterClass/index.html index 27aa6186e..449e20eb9 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-descriptiveCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-descriptiveCilPrinterClass/index.html @@ -1,2 +1,2 @@ -descriptiveCilPrinterClass (goblint-cil.GoblintCil.Cil.descriptiveCilPrinterClass)

Class Cil.descriptiveCilPrinterClass

Like defaultCilPrinterClass, but instead of temporary variable names it prints the description that was provided when the temp was created. This is usually better for messages that are printed for end users, although you may want the temporary names for debugging.

The boolean here enables descriptive printing. Usually use true here, but you can set enable to false to make this class behave like defaultCilPrinterClass. This allows subclasses to turn the feature off.

inherit cilPrinter
method startTemps : unit -> unit
method stopTemps : unit -> unit
method pTemps : unit -> GoblintCil__.Pretty.doc
+descriptiveCilPrinterClass (goblint-cil.GoblintCil.Cil.descriptiveCilPrinterClass)

Class Cil.descriptiveCilPrinterClass

Like defaultCilPrinterClass, but instead of temporary variable names it prints the description that was provided when the temp was created. This is usually better for messages that are printed for end users, although you may want the temporary names for debugging.

The boolean here enables descriptive printing. Usually use true here, but you can set enable to false to make this class behave like defaultCilPrinterClass. This allows subclasses to turn the feature off.

inherit cilPrinter
method startTemps : unit -> unit
method stopTemps : unit -> unit
method pTemps : unit -> GoblintCil__.Pretty.doc
diff --git a/api/goblint-cil/GoblintCil/Cil/class-nopCilVisitor/index.html b/api/goblint-cil/GoblintCil/Cil/class-nopCilVisitor/index.html index efd771e09..7a39fc00e 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-nopCilVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-nopCilVisitor/index.html @@ -1,2 +1,2 @@ -nopCilVisitor (goblint-cil.GoblintCil.Cil.nopCilVisitor)

Class Cil.nopCilVisitor

Default Visitor. Traverses the CIL tree without modifying anything

method vvdec : varinfo -> varinfo visitAction

Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

method vvrbl : varinfo -> varinfo visitAction

Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

method vexpr : exp -> exp visitAction

Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

method vlval : lval -> lval visitAction

Invoked on each lvalue occurrence

method voffs : offset -> offset visitAction

Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

method vinitoffs : offset -> offset visitAction

Invoked on each offset appearing in the list of a CompoundInit initializer.

method vinst : instr -> instr list visitAction

Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

method vstmt : stmt -> stmt visitAction

Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

method vblock : block -> block visitAction

Block.

method vfunc : fundec -> fundec visitAction

Function definition. Replaced in place.

method vglob : global -> global list visitAction

Global (vars, types, etc.)

method vinit : varinfo -> offset -> init -> init visitAction

Initializers for static, const and global variables, pass the variable where this occurs, and the offset

method vtype : typ -> typ visitAction

Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method vattr : attribute -> attribute list visitAction

Attribute. Each attribute can be replaced by a list

method vattrparam : attrparam -> attrparam visitAction

Attribute parameters.

method queueInstr : instr list -> unit

Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

method unqueueInstr : unit -> instr list

Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

+nopCilVisitor (goblint-cil.GoblintCil.Cil.nopCilVisitor)

Class Cil.nopCilVisitor

Default Visitor. Traverses the CIL tree without modifying anything

method vvdec : varinfo -> varinfo visitAction

Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

method vvrbl : varinfo -> varinfo visitAction

Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

method vexpr : exp -> exp visitAction

Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

method vlval : lval -> lval visitAction

Invoked on each lvalue occurrence

method voffs : offset -> offset visitAction

Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

method vinitoffs : offset -> offset visitAction

Invoked on each offset appearing in the list of a CompoundInit initializer.

method vinst : instr -> instr list visitAction

Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

method vstmt : stmt -> stmt visitAction

Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

method vblock : block -> block visitAction

Block.

method vfunc : fundec -> fundec visitAction

Function definition. Replaced in place.

method vglob : global -> global list visitAction

Global (vars, types, etc.)

method vinit : varinfo -> offset -> init -> init visitAction

Initializers for static, const and global variables, pass the variable where this occurs, and the offset

method vtype : typ -> typ visitAction

Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method vattr : attribute -> attribute list visitAction

Attribute. Each attribute can be replaced by a list

method vattrparam : attrparam -> attrparam visitAction

Attribute parameters.

method queueInstr : instr list -> unit

Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

method unqueueInstr : unit -> instr list

Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

diff --git a/api/goblint-cil/GoblintCil/Cil/class-plainCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/Cil/class-plainCilPrinterClass/index.html index aee781584..318d83dbb 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-plainCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-plainCilPrinterClass/index.html @@ -1,5 +1,5 @@ -plainCilPrinterClass (goblint-cil.GoblintCil.Cil.plainCilPrinterClass)

Class Cil.plainCilPrinterClass

These are pretty-printers that will show you more details on the internal CIL representation, without trying hard to make it look like C

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> +plainCilPrinterClass (goblint-cil.GoblintCil.Cil.plainCilPrinterClass)

Class Cil.plainCilPrinterClass

These are pretty-printers that will show you more details on the internal CIL representation, without trying hard to make it look like C

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

Attribute parameter

method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

Attribute lists

method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

method pExp : unit -> exp -> GoblintCil__.Pretty.doc

Print expressions

method pInit : unit -> init -> GoblintCil__.Pretty.doc

Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

method dInit : Stdlib.out_channel -> int -> init -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

diff --git a/api/goblint-cil/GoblintCil/Cil/class-type-cilPrinter/index.html b/api/goblint-cil/GoblintCil/Cil/class-type-cilPrinter/index.html index 4dfbfa6dd..464894060 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-type-cilPrinter/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-type-cilPrinter/index.html @@ -1,5 +1,5 @@ -cilPrinter (goblint-cil.GoblintCil.Cil.cilPrinter)

Class type Cil.cilPrinter

A printer interface for CIL trees. Create instantiations of this type by specializing the class defaultCilPrinterClass.

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> +cilPrinter (goblint-cil.GoblintCil.Cil.cilPrinter)

Class type Cil.cilPrinter

A printer interface for CIL trees. Create instantiations of this type by specializing the class defaultCilPrinterClass.

method setCurrentFormals : varinfo list -> unit
method setPrintInstrTerminator : string -> unit
method getPrintInstrTerminator : unit -> string
method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

method pVar : varinfo -> GoblintCil__.Pretty.doc

Invoked on each variable use.

method pLval : unit -> lval -> GoblintCil__.Pretty.doc

Invoked on each lvalue occurrence

method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

Invoked on each offset occurrence. The second argument is the base.

method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

Invoked on each instruction occurrence.

method pLabel : unit -> label -> GoblintCil__.Pretty.doc

Print a label.

method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

Control-flow statement. This is used by printGlobal and by dumpGlobal.

method dStmt : Stdlib.out_channel -> int -> stmt -> unit

Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

method dBlock : Stdlib.out_channel -> int -> block -> unit

Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

method pBlock : unit -> block -> GoblintCil__.Pretty.doc

Print a block.

method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

method dGlobal : Stdlib.out_channel -> global -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

A field declaration

method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

Attribute parameter

method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

Attribute lists

method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

method pExp : unit -> exp -> GoblintCil__.Pretty.doc

Print expressions

method pInit : unit -> init -> GoblintCil__.Pretty.doc

Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

method dInit : Stdlib.out_channel -> int -> init -> unit

Dump a global to a file with a given indentation. This is used by dumpGlobal

diff --git a/api/goblint-cil/GoblintCil/Cil/class-type-cilVisitor/index.html b/api/goblint-cil/GoblintCil/Cil/class-type-cilVisitor/index.html index 20db40fe8..f0935d8a9 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-type-cilVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-type-cilVisitor/index.html @@ -1,2 +1,2 @@ -cilVisitor (goblint-cil.GoblintCil.Cil.cilVisitor)

Class type Cil.cilVisitor

A visitor interface for traversing CIL trees. Create instantiations of this type by specializing the class nopCilVisitor. Each of the specialized visiting functions can also call the queueInstr to specify that some instructions should be inserted before the current instruction or statement. Use syntax like self#queueInstr to call a method associated with the current object.

method vvdec : varinfo -> varinfo visitAction

Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

method vvrbl : varinfo -> varinfo visitAction

Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

method vexpr : exp -> exp visitAction

Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

method vlval : lval -> lval visitAction

Invoked on each lvalue occurrence

method voffs : offset -> offset visitAction

Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

method vinitoffs : offset -> offset visitAction

Invoked on each offset appearing in the list of a CompoundInit initializer.

method vinst : instr -> instr list visitAction

Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

method vstmt : stmt -> stmt visitAction

Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

method vblock : block -> block visitAction

Block.

method vfunc : fundec -> fundec visitAction

Function definition. Replaced in place.

method vglob : global -> global list visitAction

Global (vars, types, etc.)

method vinit : varinfo -> offset -> init -> init visitAction

Initializers for static, const and global variables, pass the variable where this occurs, and the offset

method vtype : typ -> typ visitAction

Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method vattr : attribute -> attribute list visitAction

Attribute. Each attribute can be replaced by a list

method vattrparam : attrparam -> attrparam visitAction

Attribute parameters.

method queueInstr : instr list -> unit

Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

method unqueueInstr : unit -> instr list

Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

+cilVisitor (goblint-cil.GoblintCil.Cil.cilVisitor)

Class type Cil.cilVisitor

A visitor interface for traversing CIL trees. Create instantiations of this type by specializing the class nopCilVisitor. Each of the specialized visiting functions can also call the queueInstr to specify that some instructions should be inserted before the current instruction or statement. Use syntax like self#queueInstr to call a method associated with the current object.

method vvdec : varinfo -> varinfo visitAction

Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

method vvrbl : varinfo -> varinfo visitAction

Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

method vexpr : exp -> exp visitAction

Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

method vlval : lval -> lval visitAction

Invoked on each lvalue occurrence

method voffs : offset -> offset visitAction

Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

method vinitoffs : offset -> offset visitAction

Invoked on each offset appearing in the list of a CompoundInit initializer.

method vinst : instr -> instr list visitAction

Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

method vstmt : stmt -> stmt visitAction

Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

method vblock : block -> block visitAction

Block.

method vfunc : fundec -> fundec visitAction

Function definition. Replaced in place.

method vglob : global -> global list visitAction

Global (vars, types, etc.)

method vinit : varinfo -> offset -> init -> init visitAction

Initializers for static, const and global variables, pass the variable where this occurs, and the offset

method vtype : typ -> typ visitAction

Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

method vattr : attribute -> attribute list visitAction

Attribute. Each attribute can be replaced by a list

method vattrparam : attrparam -> attrparam visitAction

Attribute parameters.

method queueInstr : instr list -> unit

Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

method unqueueInstr : unit -> instr list

Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

diff --git a/api/goblint-cil/GoblintCil/Cil/class-type-descriptiveCilPrinter/index.html b/api/goblint-cil/GoblintCil/Cil/class-type-descriptiveCilPrinter/index.html index 40a9f8395..bf093e7d1 100644 --- a/api/goblint-cil/GoblintCil/Cil/class-type-descriptiveCilPrinter/index.html +++ b/api/goblint-cil/GoblintCil/Cil/class-type-descriptiveCilPrinter/index.html @@ -1,2 +1,2 @@ -descriptiveCilPrinter (goblint-cil.GoblintCil.Cil.descriptiveCilPrinter)

Class type Cil.descriptiveCilPrinter

inherit cilPrinter
method startTemps : unit -> unit
method stopTemps : unit -> unit
method pTemps : unit -> GoblintCil__.Pretty.doc
+descriptiveCilPrinter (goblint-cil.GoblintCil.Cil.descriptiveCilPrinter)

Class type Cil.descriptiveCilPrinter

inherit cilPrinter
method startTemps : unit -> unit
method stopTemps : unit -> unit
method pTemps : unit -> GoblintCil__.Pretty.doc
diff --git a/api/goblint-cil/GoblintCil/Cil/index.html b/api/goblint-cil/GoblintCil/Cil/index.html index a4753540f..a6cb9be33 100644 --- a/api/goblint-cil/GoblintCil/Cil/index.html +++ b/api/goblint-cil/GoblintCil/Cil/index.html @@ -1,5 +1,5 @@ -Cil (goblint-cil.GoblintCil.Cil)

Module GoblintCil.Cil

CIL API Documentation.

val initCIL : unit -> unit

Call this function to perform some initialization.

val cilVersion : string

These are the CIL version numbers. A CIL version is a number of the form M.m.r (major, minor and release)

type cstd =
  1. | C90
  2. | C99
  3. | C11
val cstd_of_string : string -> cstd
val cstd : cstd Stdlib.ref
val gnu89inline : bool Stdlib.ref
val addReturnOnNoreturnFallthrough : bool Stdlib.ref

This module defines the abstract syntax of CIL. It also provides utility functions for traversing the CIL data structures, and pretty-printing them. The parser can be invoked as Frontc.parse: string -> unit -> file. This function must be given the name of a preprocessed C file and will return the top-level data structure that describes a whole source file. The parsing and elaboration into CIL is done as for GCC source.

The Abstract Syntax of CIL

The top-level representation of a CIL source file (and the result of the parsing and elaboration). Its main contents is the list of global declarations and definitions. You can iterate over the globals in a file using the following iterators: mapGlobals, iterGlobals and foldGlobals. You can also use the dummyFile when you need a file as a placeholder. For each global item CIL stores the source location where it appears (using the type location)

type file = {
  1. mutable fileName : string;
    (*

    The complete file name

    *)
  2. mutable globals : global list;
    (*

    List of globals as they will appear in the printed file

    *)
  3. mutable globinit : fundec option;
    (*

    An optional global initializer function. This is a function where you can put stuff that must be executed before the program is started. This function is conceptually at the end of the file, although it is not part of the globals list. Use getGlobInit to create/get one.

    *)
  4. mutable globinitcalled : bool;
    (*

    Whether the global initialization function is called in main. This should always be false if there is no global initializer. When you create a global initialization CIL will try to insert code in main to call it. This will not happen if your file does not contain a function called "main"

    *)
}

Top-level representation of a C source file

and comment = location * string

Globals. The main type for representing global declarations and definitions. A list of these form a CIL file. The order of globals in the file is generally important.

and global =
  1. | GType of typeinfo * location
    (*

    A typedef. All uses of type names (through the TNamed constructor) must be preceded in the file by a definition of the name. The string is the defined name and always not-empty.

    *)
  2. | GCompTag of compinfo * location
    (*

    Defines a struct/union tag with some fields. There must be one of these for each struct/union tag that you use (through the TComp constructor) since this is the only context in which the fields are printed. Consequently nested structure tag definitions must be broken into individual definitions with the innermost structure defined first.

    *)
  3. | GCompTagDecl of compinfo * location
    (*

    Declares a struct/union tag. Use as a forward declaration. This is printed without the fields.

    *)
  4. | GEnumTag of enuminfo * location
    (*

    Declares an enumeration tag with some fields. There must be one of these for each enumeration tag that you use (through the TEnum constructor) since this is the only context in which the items are printed.

    *)
  5. | GEnumTagDecl of enuminfo * location
    (*

    Declares an enumeration tag. Use as a forward declaration. This is printed without the items.

    *)
  6. | GVarDecl of varinfo * location
    (*

    A variable declaration (not a definition). If the variable has a function type then this is a prototype. There can be several declarations and at most one definition for a given variable. If both forms appear then they must share the same varinfo structure. A prototype shares the varinfo with the fundec of the definition. Either has storage Extern or there must be a definition in this file

    *)
  7. | GVar of varinfo * initinfo * location
    (*

    A variable definition. Can have an initializer. The initializer is updateable so that you can change it without requiring to recreate the list of globals. There can be at most one definition for a variable in an entire program. Cannot have storage Extern or function type. Note: the initializer field is kept for backwards compatibility, but it is now also available directly in the varinfo.

    *)
  8. | GFun of fundec * location
    (*

    A function definition.

    *)
  9. | GAsm of string * location
    (*

    Global asm statement. These ones can contain only a template

    *)
  10. | GPragma of attribute * location
    (*

    Pragmas at top level. Use the same syntax as attributes

    *)
  11. | GText of string
    (*

    Some text (printed verbatim) at top level. E.g., this way you can put comments in the output.

    *)

A global declaration or definition

Types. A C type is represented in CIL using the type typ. Among types we differentiate the integral types (with different kinds denoting the sign and precision), floating point types, enumeration types, array and pointer types, and function types. Every type is associated with a list of attributes, which are always kept in sorted order. Use addAttribute and addAttributes to construct list of attributes. If you want to inspect a type, you should use unrollType or unrollTypeDeep to see through the uses of named types.

CIL is configured at build-time with the sizes and alignments of the underlying compiler. CIL contains functions that can compute the size of a type (in bits) bitsSizeOf, the alignment of a type (in bytes) alignOf_int, and can convert an offset into a start and width (both in bits) using the function bitsOffset. At the moment these functions do not take into account the packed attributes and pragmas.

and typ =
  1. | TVoid of attributes
    (*

    Void type. Also predefined as voidType

    *)
  2. | TInt of ikind * attributes
    (*

    An integer type. The kind specifies the sign and width. Several useful variants are predefined as intType, uintType, longType, charType.

    *)
  3. | TFloat of fkind * attributes
    (*

    A floating-point type. The kind specifies the precision. You can also use the predefined constant doubleType.

    *)
  4. | TPtr of typ * attributes
    (*

    Pointer type. Several useful variants are predefined as charPtrType, charConstPtrType (pointer to a constant character), voidPtrType, intPtrType

    *)
  5. | TArray of typ * exp option * attributes
    (*

    Array type. It indicates the base type and the array length.

    *)
  6. | TFun of typ * (string * typ * attributes) list option * bool * attributes
    (*

    Function type. Indicates the type of the result, the name, type and name attributes of the formal arguments (None if no arguments were specified, as in a function whose definition or prototype we have not seen; Some [] means void). Use argsToList to obtain a list of arguments. The boolean indicates if it is a variable-argument function. If this is the type of a varinfo for which we have a function declaration then the information for the formals must match that in the function's sformals. Use setFormals, or setFunctionType, or makeFormalVar for this purpose.

    *)
  7. | TNamed of typeinfo * attributes
    (*

    The use of a named type. Each such type name must be preceded in the file by a GType global. This is printed as just the type name. The actual referred type is not printed here and is carried only to simplify processing. To see through a sequence of named type references, use unrollType or unrollTypeDeep. The attributes are in addition to those given when the type name was defined.

    *)
  8. | TComp of compinfo * attributes
    (*

    The most delicate issue for C types is that recursion that is possible by using structures and pointers. To address this issue we have a more complex representation for structured types (struct and union). Each such type is represented using the compinfo type. For each composite type the compinfo structure must be declared at top level using GCompTag and all references to it must share the same copy of the structure. The attributes given are those pertaining to this use of the type and are in addition to the attributes that were given at the definition of the type and which are stored in the compinfo.

    *)
  9. | TEnum of enuminfo * attributes
    (*

    A reference to an enumeration type. All such references must share the enuminfo among them and with a GEnumTag global that precedes all uses. The attributes refer to this use of the enumeration and are in addition to the attributes of the enumeration itself, which are stored inside the enuminfo

    *)
  10. | TBuiltin_va_list of attributes
    (*

    This is the same as the gcc's type with the same name

    *)

There are a number of functions for querying the kind of a type. These are isIntegralType, isArithmeticType, isPointerType, isScalarType, isFunctionType, isArrayType.

There are two easy ways to scan a type. First, you can use the existsType to return a boolean answer about a type. This function is controlled by a user-provided function that is queried for each type that is used to construct the current type. The function can specify whether to terminate the scan with a boolean result or to continue the scan for the nested types.

The other method for scanning types is provided by the visitor interface (see cilVisitor).

If you want to compare types (or to use them as hash-values) then you should use instead type signatures (represented as typsig). These contain the same information as types but canonicalized such that simple Ocaml structural equality will tell whether two types are equal. Use typeSig to compute the signature of a type. If you want to ignore certain type attributes then use typeSigWithAttrs.

and ikind =
  1. | IChar
    (*

    char

    *)
  2. | ISChar
    (*

    signed char

    *)
  3. | IUChar
    (*

    unsigned char

    *)
  4. | IBool
    (*

    _Bool (C99)

    *)
  5. | IInt
    (*

    int

    *)
  6. | IUInt
    (*

    unsigned int

    *)
  7. | IShort
    (*

    short

    *)
  8. | IUShort
    (*

    unsigned short

    *)
  9. | ILong
    (*

    long

    *)
  10. | IULong
    (*

    unsigned long

    *)
  11. | ILongLong
    (*

    long long (or _int64 on Microsoft Visual C)

    *)
  12. | IULongLong
    (*

    unsigned long long (or unsigned _int64 on Microsoft Visual C)

    *)
  13. | IInt128
    (*

    __int128

    *)
  14. | IUInt128
    (*

    unsigned __int128

    *)

Various kinds of integers

and fkind =
  1. | FFloat
    (*

    float

    *)
  2. | FDouble
    (*

    double

    *)
  3. | FLongDouble
    (*

    long double

    *)
  4. | FFloat128
    (*

    float128

    *)
  5. | FComplexFloat
    (*

    float _Complex

    *)
  6. | FComplexDouble
    (*

    double _Complex

    *)
  7. | FComplexLongDouble
    (*

    long double _Complex

    *)
  8. | FComplexFloat128
    (*

    _float128 _Complex

    *)

Various kinds of floating-point numbers

Attributes.

and attribute =
  1. | Attr of string * attrparam list
    (*

    An attribute has a name and some optional parameters. The name should not start or end with underscore. When CIL parses attribute names it will strip leading and ending underscores (to ensure that the multitude of GCC attributes such as const, __const and __const__ all mean the same thing.)

    *)
and attributes = attribute list

Attributes are lists sorted by the attribute name. Use the functions addAttribute and addAttributes to insert attributes in an attribute list and maintain the sortedness.

and attrparam =
  1. | AInt of int
    (*

    An integer constant

    *)
  2. | AStr of string
    (*

    A string constant

    *)
  3. | ACons of string * attrparam list
    (*

    Constructed attributes. These are printed foo(a1,a2,...,an). The list of parameters can be empty and in that case the parentheses are not printed.

    *)
  4. | ASizeOf of typ
    (*

    A way to talk about types

    *)
  5. | ASizeOfE of attrparam
  6. | ASizeOfS of typsig
    (*

    Replacement for ASizeOf in type signatures. Only used for attributes inside typsigs.

    *)
  7. | AAlignOf of typ
  8. | AAlignOfE of attrparam
  9. | AAlignOfS of typsig
  10. | AUnOp of unop * attrparam
  11. | ABinOp of binop * attrparam * attrparam
  12. | ADot of attrparam * string
    (*

    a.foo *

    *)
  13. | AStar of attrparam
    (*

    * a

    *)
  14. | AAddrOf of attrparam
    (*

    & a *

    *)
  15. | AIndex of attrparam * attrparam
    (*

    a1a2

    *)
  16. | AQuestion of attrparam * attrparam * attrparam
    (*

    a1 ? a2 : a3 *

    *)
  17. | AAssign of attrparam * attrparam
    (*

    a1 = a2

    *)

The type of parameters of attributes

Structures. The compinfo describes the definition of a structure or union type. Each such compinfo must be defined at the top-level using the GCompTag constructor and must be shared by all references to this type (using either the TComp type constructor or from the definition of the fields.

If all you need is to scan the definition of each composite type once, you can do that by scanning all top-level GCompTag.

Constructing a compinfo can be tricky since it must contain fields that might refer to the host compinfo and furthermore the type of the field might need to refer to the compinfo for recursive types. Use the mkCompInfo function to create a compinfo. You can easily fetch the fieldinfo for a given field in a structure with getCompField.

and compinfo = {
  1. mutable cstruct : bool;
    (*

    True if struct, False if union

    *)
  2. mutable cname : string;
    (*

    The name. Always non-empty. Use compFullName to get the full name of a comp (along with the struct or union)

    *)
  3. mutable ckey : int;
    (*

    A unique integer. This is assigned by mkCompInfo using a global variable in the Cil module. Thus two identical structs in two different files might have different keys. Use copyCompInfo to copy structures so that a new key is assigned.

    *)
  4. mutable cfields : fieldinfo list;
    (*

    Information about the fields. Notice that each fieldinfo has a pointer back to the host compinfo. This means that you should not share fieldinfo's between two compinfo's

    *)
  5. mutable cattr : attributes;
    (*

    The attributes that are defined at the same time as the composite type. These attributes can be supplemented individually at each reference to this compinfo using the TComp type constructor.

    *)
  6. mutable cdefined : bool;
    (*

    This boolean flag can be used to distinguish between structures that have not been defined and those that have been defined but have no fields (such things are allowed in gcc).

    *)
  7. mutable creferenced : bool;
    (*

    True if used. Initially set to false.

    *)
}

The definition of a structure or union type. Use mkCompInfo to make one and use copyCompInfo to copy one (this ensures that a new key is assigned and that the fields have the right pointers to parents.).

Structure fields. The fieldinfo structure is used to describe a structure or union field. Fields, just like variables, can have attributes associated with the field itself or associated with the type of the field (stored along with the type of the field).

and fieldinfo = {
  1. mutable fcomp : compinfo;
    (*

    The host structure that contains this field. There can be only one compinfo that contains the field.

    *)
  2. mutable fname : string;
    (*

    The name of the field. Might be the value of missingFieldName in which case it must be a bitfield and is not printed and it does not participate in initialization

    *)
  3. mutable ftype : typ;
    (*

    The type

    *)
  4. mutable fbitfield : int option;
    (*

    If a bitfield then ftype should be an integer type and the width of the bitfield must be 0 or a positive integer smaller or equal to the width of the integer type. A field of width 0 is used in C to control the alignment of fields.

    *)
  5. mutable fattr : attributes;
    (*

    The attributes for this field (not for its type)

    *)
  6. mutable floc : location;
    (*

    The location where this field is defined

    *)
}

Information about a struct/union field

Enumerations. Information about an enumeration. This is shared by all references to an enumeration. Make sure you have a GEnumTag for each of of these.

and enuminfo = {
  1. mutable ename : string;
    (*

    The name. Always non-empty.

    *)
  2. mutable eitems : (string * attributes * exp * location) list;
    (*

    Items with names and values. This list should be non-empty. The item values must be compile-time constants.

    *)
  3. mutable eattr : attributes;
    (*

    The attributes that are defined at the same time as the enumeration type. These attributes can be supplemented individually at each reference to this enuminfo using the TEnum type constructor.

    *)
  4. mutable ereferenced : bool;
    (*

    True if used. Initially set to false

    *)
  5. mutable ekind : ikind;
    (*

    The integer kind used to represent this enum. Per ANSI-C, this should always be IInt, but gcc allows other integer kinds

    *)
}

Information about an enumeration

and typeinfo = {
  1. mutable tname : string;
    (*

    The name. Can be empty only in a GType when introducing a composite or enumeration tag. If empty cannot be referred to from the file

    *)
  2. mutable ttype : typ;
    (*

    The actual type. This includes the attributes that were present in the typedef

    *)
  3. mutable treferenced : bool;
    (*

    True if used. Initially set to false

    *)
}

Information about a defined type

Variables. Each local or global variable is represented by a unique varinfo structure. A global varinfo can be introduced with the GVarDecl or GVar or GFun globals. A local varinfo can be introduced as part of a function definition fundec.

All references to a given global or local variable must refer to the same copy of the varinfo. Each varinfo has a globally unique identifier that can be used to index maps and hashtables (the name can also be used for this purpose, except for locals from different functions). This identifier is constructor using a global counter.

It is very important that you construct varinfo structures using only one of the following functions:

  • makeGlobalVar : to make a global variable
  • makeTempVar : to make a temporary local variable whose name will be generated so that to avoid conflict with other locals.
  • makeLocalVar : like makeTempVar but you can specify the exact name to be used.
  • copyVarinfo: make a shallow copy of a varinfo assigning a new name and a new unique identifier

A varinfo is also used in a function type to denote the list of formals.

and varinfo = {
  1. mutable vname : string;
    (*

    The name of the variable. Cannot be empty. It is primarily your responsibility to ensure the uniqueness of a variable name. For local variables makeTempVar helps you ensure that the name is unique.

    *)
  2. mutable vtype : typ;
    (*

    The declared type of the variable.

    *)
  3. mutable vattr : attributes;
    (*

    A list of attributes associated with the variable.

    *)
  4. mutable vstorage : storage;
    (*

    The storage-class

    *)
  5. mutable vglob : bool;
    (*

    True if this is a global variable

    *)
  6. mutable vinline : bool;
    (*

    Whether this varinfo is for an inline function.

    *)
  7. mutable vdecl : location;
    (*

    Location of variable declaration.

    *)
  8. vinit : initinfo;
    (*

    Optional initializer. Only used for static and global variables. Initializers for other types of local variables are turned into assignments. Not mutable because the init field in initinfo is mutable already.

    *)
  9. mutable vid : int;
    (*

    A unique integer identifier. This field will be set for you if you use one of the makeFormalVar, makeLocalVar, makeTempVar, makeGlobalVar, or copyVarinfo.

    *)
  10. mutable vaddrof : bool;
    (*

    True if the address of this variable is taken. CIL will set these flags when it parses C, but you should make sure to set the flag whenever your transformation create AddrOf expression.

    *)
  11. mutable vreferenced : bool;
    (*

    True if this variable is ever referenced. This is computed by RmUnused.removeUnused. It is safe to just initialize this to False

    *)
  12. mutable vdescr : Pretty.doc;
    (*

    For most temporary variables, a description of what the var holds. (e.g. for temporaries used for function call results, this string is a representation of the function call.)

    *)
  13. mutable vdescrpure : bool;
    (*

    Indicates whether the vdescr above is a pure expression or call. Printing a non-pure vdescr more than once may yield incorrect results.

    *)
  14. mutable vhasdeclinstruction : bool;
    (*

    Indicates whether a VarDecl instruction was generated for this variable. Only applies to local variables. Currently, this is relevant for when to print the declaration. If this is true, it might be incorrect to print the declaration at the beginning of the function, rather than where the VarDecl instruction is. This was introduced to handle VLAs.

    *)
}

Information about a variable.

and storage =
  1. | NoStorage
    (*

    The default storage. Nothing is printed

    *)
  2. | Static
  3. | Register
  4. | Extern

Storage-class information

Expressions. The CIL expression language contains only the side-effect free expressions of C. They are represented as the type exp. There are several interesting aspects of CIL expressions:

Integer and floating point constants can carry their textual representation. This way the integer 15 can be printed as 0xF if that is how it occurred in the source.

CIL uses 64 bits to represent the integer constants and also stores the width of the integer type. Care must be taken to ensure that the constant is representable with the given width. Use the functions kinteger, kinteger64 and integer to construct constant expressions. CIL predefines the constants zero, one and mone (for -1).

Use the function isConstant to test if an expression is a constant.

CIL keeps the type of all unary and binary expressions. You can think of that type qualifying the operator. Furthermore there are different operators for arithmetic and comparisons on arithmetic types and on pointers.

Another unusual aspect of CIL is that the implicit conversion between an expression of array type and one of pointer type is made explicit, using the StartOf expression constructor (which is not printed). If you apply the AddrOf}constructor to an lvalue of type T then you will be getting an expression of type TPtr(T).

You can find the type of an expression with typeOf.

You can perform constant folding on expressions using the function constFold.

and exp =
  1. | Const of constant
    (*

    Constant

    *)
  2. | Lval of lval
    (*

    Lvalue

    *)
  3. | SizeOf of typ
    (*

    sizeof(<type>). Has unsigned int type (ISO 6.5.3.4). This is not turned into a constant because some transformations might want to change types

    *)
  4. | Real of exp
    (*

    __real__(<expression>)

    *)
  5. | Imag of exp
    (*

    __imag__(<expression>)

    *)
  6. | SizeOfE of exp
    (*

    sizeof(<expression>)

    *)
  7. | SizeOfStr of string
    (*

    sizeof(string_literal). We separate this case out because this is the only instance in which a string literal should not be treated as having type pointer to character.

    *)
  8. | AlignOf of typ
    (*

    This corresponds to the GCC __alignof_. Has unsigned int type

    *)
  9. | AlignOfE of exp
  10. | UnOp of unop * exp * typ
    (*

    Unary operation. Includes the type of the result.

    *)
  11. | BinOp of binop * exp * exp * typ
    (*

    Binary operation. Includes the type of the result. The arithmetic conversions are made explicit for the arguments.

    *)
  12. | Question of exp * exp * exp * typ
    (*

    (a ? b : c) operation. Includes the type of the result

    *)
  13. | CastE of typ * exp
    (*

    Use mkCast to make casts.

    *)
  14. | AddrOf of lval
    (*

    Always use mkAddrOf to construct one of these. Apply to an lvalue of type T yields an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use.

    *)
  15. | AddrOfLabel of stmt Stdlib.ref
    (*

    The address of a label, using GCC's label-as-value extension. If you want to use these, you must set useComputedGoto.

    *)
  16. | StartOf of lval
    (*

    Conversion from an array to a pointer to the beginning of the array. Given an lval of type TArray(T) produces an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use. In C this operation is implicit, the StartOf operator is not printed. We have it in CIL because it makes the typing rules simpler.

    *)

Expressions (Side-effect free)

Constants.

and wstring_type =
  1. | Wchar_t
  2. | Char16_t
  3. | Char32_t
and encoding =
  1. | No_encoding
  2. | Utf8
and constant =
  1. | CInt of Cilint.cilint * ikind * string option
    (*

    Integer constant. Give the ikind (see ISO9899 6.1.3.2) and the textual representation, if available. (This allows us to print a constant as, for example, 0xF instead of 15.) Use integer or kinteger to create these.

    *)
  2. | CStr of string * encoding
    (*

    String constant. The escape characters inside the string have been already interpreted. This constant has pointer to character type! The only case when you would like a string literal to have an array type is when it is an argument to sizeof. In that case you should use SizeOfStr.

    *)
  3. | CWStr of int64 list * wstring_type
    (*

    Wide character string constant. Note that the local interpretation of such a literal depends on wcharType and wcharKind. Such a constant has type pointer to wcharType. The escape characters in the string have not been "interpreted" in the sense that L"A\xabcd" remains "A\xabcd" rather than being represented as the wide character list with two elements: 65 and 43981. That "interpretation" depends on the underlying wide character type.

    *)
  4. | CChr of char
    (*

    Character constant. This has type int, so use charConstToInt to read the value in case sign-extension is needed.

    *)
  5. | CReal of float * fkind * string option
    (*

    Floating point constant. Give the fkind (see ISO 6.4.4.2) and also the textual representation, if available.

    *)
  6. | CEnum of exp * string * enuminfo
    (*

    An enumeration constant with the given value, name, from the given enuminfo. This is used only if lowerConstants is true (default). Use constFoldVisitor to replace these with integer constants.

    *)

Literal constants

and unop =
  1. | Neg
    (*

    Unary minus

    *)
  2. | BNot
    (*

    Bitwise complement (~)

    *)
  3. | LNot
    (*

    Logical Not (!)

    *)

Unary operators

and binop =
  1. | PlusA
    (*

    arithmetic +

    *)
  2. | PlusPI
    (*

    pointer + integer

    *)
  3. | IndexPI
    (*

    pointer + integer but only when it arises from an expression e[i] when e is a pointer and not an array. This is semantically the same as PlusPI but CCured uses this as a hint that the integer is probably positive.

    *)
  4. | MinusA
    (*

    arithmetic -

    *)
  5. | MinusPI
    (*

    pointer - integer

    *)
  6. | MinusPP
    (*

    pointer - pointer

    *)
  7. | Mult
    (*

    *

    *)
  8. | Div
    (*

    /

    *)
  9. | Mod
    (*

    %

    *)
  10. | Shiftlt
    (*

    shift left

    *)
  11. | Shiftrt
    (*

    shift right

    *)
  12. | Lt
    (*

    < (arithmetic comparison)

    *)
  13. | Gt
    (*

    > (arithmetic comparison)

    *)
  14. | Le
    (*

    <= (arithmetic comparison)

    *)
  15. | Ge
    (*

    > (arithmetic comparison)

    *)
  16. | Eq
    (*

    == (arithmetic comparison)

    *)
  17. | Ne
    (*

    != (arithmetic comparison)

    *)
  18. | BAnd
    (*

    bitwise and

    *)
  19. | BXor
    (*

    exclusive-or

    *)
  20. | BOr
    (*

    inclusive-or

    *)
  21. | LAnd
    (*

    logical and. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

    *)
  22. | LOr
    (*

    logical or. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

    *)

Binary operations

and lval = lhost * offset

Lvalues. Lvalues are the sublanguage of expressions that can appear at the left of an assignment or as operand to the address-of operator. In C the syntax for lvalues is not always a good indication of the meaning of the lvalue. For example the C value

a[0][1][2]

might involve 1, 2 or 3 memory reads when used in an expression context, depending on the declared type of the variable a. If a has type int +Cil (goblint-cil.GoblintCil.Cil)

Module GoblintCil.Cil

CIL API Documentation.

val initCIL : unit -> unit

Call this function to perform some initialization.

val cilVersion : string

These are the CIL version numbers. A CIL version is a number of the form M.m.r (major, minor and release)

type cstd =
  1. | C90
  2. | C99
  3. | C11
val cstd_of_string : string -> cstd
val cstd : cstd Stdlib.ref
val gnu89inline : bool Stdlib.ref
val addReturnOnNoreturnFallthrough : bool Stdlib.ref

This module defines the abstract syntax of CIL. It also provides utility functions for traversing the CIL data structures, and pretty-printing them. The parser can be invoked as Frontc.parse: string -> unit -> file. This function must be given the name of a preprocessed C file and will return the top-level data structure that describes a whole source file. The parsing and elaboration into CIL is done as for GCC source.

The Abstract Syntax of CIL

The top-level representation of a CIL source file (and the result of the parsing and elaboration). Its main contents is the list of global declarations and definitions. You can iterate over the globals in a file using the following iterators: mapGlobals, iterGlobals and foldGlobals. You can also use the dummyFile when you need a file as a placeholder. For each global item CIL stores the source location where it appears (using the type location)

type file = {
  1. mutable fileName : string;
    (*

    The complete file name

    *)
  2. mutable globals : global list;
    (*

    List of globals as they will appear in the printed file

    *)
  3. mutable globinit : fundec option;
    (*

    An optional global initializer function. This is a function where you can put stuff that must be executed before the program is started. This function is conceptually at the end of the file, although it is not part of the globals list. Use getGlobInit to create/get one.

    *)
  4. mutable globinitcalled : bool;
    (*

    Whether the global initialization function is called in main. This should always be false if there is no global initializer. When you create a global initialization CIL will try to insert code in main to call it. This will not happen if your file does not contain a function called "main"

    *)
}

Top-level representation of a C source file

and comment = location * string

Globals. The main type for representing global declarations and definitions. A list of these form a CIL file. The order of globals in the file is generally important.

and global =
  1. | GType of typeinfo * location
    (*

    A typedef. All uses of type names (through the TNamed constructor) must be preceded in the file by a definition of the name. The string is the defined name and always not-empty.

    *)
  2. | GCompTag of compinfo * location
    (*

    Defines a struct/union tag with some fields. There must be one of these for each struct/union tag that you use (through the TComp constructor) since this is the only context in which the fields are printed. Consequently nested structure tag definitions must be broken into individual definitions with the innermost structure defined first.

    *)
  3. | GCompTagDecl of compinfo * location
    (*

    Declares a struct/union tag. Use as a forward declaration. This is printed without the fields.

    *)
  4. | GEnumTag of enuminfo * location
    (*

    Declares an enumeration tag with some fields. There must be one of these for each enumeration tag that you use (through the TEnum constructor) since this is the only context in which the items are printed.

    *)
  5. | GEnumTagDecl of enuminfo * location
    (*

    Declares an enumeration tag. Use as a forward declaration. This is printed without the items.

    *)
  6. | GVarDecl of varinfo * location
    (*

    A variable declaration (not a definition). If the variable has a function type then this is a prototype. There can be several declarations and at most one definition for a given variable. If both forms appear then they must share the same varinfo structure. A prototype shares the varinfo with the fundec of the definition. Either has storage Extern or there must be a definition in this file

    *)
  7. | GVar of varinfo * initinfo * location
    (*

    A variable definition. Can have an initializer. The initializer is updateable so that you can change it without requiring to recreate the list of globals. There can be at most one definition for a variable in an entire program. Cannot have storage Extern or function type. Note: the initializer field is kept for backwards compatibility, but it is now also available directly in the varinfo.

    *)
  8. | GFun of fundec * location
    (*

    A function definition.

    *)
  9. | GAsm of string * location
    (*

    Global asm statement. These ones can contain only a template

    *)
  10. | GPragma of attribute * location
    (*

    Pragmas at top level. Use the same syntax as attributes

    *)
  11. | GText of string
    (*

    Some text (printed verbatim) at top level. E.g., this way you can put comments in the output.

    *)

A global declaration or definition

Types. A C type is represented in CIL using the type typ. Among types we differentiate the integral types (with different kinds denoting the sign and precision), floating point types, enumeration types, array and pointer types, and function types. Every type is associated with a list of attributes, which are always kept in sorted order. Use addAttribute and addAttributes to construct list of attributes. If you want to inspect a type, you should use unrollType or unrollTypeDeep to see through the uses of named types.

CIL is configured at build-time with the sizes and alignments of the underlying compiler. CIL contains functions that can compute the size of a type (in bits) bitsSizeOf, the alignment of a type (in bytes) alignOf_int, and can convert an offset into a start and width (both in bits) using the function bitsOffset. At the moment these functions do not take into account the packed attributes and pragmas.

and typ =
  1. | TVoid of attributes
    (*

    Void type. Also predefined as voidType

    *)
  2. | TInt of ikind * attributes
    (*

    An integer type. The kind specifies the sign and width. Several useful variants are predefined as intType, uintType, longType, charType.

    *)
  3. | TFloat of fkind * attributes
    (*

    A floating-point type. The kind specifies the precision. You can also use the predefined constant doubleType.

    *)
  4. | TPtr of typ * attributes
    (*

    Pointer type. Several useful variants are predefined as charPtrType, charConstPtrType (pointer to a constant character), voidPtrType, intPtrType

    *)
  5. | TArray of typ * exp option * attributes
    (*

    Array type. It indicates the base type and the array length.

    *)
  6. | TFun of typ * (string * typ * attributes) list option * bool * attributes
    (*

    Function type. Indicates the type of the result, the name, type and name attributes of the formal arguments (None if no arguments were specified, as in a function whose definition or prototype we have not seen; Some [] means void). Use argsToList to obtain a list of arguments. The boolean indicates if it is a variable-argument function. If this is the type of a varinfo for which we have a function declaration then the information for the formals must match that in the function's sformals. Use setFormals, or setFunctionType, or makeFormalVar for this purpose.

    *)
  7. | TNamed of typeinfo * attributes
    (*

    The use of a named type. Each such type name must be preceded in the file by a GType global. This is printed as just the type name. The actual referred type is not printed here and is carried only to simplify processing. To see through a sequence of named type references, use unrollType or unrollTypeDeep. The attributes are in addition to those given when the type name was defined.

    *)
  8. | TComp of compinfo * attributes
    (*

    The most delicate issue for C types is that recursion that is possible by using structures and pointers. To address this issue we have a more complex representation for structured types (struct and union). Each such type is represented using the compinfo type. For each composite type the compinfo structure must be declared at top level using GCompTag and all references to it must share the same copy of the structure. The attributes given are those pertaining to this use of the type and are in addition to the attributes that were given at the definition of the type and which are stored in the compinfo.

    *)
  9. | TEnum of enuminfo * attributes
    (*

    A reference to an enumeration type. All such references must share the enuminfo among them and with a GEnumTag global that precedes all uses. The attributes refer to this use of the enumeration and are in addition to the attributes of the enumeration itself, which are stored inside the enuminfo

    *)
  10. | TBuiltin_va_list of attributes
    (*

    This is the same as the gcc's type with the same name

    *)

There are a number of functions for querying the kind of a type. These are isIntegralType, isArithmeticType, isPointerType, isScalarType, isFunctionType, isArrayType.

There are two easy ways to scan a type. First, you can use the existsType to return a boolean answer about a type. This function is controlled by a user-provided function that is queried for each type that is used to construct the current type. The function can specify whether to terminate the scan with a boolean result or to continue the scan for the nested types.

The other method for scanning types is provided by the visitor interface (see cilVisitor).

If you want to compare types (or to use them as hash-values) then you should use instead type signatures (represented as typsig). These contain the same information as types but canonicalized such that simple Ocaml structural equality will tell whether two types are equal. Use typeSig to compute the signature of a type. If you want to ignore certain type attributes then use typeSigWithAttrs.

and ikind =
  1. | IChar
    (*

    char

    *)
  2. | ISChar
    (*

    signed char

    *)
  3. | IUChar
    (*

    unsigned char

    *)
  4. | IBool
    (*

    _Bool (C99)

    *)
  5. | IInt
    (*

    int

    *)
  6. | IUInt
    (*

    unsigned int

    *)
  7. | IShort
    (*

    short

    *)
  8. | IUShort
    (*

    unsigned short

    *)
  9. | ILong
    (*

    long

    *)
  10. | IULong
    (*

    unsigned long

    *)
  11. | ILongLong
    (*

    long long (or _int64 on Microsoft Visual C)

    *)
  12. | IULongLong
    (*

    unsigned long long (or unsigned _int64 on Microsoft Visual C)

    *)
  13. | IInt128
    (*

    __int128

    *)
  14. | IUInt128
    (*

    unsigned __int128

    *)

Various kinds of integers

and fkind =
  1. | FFloat
    (*

    float

    *)
  2. | FDouble
    (*

    double

    *)
  3. | FLongDouble
    (*

    long double

    *)
  4. | FFloat128
    (*

    float128

    *)
  5. | FComplexFloat
    (*

    float _Complex

    *)
  6. | FComplexDouble
    (*

    double _Complex

    *)
  7. | FComplexLongDouble
    (*

    long double _Complex

    *)
  8. | FComplexFloat128
    (*

    _float128 _Complex

    *)

Various kinds of floating-point numbers

Attributes.

and attribute =
  1. | Attr of string * attrparam list
    (*

    An attribute has a name and some optional parameters. The name should not start or end with underscore. When CIL parses attribute names it will strip leading and ending underscores (to ensure that the multitude of GCC attributes such as const, __const and __const__ all mean the same thing.)

    *)
and attributes = attribute list

Attributes are lists sorted by the attribute name. Use the functions addAttribute and addAttributes to insert attributes in an attribute list and maintain the sortedness.

and attrparam =
  1. | AInt of int
    (*

    An integer constant

    *)
  2. | AStr of string
    (*

    A string constant

    *)
  3. | ACons of string * attrparam list
    (*

    Constructed attributes. These are printed foo(a1,a2,...,an). The list of parameters can be empty and in that case the parentheses are not printed.

    *)
  4. | ASizeOf of typ
    (*

    A way to talk about types

    *)
  5. | ASizeOfE of attrparam
  6. | ASizeOfS of typsig
    (*

    Replacement for ASizeOf in type signatures. Only used for attributes inside typsigs.

    *)
  7. | AAlignOf of typ
  8. | AAlignOfE of attrparam
  9. | AAlignOfS of typsig
  10. | AUnOp of unop * attrparam
  11. | ABinOp of binop * attrparam * attrparam
  12. | ADot of attrparam * string
    (*

    a.foo *

    *)
  13. | AStar of attrparam
    (*

    * a

    *)
  14. | AAddrOf of attrparam
    (*

    & a *

    *)
  15. | AIndex of attrparam * attrparam
    (*

    a1a2

    *)
  16. | AQuestion of attrparam * attrparam * attrparam
    (*

    a1 ? a2 : a3 *

    *)
  17. | AAssign of attrparam * attrparam
    (*

    a1 = a2

    *)

The type of parameters of attributes

Structures. The compinfo describes the definition of a structure or union type. Each such compinfo must be defined at the top-level using the GCompTag constructor and must be shared by all references to this type (using either the TComp type constructor or from the definition of the fields.

If all you need is to scan the definition of each composite type once, you can do that by scanning all top-level GCompTag.

Constructing a compinfo can be tricky since it must contain fields that might refer to the host compinfo and furthermore the type of the field might need to refer to the compinfo for recursive types. Use the mkCompInfo function to create a compinfo. You can easily fetch the fieldinfo for a given field in a structure with getCompField.

and compinfo = {
  1. mutable cstruct : bool;
    (*

    True if struct, False if union

    *)
  2. mutable cname : string;
    (*

    The name. Always non-empty. Use compFullName to get the full name of a comp (along with the struct or union)

    *)
  3. mutable ckey : int;
    (*

    A unique integer. This is assigned by mkCompInfo using a global variable in the Cil module. Thus two identical structs in two different files might have different keys. Use copyCompInfo to copy structures so that a new key is assigned.

    *)
  4. mutable cfields : fieldinfo list;
    (*

    Information about the fields. Notice that each fieldinfo has a pointer back to the host compinfo. This means that you should not share fieldinfo's between two compinfo's

    *)
  5. mutable cattr : attributes;
    (*

    The attributes that are defined at the same time as the composite type. These attributes can be supplemented individually at each reference to this compinfo using the TComp type constructor.

    *)
  6. mutable cdefined : bool;
    (*

    This boolean flag can be used to distinguish between structures that have not been defined and those that have been defined but have no fields (such things are allowed in gcc).

    *)
  7. mutable creferenced : bool;
    (*

    True if used. Initially set to false.

    *)
}

The definition of a structure or union type. Use mkCompInfo to make one and use copyCompInfo to copy one (this ensures that a new key is assigned and that the fields have the right pointers to parents.).

Structure fields. The fieldinfo structure is used to describe a structure or union field. Fields, just like variables, can have attributes associated with the field itself or associated with the type of the field (stored along with the type of the field).

and fieldinfo = {
  1. mutable fcomp : compinfo;
    (*

    The host structure that contains this field. There can be only one compinfo that contains the field.

    *)
  2. mutable fname : string;
    (*

    The name of the field. Might be the value of missingFieldName in which case it must be a bitfield and is not printed and it does not participate in initialization

    *)
  3. mutable ftype : typ;
    (*

    The type

    *)
  4. mutable fbitfield : int option;
    (*

    If a bitfield then ftype should be an integer type and the width of the bitfield must be 0 or a positive integer smaller or equal to the width of the integer type. A field of width 0 is used in C to control the alignment of fields.

    *)
  5. mutable fattr : attributes;
    (*

    The attributes for this field (not for its type)

    *)
  6. mutable floc : location;
    (*

    The location where this field is defined

    *)
}

Information about a struct/union field

Enumerations. Information about an enumeration. This is shared by all references to an enumeration. Make sure you have a GEnumTag for each of of these.

and enuminfo = {
  1. mutable ename : string;
    (*

    The name. Always non-empty.

    *)
  2. mutable eitems : (string * attributes * exp * location) list;
    (*

    Items with names and values. This list should be non-empty. The item values must be compile-time constants.

    *)
  3. mutable eattr : attributes;
    (*

    The attributes that are defined at the same time as the enumeration type. These attributes can be supplemented individually at each reference to this enuminfo using the TEnum type constructor.

    *)
  4. mutable ereferenced : bool;
    (*

    True if used. Initially set to false

    *)
  5. mutable ekind : ikind;
    (*

    The integer kind used to represent this enum. Per ANSI-C, this should always be IInt, but gcc allows other integer kinds

    *)
}

Information about an enumeration

and typeinfo = {
  1. mutable tname : string;
    (*

    The name. Can be empty only in a GType when introducing a composite or enumeration tag. If empty cannot be referred to from the file

    *)
  2. mutable ttype : typ;
    (*

    The actual type. This includes the attributes that were present in the typedef

    *)
  3. mutable treferenced : bool;
    (*

    True if used. Initially set to false

    *)
}

Information about a defined type

Variables. Each local or global variable is represented by a unique varinfo structure. A global varinfo can be introduced with the GVarDecl or GVar or GFun globals. A local varinfo can be introduced as part of a function definition fundec.

All references to a given global or local variable must refer to the same copy of the varinfo. Each varinfo has a globally unique identifier that can be used to index maps and hashtables (the name can also be used for this purpose, except for locals from different functions). This identifier is constructor using a global counter.

It is very important that you construct varinfo structures using only one of the following functions:

  • makeGlobalVar : to make a global variable
  • makeTempVar : to make a temporary local variable whose name will be generated so that to avoid conflict with other locals.
  • makeLocalVar : like makeTempVar but you can specify the exact name to be used.
  • copyVarinfo: make a shallow copy of a varinfo assigning a new name and a new unique identifier

A varinfo is also used in a function type to denote the list of formals.

and varinfo = {
  1. mutable vname : string;
    (*

    The name of the variable. Cannot be empty. It is primarily your responsibility to ensure the uniqueness of a variable name. For local variables makeTempVar helps you ensure that the name is unique.

    *)
  2. mutable vtype : typ;
    (*

    The declared type of the variable.

    *)
  3. mutable vattr : attributes;
    (*

    A list of attributes associated with the variable.

    *)
  4. mutable vstorage : storage;
    (*

    The storage-class

    *)
  5. mutable vglob : bool;
    (*

    True if this is a global variable

    *)
  6. mutable vinline : bool;
    (*

    Whether this varinfo is for an inline function.

    *)
  7. mutable vdecl : location;
    (*

    Location of variable declaration.

    *)
  8. vinit : initinfo;
    (*

    Optional initializer. Only used for static and global variables. Initializers for other types of local variables are turned into assignments. Not mutable because the init field in initinfo is mutable already.

    *)
  9. mutable vid : int;
    (*

    A unique integer identifier. This field will be set for you if you use one of the makeFormalVar, makeLocalVar, makeTempVar, makeGlobalVar, or copyVarinfo.

    *)
  10. mutable vaddrof : bool;
    (*

    True if the address of this variable is taken. CIL will set these flags when it parses C, but you should make sure to set the flag whenever your transformation create AddrOf expression.

    *)
  11. mutable vreferenced : bool;
    (*

    True if this variable is ever referenced. This is computed by RmUnused.removeUnused. It is safe to just initialize this to False

    *)
  12. mutable vdescr : Pretty.doc;
    (*

    For most temporary variables, a description of what the var holds. (e.g. for temporaries used for function call results, this string is a representation of the function call.)

    *)
  13. mutable vdescrpure : bool;
    (*

    Indicates whether the vdescr above is a pure expression or call. Printing a non-pure vdescr more than once may yield incorrect results.

    *)
  14. mutable vhasdeclinstruction : bool;
    (*

    Indicates whether a VarDecl instruction was generated for this variable. Only applies to local variables. Currently, this is relevant for when to print the declaration. If this is true, it might be incorrect to print the declaration at the beginning of the function, rather than where the VarDecl instruction is. This was introduced to handle VLAs.

    *)
}

Information about a variable.

and storage =
  1. | NoStorage
    (*

    The default storage. Nothing is printed

    *)
  2. | Static
  3. | Register
  4. | Extern

Storage-class information

Expressions. The CIL expression language contains only the side-effect free expressions of C. They are represented as the type exp. There are several interesting aspects of CIL expressions:

Integer and floating point constants can carry their textual representation. This way the integer 15 can be printed as 0xF if that is how it occurred in the source.

CIL uses 64 bits to represent the integer constants and also stores the width of the integer type. Care must be taken to ensure that the constant is representable with the given width. Use the functions kinteger, kinteger64 and integer to construct constant expressions. CIL predefines the constants zero, one and mone (for -1).

Use the function isConstant to test if an expression is a constant.

CIL keeps the type of all unary and binary expressions. You can think of that type qualifying the operator. Furthermore there are different operators for arithmetic and comparisons on arithmetic types and on pointers.

Another unusual aspect of CIL is that the implicit conversion between an expression of array type and one of pointer type is made explicit, using the StartOf expression constructor (which is not printed). If you apply the AddrOf}constructor to an lvalue of type T then you will be getting an expression of type TPtr(T).

You can find the type of an expression with typeOf.

You can perform constant folding on expressions using the function constFold.

and exp =
  1. | Const of constant
    (*

    Constant

    *)
  2. | Lval of lval
    (*

    Lvalue

    *)
  3. | SizeOf of typ
    (*

    sizeof(<type>). Has unsigned int type (ISO 6.5.3.4). This is not turned into a constant because some transformations might want to change types

    *)
  4. | Real of exp
    (*

    __real__(<expression>)

    *)
  5. | Imag of exp
    (*

    __imag__(<expression>)

    *)
  6. | SizeOfE of exp
    (*

    sizeof(<expression>)

    *)
  7. | SizeOfStr of string
    (*

    sizeof(string_literal). We separate this case out because this is the only instance in which a string literal should not be treated as having type pointer to character.

    *)
  8. | AlignOf of typ
    (*

    This corresponds to the GCC __alignof_. Has unsigned int type

    *)
  9. | AlignOfE of exp
  10. | UnOp of unop * exp * typ
    (*

    Unary operation. Includes the type of the result.

    *)
  11. | BinOp of binop * exp * exp * typ
    (*

    Binary operation. Includes the type of the result. The arithmetic conversions are made explicit for the arguments.

    *)
  12. | Question of exp * exp * exp * typ
    (*

    (a ? b : c) operation. Includes the type of the result

    *)
  13. | CastE of typ * exp
    (*

    Use mkCast to make casts.

    *)
  14. | AddrOf of lval
    (*

    Always use mkAddrOf to construct one of these. Apply to an lvalue of type T yields an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use.

    *)
  15. | AddrOfLabel of stmt Stdlib.ref
    (*

    The address of a label, using GCC's label-as-value extension. If you want to use these, you must set useComputedGoto.

    *)
  16. | StartOf of lval
    (*

    Conversion from an array to a pointer to the beginning of the array. Given an lval of type TArray(T) produces an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use. In C this operation is implicit, the StartOf operator is not printed. We have it in CIL because it makes the typing rules simpler.

    *)

Expressions (Side-effect free)

Constants.

and wstring_type =
  1. | Wchar_t
  2. | Char16_t
  3. | Char32_t
and encoding =
  1. | No_encoding
  2. | Utf8
and constant =
  1. | CInt of Cilint.cilint * ikind * string option
    (*

    Integer constant. Give the ikind (see ISO9899 6.1.3.2) and the textual representation, if available. (This allows us to print a constant as, for example, 0xF instead of 15.) Use integer or kinteger to create these.

    *)
  2. | CStr of string * encoding
    (*

    String constant. The escape characters inside the string have been already interpreted. This constant has pointer to character type! The only case when you would like a string literal to have an array type is when it is an argument to sizeof. In that case you should use SizeOfStr.

    *)
  3. | CWStr of int64 list * wstring_type
    (*

    Wide character string constant. Note that the local interpretation of such a literal depends on wcharType and wcharKind. Such a constant has type pointer to wcharType. The escape characters in the string have not been "interpreted" in the sense that L"A\xabcd" remains "A\xabcd" rather than being represented as the wide character list with two elements: 65 and 43981. That "interpretation" depends on the underlying wide character type.

    *)
  4. | CChr of char
    (*

    Character constant. This has type int, so use charConstToInt to read the value in case sign-extension is needed.

    *)
  5. | CReal of float * fkind * string option
    (*

    Floating point constant. Give the fkind (see ISO 6.4.4.2) and also the textual representation, if available.

    *)
  6. | CEnum of exp * string * enuminfo
    (*

    An enumeration constant with the given value, name, from the given enuminfo. This is used only if lowerConstants is true (default). Use constFoldVisitor to replace these with integer constants.

    *)

Literal constants

and unop =
  1. | Neg
    (*

    Unary minus

    *)
  2. | BNot
    (*

    Bitwise complement (~)

    *)
  3. | LNot
    (*

    Logical Not (!)

    *)

Unary operators

and binop =
  1. | PlusA
    (*

    arithmetic +

    *)
  2. | PlusPI
    (*

    pointer + integer

    *)
  3. | IndexPI
    (*

    pointer + integer but only when it arises from an expression e[i] when e is a pointer and not an array. This is semantically the same as PlusPI but CCured uses this as a hint that the integer is probably positive.

    *)
  4. | MinusA
    (*

    arithmetic -

    *)
  5. | MinusPI
    (*

    pointer - integer

    *)
  6. | MinusPP
    (*

    pointer - pointer

    *)
  7. | Mult
    (*

    *

    *)
  8. | Div
    (*

    /

    *)
  9. | Mod
    (*

    %

    *)
  10. | Shiftlt
    (*

    shift left

    *)
  11. | Shiftrt
    (*

    shift right

    *)
  12. | Lt
    (*

    < (arithmetic comparison)

    *)
  13. | Gt
    (*

    > (arithmetic comparison)

    *)
  14. | Le
    (*

    <= (arithmetic comparison)

    *)
  15. | Ge
    (*

    > (arithmetic comparison)

    *)
  16. | Eq
    (*

    == (arithmetic comparison)

    *)
  17. | Ne
    (*

    != (arithmetic comparison)

    *)
  18. | BAnd
    (*

    bitwise and

    *)
  19. | BXor
    (*

    exclusive-or

    *)
  20. | BOr
    (*

    inclusive-or

    *)
  21. | LAnd
    (*

    logical and. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

    *)
  22. | LOr
    (*

    logical or. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

    *)

Binary operations

and lval = lhost * offset

Lvalues. Lvalues are the sublanguage of expressions that can appear at the left of an assignment or as operand to the address-of operator. In C the syntax for lvalues is not always a good indication of the meaning of the lvalue. For example the C value

a[0][1][2]

might involve 1, 2 or 3 memory reads when used in an expression context, depending on the declared type of the variable a. If a has type int [4][4][4] then we have one memory read from somewhere inside the area that stores the array a. On the other hand if a has type int *** then the expression really means * ( * ( * (a + 0) + 1) + 2), in which case it is clear that it involves three separate memory operations.

An lvalue denotes the contents of a range of memory addresses. This range is denoted as a host object along with an offset within the object. The host object can be of two kinds: a local or global variable, or an object whose address is in a pointer expression. We distinguish the two cases so that we can tell quickly whether we are accessing some component of a variable directly or we are accessing a memory location through a pointer. To make it easy to tell what an lvalue means CIL represents lvalues as a host object and an offset (see lval). The host object (represented as lhost) can be a local or global variable or can be the object pointed-to by a pointer expression. The offset (represented as offset) is a sequence of field or array index designators.

Both the typing rules and the meaning of an lvalue is very precisely specified in CIL.

The following are a few useful function for operating on lvalues:

The following equivalences hold

Mem(AddrOf(Mem a, aoff)), off   = Mem a, aoff + off
 Mem(AddrOf(Var v, aoff)), off   = Var v, aoff + off
 AddrOf (Mem a, NoOffset)        = a
and lhost =
  1. | Var of varinfo
    (*

    The host is a variable.

    *)
  2. | Mem of exp
    (*

    The host is an object of type T when the expression has pointer TPtr(T).

    *)

The host part of an lval.

and offset =
  1. | NoOffset
    (*

    No offset. Can be applied to any lvalue and does not change either the starting address or the type. This is used when the lval consists of just a host or as a terminator in a list of other kinds of offsets.

    *)
  2. | Field of fieldinfo * offset
    (*

    A field offset. Can be applied only to an lvalue that denotes a structure or a union that contains the mentioned field. This advances the offset to the beginning of the mentioned field and changes the type to the type of the mentioned field.

    *)
  3. | Index of exp * offset
    (*

    An array index offset. Can be applied only to an lvalue that denotes an array. This advances the starting address of the lval to the beginning of the mentioned array element and changes the denoted type to be the type of the array element

    *)

The offset part of an lval. Each offset can be applied to certain kinds of lvalues and its effect is that it advances the starting address of the lvalue and changes the denoted type, essentially focusing to some smaller lvalue that is contained in the original one.

and init =
  1. | SingleInit of exp
    (*

    A single initializer

    *)
  2. | CompoundInit of typ * (offset * init) list
    (*

    Used only for initializers of structures, unions and arrays. The offsets are all of the form Field(f, NoOffset) or Index(i, diff --git a/api/goblint-cil/GoblintCil/Cilint/index.html b/api/goblint-cil/GoblintCil/Cilint/index.html index 5834d9b5e..bec2c52d6 100644 --- a/api/goblint-cil/GoblintCil/Cilint/index.html +++ b/api/goblint-cil/GoblintCil/Cilint/index.html @@ -1,2 +1,2 @@ -Cilint (goblint-cil.GoblintCil.Cilint)

    Module GoblintCil.Cilint

    type cilint = Big_int_Z.big_int

    The cilint type is public and not just big_int to make life with ocamldebug easier. Please do not rely on this representation, use the ..._of_cilint functions to get at a cilint's value.

    val zero_cilint : cilint

    0 as a cilint

    val one_cilint : cilint

    1 as a cilint

    val mone_cilint : cilint

    -1 as a cilint

    type truncation =
    1. | NoTruncation
    2. | ValueTruncation
    3. | BitTruncation

    Result type for truncate_... functions

    val truncate_signed_cilint : cilint -> int -> cilint * truncation

    Truncate a cilint to an n-bit, signed 2's complement integer. Returns the truncated value, and an indication of the loss of precision. NoTruncation means the truncated value = original value. ValueTruncation means that truncated value <> original value, but the original value was between -2^(n-1) and (2^n)-1, so no "interesting" (not all-0 or all-1) bits were lost. If neither condition holds, the result is BitTruncation.

    val truncate_unsigned_cilint : cilint -> int -> cilint * truncation

    Truncate a cilint to an n-bit, unsigned integer. Returns the truncated value, and an indication of the loss of precision. NoTruncation means the truncated value = original value. ValueTruncation means that truncated value <> original value, but the original value was between -2^(n-1) and (2^n)-1, so no "interesting" (not all-0 or all-1) bits were lost. If neither condition holds, the result is BitTruncation.

    val neg_cilint : cilint -> cilint

    Negate a cilint

    val add_cilint : cilint -> cilint -> cilint

    Add two cilints

    val sub_cilint : cilint -> cilint -> cilint

    Subtract two cilints

    val mul_cilint : cilint -> cilint -> cilint

    Multiply two cilints

    val div_cilint : cilint -> cilint -> cilint

    Divide two cilints, rounding down

    val mod_cilint : cilint -> cilint -> cilint

    Remainder for div_cilint

    val div0_cilint : cilint -> cilint -> cilint

    Divide two cilints, rounding towards zero

    val rem_cilint : cilint -> cilint -> cilint

    Remainder for div0_cilint

    val lognot_cilint : cilint -> cilint

    Bitwise-not a cilint

    val logand_cilint : cilint -> cilint -> cilint

    Bitwise-and of two cilints

    val logor_cilint : cilint -> cilint -> cilint

    Bitwise-or of two cilints

    val logxor_cilint : cilint -> cilint -> cilint

    Bitwise-xor of two cilints

    val shift_left_cilint : cilint -> int -> cilint

    Left-shift a cilint

    val shift_right_cilint : cilint -> int -> cilint

    Right-shift a cilint. Note that there's no shift_right_logical_cilint as that makes no sense on an infinite precision 2's complement integer

    val int_of_cilint : cilint -> int

    Return the cilint's value as an integer, or raise Failure if the value doesn't fit in an int

    val int64_of_cilint : cilint -> int64

    Return the low-order 64-bits of cilint's value as an int64. Note that this never fails.

    val big_int_of_cilint : cilint -> Big_int_Z.big_int

    Return the cilint's value as a big_int

    val string_of_cilint : cilint -> string

    Return the cilint's value as a string

    val cilint_of_int : int -> cilint

    Make a cilint from an int

    val cilint_of_int64 : int64 -> cilint

    Make a cilint from an int64

    val cilint_of_big_int : Big_int_Z.big_int -> cilint

    Make a cilint from a big_int

    val cilint_of_string : string -> cilint

    Make a cilint from a string

    val is_zero_cilint : cilint -> bool

    Return true if the cilint is 0

    val compare_cilint : cilint -> cilint -> int

    ordering function for two cilints

    val is_int_cilint : cilint -> bool

    Return true if the cilint's value is representable in an int

    +Cilint (goblint-cil.GoblintCil.Cilint)

    Module GoblintCil.Cilint

    type cilint = Big_int_Z.big_int

    The cilint type is public and not just big_int to make life with ocamldebug easier. Please do not rely on this representation, use the ..._of_cilint functions to get at a cilint's value.

    val zero_cilint : cilint

    0 as a cilint

    val one_cilint : cilint

    1 as a cilint

    val mone_cilint : cilint

    -1 as a cilint

    type truncation =
    1. | NoTruncation
    2. | ValueTruncation
    3. | BitTruncation

    Result type for truncate_... functions

    val truncate_signed_cilint : cilint -> int -> cilint * truncation

    Truncate a cilint to an n-bit, signed 2's complement integer. Returns the truncated value, and an indication of the loss of precision. NoTruncation means the truncated value = original value. ValueTruncation means that truncated value <> original value, but the original value was between -2^(n-1) and (2^n)-1, so no "interesting" (not all-0 or all-1) bits were lost. If neither condition holds, the result is BitTruncation.

    val truncate_unsigned_cilint : cilint -> int -> cilint * truncation

    Truncate a cilint to an n-bit, unsigned integer. Returns the truncated value, and an indication of the loss of precision. NoTruncation means the truncated value = original value. ValueTruncation means that truncated value <> original value, but the original value was between -2^(n-1) and (2^n)-1, so no "interesting" (not all-0 or all-1) bits were lost. If neither condition holds, the result is BitTruncation.

    val neg_cilint : cilint -> cilint

    Negate a cilint

    val add_cilint : cilint -> cilint -> cilint

    Add two cilints

    val sub_cilint : cilint -> cilint -> cilint

    Subtract two cilints

    val mul_cilint : cilint -> cilint -> cilint

    Multiply two cilints

    val div_cilint : cilint -> cilint -> cilint

    Divide two cilints, rounding down

    val mod_cilint : cilint -> cilint -> cilint

    Remainder for div_cilint

    val div0_cilint : cilint -> cilint -> cilint

    Divide two cilints, rounding towards zero

    val rem_cilint : cilint -> cilint -> cilint

    Remainder for div0_cilint

    val lognot_cilint : cilint -> cilint

    Bitwise-not a cilint

    val logand_cilint : cilint -> cilint -> cilint

    Bitwise-and of two cilints

    val logor_cilint : cilint -> cilint -> cilint

    Bitwise-or of two cilints

    val logxor_cilint : cilint -> cilint -> cilint

    Bitwise-xor of two cilints

    val shift_left_cilint : cilint -> int -> cilint

    Left-shift a cilint

    val shift_right_cilint : cilint -> int -> cilint

    Right-shift a cilint. Note that there's no shift_right_logical_cilint as that makes no sense on an infinite precision 2's complement integer

    val int_of_cilint : cilint -> int

    Return the cilint's value as an integer, or raise Failure if the value doesn't fit in an int

    val int64_of_cilint : cilint -> int64

    Return the low-order 64-bits of cilint's value as an int64. Note that this never fails.

    val big_int_of_cilint : cilint -> Big_int_Z.big_int

    Return the cilint's value as a big_int

    val string_of_cilint : cilint -> string

    Return the cilint's value as a string

    val cilint_of_int : int -> cilint

    Make a cilint from an int

    val cilint_of_int64 : int64 -> cilint

    Make a cilint from an int64

    val cilint_of_big_int : Big_int_Z.big_int -> cilint

    Make a cilint from a big_int

    val cilint_of_string : string -> cilint

    Make a cilint from a string

    val is_zero_cilint : cilint -> bool

    Return true if the cilint is 0

    val compare_cilint : cilint -> cilint -> int

    ordering function for two cilints

    val is_int_cilint : cilint -> bool

    Return true if the cilint's value is representable in an int

    diff --git a/api/goblint-cil/GoblintCil/Cillower/index.html b/api/goblint-cil/GoblintCil/Cillower/index.html index 58cbf56d5..a63ceaf66 100644 --- a/api/goblint-cil/GoblintCil/Cillower/index.html +++ b/api/goblint-cil/GoblintCil/Cillower/index.html @@ -1,2 +1,2 @@ -Cillower (goblint-cil.GoblintCil.Cillower)

    Module GoblintCil.Cillower

    A number of lowering passes over CIL

    val lowerEnumVisitor : Cil.cilVisitor

    Replace enumeration constants with integer constants

    +Cillower (goblint-cil.GoblintCil.Cillower)

    Module GoblintCil.Cillower

    A number of lowering passes over CIL

    val lowerEnumVisitor : Cil.cilVisitor

    Replace enumeration constants with integer constants

    diff --git a/api/goblint-cil/GoblintCil/Ciltools/class-attribute_checker/index.html b/api/goblint-cil/GoblintCil/Ciltools/class-attribute_checker/index.html index 96b3c924b..ffdaff199 100644 --- a/api/goblint-cil/GoblintCil/Ciltools/class-attribute_checker/index.html +++ b/api/goblint-cil/GoblintCil/Ciltools/class-attribute_checker/index.html @@ -1,4 +1,4 @@ -attribute_checker (goblint-cil.GoblintCil.Ciltools.attribute_checker)

    Class Ciltools.attribute_checker

    inherit GoblintCil__.Cil.nopCilVisitor
    method vtype : GoblintCil__.Cil.typ -> +attribute_checker (goblint-cil.GoblintCil.Ciltools.attribute_checker)

    Class Ciltools.attribute_checker

    inherit GoblintCil__.Cil.nopCilVisitor
    method vtype : GoblintCil__.Cil.typ -> GoblintCil__.Cil.typ GoblintCil__.Cil.visitAction
    method vattr : GoblintCil__.Cil.attribute -> GoblintCil__.Cil.attribute list GoblintCil__.Cil.visitAction
    diff --git a/api/goblint-cil/GoblintCil/Ciltools/class-callBBVisitor/index.html b/api/goblint-cil/GoblintCil/Ciltools/class-callBBVisitor/index.html index ac935a538..6a283b78b 100644 --- a/api/goblint-cil/GoblintCil/Ciltools/class-callBBVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Ciltools/class-callBBVisitor/index.html @@ -1,5 +1,5 @@ -callBBVisitor (goblint-cil.GoblintCil.Ciltools.callBBVisitor)

    Class Ciltools.callBBVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    method vstmt : GoblintCil__.Cil.stmt -> +callBBVisitor (goblint-cil.GoblintCil.Ciltools.callBBVisitor)

    Class Ciltools.callBBVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    method vstmt : GoblintCil__.Cil.stmt -> GoblintCil__.Cil.stmt GoblintCil__.Cil.visitAction
    method vvdec : GoblintCil__.Cil.varinfo -> GoblintCil__.Cil.varinfo GoblintCil__.Cil.visitAction
    method vexpr : GoblintCil__.Cil.exp -> GoblintCil__.Cil.exp GoblintCil__.Cil.visitAction
    method vlval : GoblintCil__.Cil.lval -> diff --git a/api/goblint-cil/GoblintCil/Ciltools/class-sidVisitor/index.html b/api/goblint-cil/GoblintCil/Ciltools/class-sidVisitor/index.html index ad7fea819..6d66d9649 100644 --- a/api/goblint-cil/GoblintCil/Ciltools/class-sidVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Ciltools/class-sidVisitor/index.html @@ -1,3 +1,3 @@ -sidVisitor (goblint-cil.GoblintCil.Ciltools.sidVisitor)

    Class Ciltools.sidVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    val count : int Stdlib.ref
    method vstmt : GoblintCil__.Cil.stmt -> +sidVisitor (goblint-cil.GoblintCil.Ciltools.sidVisitor)

    Class Ciltools.sidVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    val count : int Stdlib.ref
    method vstmt : GoblintCil__.Cil.stmt -> GoblintCil__.Cil.stmt GoblintCil__.Cil.visitAction
    diff --git a/api/goblint-cil/GoblintCil/Ciltools/class-vidVisitor/index.html b/api/goblint-cil/GoblintCil/Ciltools/class-vidVisitor/index.html index ba30f9eba..8402630cf 100644 --- a/api/goblint-cil/GoblintCil/Ciltools/class-vidVisitor/index.html +++ b/api/goblint-cil/GoblintCil/Ciltools/class-vidVisitor/index.html @@ -1,3 +1,3 @@ -vidVisitor (goblint-cil.GoblintCil.Ciltools.vidVisitor)

    Class Ciltools.vidVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    val count : int Stdlib.ref
    method vvdec : GoblintCil__.Cil.varinfo -> +vidVisitor (goblint-cil.GoblintCil.Ciltools.vidVisitor)

    Class Ciltools.vidVisitor

    inherit GoblintCil__.Cil.nopCilVisitor
    val count : int Stdlib.ref
    method vvdec : GoblintCil__.Cil.varinfo -> GoblintCil__.Cil.varinfo GoblintCil__.Cil.visitAction
    diff --git a/api/goblint-cil/GoblintCil/Ciltools/index.html b/api/goblint-cil/GoblintCil/Ciltools/index.html index aae066d06..ffe5a9409 100644 --- a/api/goblint-cil/GoblintCil/Ciltools/index.html +++ b/api/goblint-cil/GoblintCil/Ciltools/index.html @@ -1,2 +1,2 @@ -Ciltools (goblint-cil.GoblintCil.Ciltools)

    Module GoblintCil.Ciltools

    val isOne : Cil.exp -> bool
    val is_volatile_tp : Cil.typ -> bool
    val is_volatile_vi : Cil.varinfo -> bool
    type sign =
    1. | Signed
    2. | Unsigned
    exception Not_an_integer
    val unbox_int_type : Cil.typ -> int * sign
    exception Weird_bitwidth
    val ocaml_int_to_cil : int64 -> int -> sign -> Cil.exp
    val isCompositeType : Cil.typ -> bool
    val visited : string list Stdlib.ref

    START OF deepHasAttribute ***********************************************

    class attribute_checker : string -> bool Stdlib.ref -> object ... end
    val deepHasAttribute : string -> Cil.typ -> bool

    END OF deepHasAttribute *************************************************

    Stuff from ptranal, slightly modified ***********************************

    class callBBVisitor : object ... end
    val one_instruction_per_statement : Cil.file -> unit
    class vidVisitor : object ... end
    val globally_unique_vids : Cil.file -> unit

    End of stuff from ptranal ***********************************************

    class sidVisitor : object ... end
    val globally_unique_sids : Cil.file -> unit

    Comparing expressions without a Out_of_memory error *********************

    val compare_exp : 'a -> 'a -> int
    +Ciltools (goblint-cil.GoblintCil.Ciltools)

    Module GoblintCil.Ciltools

    val isOne : Cil.exp -> bool
    val is_volatile_tp : Cil.typ -> bool
    val is_volatile_vi : Cil.varinfo -> bool
    type sign =
    1. | Signed
    2. | Unsigned
    exception Not_an_integer
    val unbox_int_type : Cil.typ -> int * sign
    exception Weird_bitwidth
    val ocaml_int_to_cil : int64 -> int -> sign -> Cil.exp
    val isCompositeType : Cil.typ -> bool
    val visited : string list Stdlib.ref

    START OF deepHasAttribute ***********************************************

    class attribute_checker : string -> bool Stdlib.ref -> object ... end
    val deepHasAttribute : string -> Cil.typ -> bool

    END OF deepHasAttribute *************************************************

    Stuff from ptranal, slightly modified ***********************************

    class callBBVisitor : object ... end
    val one_instruction_per_statement : Cil.file -> unit
    class vidVisitor : object ... end
    val globally_unique_vids : Cil.file -> unit

    End of stuff from ptranal ***********************************************

    class sidVisitor : object ... end
    val globally_unique_sids : Cil.file -> unit

    Comparing expressions without a Out_of_memory error *********************

    val compare_exp : 'a -> 'a -> int
    diff --git a/api/goblint-cil/GoblintCil/Cilutil/index.html b/api/goblint-cil/GoblintCil/Cilutil/index.html index b66ebd215..37b12d0cc 100644 --- a/api/goblint-cil/GoblintCil/Cilutil/index.html +++ b/api/goblint-cil/GoblintCil/Cilutil/index.html @@ -1,2 +1,2 @@ -Cilutil (goblint-cil.GoblintCil.Cilutil)

    Module GoblintCil.Cilutil

    val doCheck : bool Stdlib.ref
    val strictChecking : bool Stdlib.ref
    val printStats : bool Stdlib.ref
    val sliceGlobal : bool Stdlib.ref
    val printStages : bool Stdlib.ref
    +Cilutil (goblint-cil.GoblintCil.Cilutil)

    Module GoblintCil.Cilutil

    val doCheck : bool Stdlib.ref
    val strictChecking : bool Stdlib.ref
    val printStats : bool Stdlib.ref
    val sliceGlobal : bool Stdlib.ref
    val printStages : bool Stdlib.ref
    diff --git a/api/goblint-cil/GoblintCil/Cprint/index.html b/api/goblint-cil/GoblintCil/Cprint/index.html index 9a0f51448..fb4a5879a 100644 --- a/api/goblint-cil/GoblintCil/Cprint/index.html +++ b/api/goblint-cil/GoblintCil/Cprint/index.html @@ -1,2 +1,2 @@ -Cprint (goblint-cil.GoblintCil.Cprint)

    Module GoblintCil.Cprint

    val version : string
    val printLn : bool Stdlib.ref
    val printLnComment : bool Stdlib.ref
    val printCounters : bool Stdlib.ref
    val printComments : bool Stdlib.ref
    val width : int Stdlib.ref
    val tab : int Stdlib.ref
    val max_indent : int Stdlib.ref
    val line : string Stdlib.ref
    val line_len : int Stdlib.ref
    val current : string Stdlib.ref
    val current_len : int Stdlib.ref
    val spaces : int Stdlib.ref
    val follow : int Stdlib.ref
    val roll : int Stdlib.ref
    val new_line : unit -> unit
    val space : unit -> unit
    val indent : unit -> unit
    val unindent : unit -> unit
    val force_new_line : unit -> unit
    val flush : unit -> unit
    val commit : unit -> unit
    val print_unescaped_string : string -> unit
    val print_list : (unit -> unit) -> ('a -> unit) -> 'a list -> unit
    val print_commas : bool -> ('a -> unit) -> 'a list -> unit
    val print_string : string -> unit
    val print_wstring : int64 list -> Cabs.wchar_type -> unit
    val print_specifiers : Cabs.specifier -> unit
    val print_type_spec : Cabs.typeSpecifier -> unit
    val print_struct_name_attr : string -> string -> Cabs.attribute list -> unit
    val print_decl : string -> Cabs.decl_type -> unit
    val print_fields : Cabs.field_group list -> unit
    val print_enum_items : Cabs.enum_item list -> unit
    val print_onlytype : (Cabs.specifier * Cabs.decl_type) -> unit
    val print_name : Cabs.name -> unit
    val print_init_name : Cabs.init_name -> unit
    val print_name_group : Cabs.name_group -> unit
    val print_field_group : Cabs.field_group -> unit
    val print_field : (Cabs.name * Cabs.expression option) -> unit
    val print_init_name_group : Cabs.init_name_group -> unit
    val print_single_name : Cabs.single_name -> unit
    val print_params : Cabs.single_name list -> bool -> unit
    val print_old_params : string list -> bool -> unit
    val get_operator : Cabs.expression -> string * int
    val print_comma_exps : Cabs.expression list -> unit
    val print_init_expression : Cabs.init_expression -> unit
    val print_expression : Cabs.expression -> unit
    val print_expression_level : int -> Cabs.expression -> unit
    val print_statement : Cabs.statement -> unit
    val print_block : Cabs.block -> unit
    val print_substatement : Cabs.statement -> unit
    val print_attribute : Cabs.attribute -> unit
    val print_attributes : Cabs.attribute list -> unit
    val print_defs : Cabs.definition list -> unit
    val print_def : Cabs.definition -> unit
    val comprint : string -> unit
    val comstring : string -> string
    val printFile : Stdlib.out_channel -> Cabs.file -> unit
    val set_tab : int -> unit
    val set_width : int -> unit
    +Cprint (goblint-cil.GoblintCil.Cprint)

    Module GoblintCil.Cprint

    val version : string
    val printLn : bool Stdlib.ref
    val printLnComment : bool Stdlib.ref
    val printCounters : bool Stdlib.ref
    val printComments : bool Stdlib.ref
    val width : int Stdlib.ref
    val tab : int Stdlib.ref
    val max_indent : int Stdlib.ref
    val line : string Stdlib.ref
    val line_len : int Stdlib.ref
    val current : string Stdlib.ref
    val current_len : int Stdlib.ref
    val spaces : int Stdlib.ref
    val follow : int Stdlib.ref
    val roll : int Stdlib.ref
    val new_line : unit -> unit
    val space : unit -> unit
    val indent : unit -> unit
    val unindent : unit -> unit
    val force_new_line : unit -> unit
    val flush : unit -> unit
    val commit : unit -> unit
    val print_unescaped_string : string -> unit
    val print_list : (unit -> unit) -> ('a -> unit) -> 'a list -> unit
    val print_commas : bool -> ('a -> unit) -> 'a list -> unit
    val print_string : string -> unit
    val print_wstring : int64 list -> Cabs.wchar_type -> unit
    val print_specifiers : Cabs.specifier -> unit
    val print_type_spec : Cabs.typeSpecifier -> unit
    val print_struct_name_attr : string -> string -> Cabs.attribute list -> unit
    val print_decl : string -> Cabs.decl_type -> unit
    val print_fields : Cabs.field_group list -> unit
    val print_enum_items : Cabs.enum_item list -> unit
    val print_onlytype : (Cabs.specifier * Cabs.decl_type) -> unit
    val print_name : Cabs.name -> unit
    val print_init_name : Cabs.init_name -> unit
    val print_name_group : Cabs.name_group -> unit
    val print_field_group : Cabs.field_group -> unit
    val print_field : (Cabs.name * Cabs.expression option) -> unit
    val print_init_name_group : Cabs.init_name_group -> unit
    val print_single_name : Cabs.single_name -> unit
    val print_params : Cabs.single_name list -> bool -> unit
    val print_old_params : string list -> bool -> unit
    val get_operator : Cabs.expression -> string * int
    val print_comma_exps : Cabs.expression list -> unit
    val print_init_expression : Cabs.init_expression -> unit
    val print_expression : Cabs.expression -> unit
    val print_expression_level : int -> Cabs.expression -> unit
    val print_statement : Cabs.statement -> unit
    val print_block : Cabs.block -> unit
    val print_substatement : Cabs.statement -> unit
    val print_attribute : Cabs.attribute -> unit
    val print_attributes : Cabs.attribute list -> unit
    val print_defs : Cabs.definition list -> unit
    val print_def : Cabs.definition -> unit
    val comprint : string -> unit
    val comstring : string -> string
    val printFile : Stdlib.out_channel -> Cabs.file -> unit
    val set_tab : int -> unit
    val set_width : int -> unit
    diff --git a/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/argument-1-T/index.html b/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/argument-1-T/index.html index 69561cdd4..62b4e2b91 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/argument-1-T/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/argument-1-T/index.html @@ -1,2 +1,2 @@ -T (goblint-cil.GoblintCil.Dataflow.BackwardsDataFlow.T)

    Parameter BackwardsDataFlow.T

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. In many presentations of backwards data flow analysis we maintain the data at the block end. This is not easy to do with JVML because a block has many exceptional ends. So we maintain the data for the statement start.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val stmtStartData : t Inthash.t

    For each block id, the data at the start. This data structure must be initialized with the initial data for each block

    val funcExitData : t

    The data at function exit. Used for statements with no successors. This is usually bottom, since we'll also use doStmt on Return statements.

    val combineStmtStartData : Cil.stmt -> old:t -> t -> t option

    When the analysis reaches the start of a block, combine the old data with the one we have just computed. Return None if the combination is the same as the old data, otherwise return the combination. In the latter case, the predecessors of the statement are put on the working list.

    val combineSuccessors : t -> t -> t

    Take the data from two successors and combine it

    val doStmt : Cil.stmt -> t action

    The (backwards) transfer function for a branch. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val doInstr : Cil.instr -> t -> t action

    The (backwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val filterStmt : Cil.stmt -> Cil.stmt -> bool

    Whether to put this predecessor block in the worklist. We give the predecessor and the block whose predecessor we are (and whose data has changed)

    +T (goblint-cil.GoblintCil.Dataflow.BackwardsDataFlow.T)

    Parameter BackwardsDataFlow.T

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. In many presentations of backwards data flow analysis we maintain the data at the block end. This is not easy to do with JVML because a block has many exceptional ends. So we maintain the data for the statement start.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val stmtStartData : t Inthash.t

    For each block id, the data at the start. This data structure must be initialized with the initial data for each block

    val funcExitData : t

    The data at function exit. Used for statements with no successors. This is usually bottom, since we'll also use doStmt on Return statements.

    val combineStmtStartData : Cil.stmt -> old:t -> t -> t option

    When the analysis reaches the start of a block, combine the old data with the one we have just computed. Return None if the combination is the same as the old data, otherwise return the combination. In the latter case, the predecessors of the statement are put on the working list.

    val combineSuccessors : t -> t -> t

    Take the data from two successors and combine it

    val doStmt : Cil.stmt -> t action

    The (backwards) transfer function for a branch. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val doInstr : Cil.instr -> t -> t action

    The (backwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val filterStmt : Cil.stmt -> Cil.stmt -> bool

    Whether to put this predecessor block in the worklist. We give the predecessor and the block whose predecessor we are (and whose data has changed)

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/index.html b/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/index.html index cca508ab0..83656c6b5 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/BackwardsDataFlow/index.html @@ -1,2 +1,2 @@ -BackwardsDataFlow (goblint-cil.GoblintCil.Dataflow.BackwardsDataFlow)

    Module Dataflow.BackwardsDataFlow

    Parameters

    Signature

    val compute : Cil.stmt list -> unit

    Fill in the T.stmtStartData, given a number of initial statements to start from (the sinks for the backwards data flow). All of the statements (not just the initial ones!) must have some entry in T.stmtStartData If you want to use bottom for the initial data, you should pass the complete list of statements to compute, so that everything is visited. find_stmts may be useful here.

    +BackwardsDataFlow (goblint-cil.GoblintCil.Dataflow.BackwardsDataFlow)

    Module Dataflow.BackwardsDataFlow

    Parameters

    Signature

    val compute : Cil.stmt list -> unit

    Fill in the T.stmtStartData, given a number of initial statements to start from (the sinks for the backwards data flow). All of the statements (not just the initial ones!) must have some entry in T.stmtStartData If you want to use bottom for the initial data, you should pass the complete list of statements to compute, so that everything is visited. find_stmts may be useful here.

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/argument-1-T/index.html b/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/argument-1-T/index.html index ec3309f67..625d149b8 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/argument-1-T/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/argument-1-T/index.html @@ -1,2 +1,2 @@ -T (goblint-cil.GoblintCil.Dataflow.ForwardsDataFlow.T)

    Parameter ForwardsDataFlow.T

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. May be imperative.

    val copy : t -> t

    Make a deep copy of the data

    val stmtStartData : t Inthash.t

    For each statement id, the data at the start. Not found in the hash table means nothing is known about the state at this point. At the end of the analysis this means that the block is not reachable.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val computeFirstPredecessor : Cil.stmt -> t -> t

    Give the first value for a predecessors, compute the value to be set for the block

    val combinePredecessors : Cil.stmt -> old:t -> t -> t option

    Take some old data for the start of a statement, and some new data for the same point. Return None if the combination is identical to the old data. Otherwise, compute the combination, and return it.

    val doInstr : Cil.instr -> t -> t action

    The (forwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. The default action is to continue with the state unchanged.

    val doStmt : Cil.stmt -> t -> t stmtaction

    The (forwards) transfer function for a statement. The Cil.currentLoc is set before calling this. The default action is to do the instructions in this statement, if applicable, and continue with the successors.

    val doGuard : Cil.exp -> t -> t guardaction

    Generate the successor to an If statement assuming the given expression is nonzero. Analyses that don't need guard information can return GDefault; this is equivalent to returning GUse of the input. A return value of GUnreachable indicates that this half of the branch will not be taken and should not be explored. This will be called twice per If, once for "then" and once for "else".

    val filterStmt : Cil.stmt -> bool

    Whether to put this statement in the worklist. This is called when a block would normally be put in the worklist.

    +T (goblint-cil.GoblintCil.Dataflow.ForwardsDataFlow.T)

    Parameter ForwardsDataFlow.T

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. May be imperative.

    val copy : t -> t

    Make a deep copy of the data

    val stmtStartData : t Inthash.t

    For each statement id, the data at the start. Not found in the hash table means nothing is known about the state at this point. At the end of the analysis this means that the block is not reachable.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val computeFirstPredecessor : Cil.stmt -> t -> t

    Give the first value for a predecessors, compute the value to be set for the block

    val combinePredecessors : Cil.stmt -> old:t -> t -> t option

    Take some old data for the start of a statement, and some new data for the same point. Return None if the combination is identical to the old data. Otherwise, compute the combination, and return it.

    val doInstr : Cil.instr -> t -> t action

    The (forwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. The default action is to continue with the state unchanged.

    val doStmt : Cil.stmt -> t -> t stmtaction

    The (forwards) transfer function for a statement. The Cil.currentLoc is set before calling this. The default action is to do the instructions in this statement, if applicable, and continue with the successors.

    val doGuard : Cil.exp -> t -> t guardaction

    Generate the successor to an If statement assuming the given expression is nonzero. Analyses that don't need guard information can return GDefault; this is equivalent to returning GUse of the input. A return value of GUnreachable indicates that this half of the branch will not be taken and should not be explored. This will be called twice per If, once for "then" and once for "else".

    val filterStmt : Cil.stmt -> bool

    Whether to put this statement in the worklist. This is called when a block would normally be put in the worklist.

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/index.html b/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/index.html index 65941bec9..613f937df 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/ForwardsDataFlow/index.html @@ -1,2 +1,2 @@ -ForwardsDataFlow (goblint-cil.GoblintCil.Dataflow.ForwardsDataFlow)

    Module Dataflow.ForwardsDataFlow

    Parameters

    Signature

    val compute : Cil.stmt list -> unit

    Fill in the T.stmtStartData, given a number of initial statements to start from. All of the initial statements must have some entry in T.stmtStartData (i.e., the initial data should not be bottom)

    +ForwardsDataFlow (goblint-cil.GoblintCil.Dataflow.ForwardsDataFlow)

    Module Dataflow.ForwardsDataFlow

    Parameters

    Signature

    val compute : Cil.stmt list -> unit

    Fill in the T.stmtStartData, given a number of initial statements to start from. All of the initial statements must have some entry in T.stmtStartData (i.e., the initial data should not be bottom)

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/index.html b/api/goblint-cil/GoblintCil/Dataflow/index.html index a7fc5ab05..71d8d9bd7 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/index.html @@ -1,2 +1,2 @@ -Dataflow (goblint-cil.GoblintCil.Dataflow)

    Module GoblintCil.Dataflow

    A framework for data flow analysis for CIL code. Before using this framework, you must initialize the Control-flow Graph for your program, e.g using Cfg.computeFileCFG

    type 't action =
    1. | Default
      (*

      The default action

      *)
    2. | Done of 't
      (*

      Do not do the default action. Use this result

      *)
    3. | Post of 't -> 't
      (*

      The default action, followed by the given transformer

      *)
    type 't stmtaction =
    1. | SDefault
      (*

      The default action

      *)
    2. | SDone
      (*

      Do not visit this statement or its successors

      *)
    3. | SUse of 't
      (*

      Visit the instructions and successors of this statement as usual, but use the specified state instead of the one that was passed to doStmt

      *)
    type 't guardaction =
    1. | GDefault
      (*

      The default state

      *)
    2. | GUse of 't
      (*

      Use this data for the branch

      *)
    3. | GUnreachable
      (*

      The branch will never be taken.

      *)
    module type ForwardsTransfer = sig ... end
    module ForwardsDataFlow (T : ForwardsTransfer) : sig ... end
    module type BackwardsTransfer = sig ... end
    module BackwardsDataFlow (T : BackwardsTransfer) : sig ... end
    val find_stmts : Cil.fundec -> Cil.stmt list * Cil.stmt list

    Returns (all_stmts, sink_stmts), where all_stmts is a list of the statements in a function, and sink_stmts is a list of the return statments (including statements that fall through the end of a void function). Useful when you need an initial set of statements for BackwardsDataFlow.compute.

    +Dataflow (goblint-cil.GoblintCil.Dataflow)

    Module GoblintCil.Dataflow

    A framework for data flow analysis for CIL code. Before using this framework, you must initialize the Control-flow Graph for your program, e.g using Cfg.computeFileCFG

    type 't action =
    1. | Default
      (*

      The default action

      *)
    2. | Done of 't
      (*

      Do not do the default action. Use this result

      *)
    3. | Post of 't -> 't
      (*

      The default action, followed by the given transformer

      *)
    type 't stmtaction =
    1. | SDefault
      (*

      The default action

      *)
    2. | SDone
      (*

      Do not visit this statement or its successors

      *)
    3. | SUse of 't
      (*

      Visit the instructions and successors of this statement as usual, but use the specified state instead of the one that was passed to doStmt

      *)
    type 't guardaction =
    1. | GDefault
      (*

      The default state

      *)
    2. | GUse of 't
      (*

      Use this data for the branch

      *)
    3. | GUnreachable
      (*

      The branch will never be taken.

      *)
    module type ForwardsTransfer = sig ... end
    module ForwardsDataFlow (T : ForwardsTransfer) : sig ... end
    module type BackwardsTransfer = sig ... end
    module BackwardsDataFlow (T : BackwardsTransfer) : sig ... end
    val find_stmts : Cil.fundec -> Cil.stmt list * Cil.stmt list

    Returns (all_stmts, sink_stmts), where all_stmts is a list of the statements in a function, and sink_stmts is a list of the return statments (including statements that fall through the end of a void function). Useful when you need an initial set of statements for BackwardsDataFlow.compute.

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/module-type-BackwardsTransfer/index.html b/api/goblint-cil/GoblintCil/Dataflow/module-type-BackwardsTransfer/index.html index 3b2eefa7e..ea40fd423 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/module-type-BackwardsTransfer/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/module-type-BackwardsTransfer/index.html @@ -1,2 +1,2 @@ -BackwardsTransfer (goblint-cil.GoblintCil.Dataflow.BackwardsTransfer)

    Module type Dataflow.BackwardsTransfer

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. In many presentations of backwards data flow analysis we maintain the data at the block end. This is not easy to do with JVML because a block has many exceptional ends. So we maintain the data for the statement start.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val stmtStartData : t Inthash.t

    For each block id, the data at the start. This data structure must be initialized with the initial data for each block

    val funcExitData : t

    The data at function exit. Used for statements with no successors. This is usually bottom, since we'll also use doStmt on Return statements.

    val combineStmtStartData : Cil.stmt -> old:t -> t -> t option

    When the analysis reaches the start of a block, combine the old data with the one we have just computed. Return None if the combination is the same as the old data, otherwise return the combination. In the latter case, the predecessors of the statement are put on the working list.

    val combineSuccessors : t -> t -> t

    Take the data from two successors and combine it

    val doStmt : Cil.stmt -> t action

    The (backwards) transfer function for a branch. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val doInstr : Cil.instr -> t -> t action

    The (backwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val filterStmt : Cil.stmt -> Cil.stmt -> bool

    Whether to put this predecessor block in the worklist. We give the predecessor and the block whose predecessor we are (and whose data has changed)

    +BackwardsTransfer (goblint-cil.GoblintCil.Dataflow.BackwardsTransfer)

    Module type Dataflow.BackwardsTransfer

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. In many presentations of backwards data flow analysis we maintain the data at the block end. This is not easy to do with JVML because a block has many exceptional ends. So we maintain the data for the statement start.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val stmtStartData : t Inthash.t

    For each block id, the data at the start. This data structure must be initialized with the initial data for each block

    val funcExitData : t

    The data at function exit. Used for statements with no successors. This is usually bottom, since we'll also use doStmt on Return statements.

    val combineStmtStartData : Cil.stmt -> old:t -> t -> t option

    When the analysis reaches the start of a block, combine the old data with the one we have just computed. Return None if the combination is the same as the old data, otherwise return the combination. In the latter case, the predecessors of the statement are put on the working list.

    val combineSuccessors : t -> t -> t

    Take the data from two successors and combine it

    val doStmt : Cil.stmt -> t action

    The (backwards) transfer function for a branch. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val doInstr : Cil.instr -> t -> t action

    The (backwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. If it returns None, then we have some default handling. Otherwise, the returned data is the data before the branch (not considering the exception handlers)

    val filterStmt : Cil.stmt -> Cil.stmt -> bool

    Whether to put this predecessor block in the worklist. We give the predecessor and the block whose predecessor we are (and whose data has changed)

    diff --git a/api/goblint-cil/GoblintCil/Dataflow/module-type-ForwardsTransfer/index.html b/api/goblint-cil/GoblintCil/Dataflow/module-type-ForwardsTransfer/index.html index c9b8d45c2..d45256c18 100644 --- a/api/goblint-cil/GoblintCil/Dataflow/module-type-ForwardsTransfer/index.html +++ b/api/goblint-cil/GoblintCil/Dataflow/module-type-ForwardsTransfer/index.html @@ -1,2 +1,2 @@ -ForwardsTransfer (goblint-cil.GoblintCil.Dataflow.ForwardsTransfer)

    Module type Dataflow.ForwardsTransfer

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. May be imperative.

    val copy : t -> t

    Make a deep copy of the data

    val stmtStartData : t Inthash.t

    For each statement id, the data at the start. Not found in the hash table means nothing is known about the state at this point. At the end of the analysis this means that the block is not reachable.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val computeFirstPredecessor : Cil.stmt -> t -> t

    Give the first value for a predecessors, compute the value to be set for the block

    val combinePredecessors : Cil.stmt -> old:t -> t -> t option

    Take some old data for the start of a statement, and some new data for the same point. Return None if the combination is identical to the old data. Otherwise, compute the combination, and return it.

    val doInstr : Cil.instr -> t -> t action

    The (forwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. The default action is to continue with the state unchanged.

    val doStmt : Cil.stmt -> t -> t stmtaction

    The (forwards) transfer function for a statement. The Cil.currentLoc is set before calling this. The default action is to do the instructions in this statement, if applicable, and continue with the successors.

    val doGuard : Cil.exp -> t -> t guardaction

    Generate the successor to an If statement assuming the given expression is nonzero. Analyses that don't need guard information can return GDefault; this is equivalent to returning GUse of the input. A return value of GUnreachable indicates that this half of the branch will not be taken and should not be explored. This will be called twice per If, once for "then" and once for "else".

    val filterStmt : Cil.stmt -> bool

    Whether to put this statement in the worklist. This is called when a block would normally be put in the worklist.

    +ForwardsTransfer (goblint-cil.GoblintCil.Dataflow.ForwardsTransfer)

    Module type Dataflow.ForwardsTransfer

    val name : string

    For debugging purposes, the name of the analysis

    val debug : bool Stdlib.ref

    Whether to turn on debugging

    type t

    The type of the data we compute for each block start. May be imperative.

    val copy : t -> t

    Make a deep copy of the data

    val stmtStartData : t Inthash.t

    For each statement id, the data at the start. Not found in the hash table means nothing is known about the state at this point. At the end of the analysis this means that the block is not reachable.

    val pretty : unit -> t -> Pretty.doc

    Pretty-print the state

    val computeFirstPredecessor : Cil.stmt -> t -> t

    Give the first value for a predecessors, compute the value to be set for the block

    val combinePredecessors : Cil.stmt -> old:t -> t -> t option

    Take some old data for the start of a statement, and some new data for the same point. Return None if the combination is identical to the old data. Otherwise, compute the combination, and return it.

    val doInstr : Cil.instr -> t -> t action

    The (forwards) transfer function for an instruction. The Cil.currentLoc is set before calling this. The default action is to continue with the state unchanged.

    val doStmt : Cil.stmt -> t -> t stmtaction

    The (forwards) transfer function for a statement. The Cil.currentLoc is set before calling this. The default action is to do the instructions in this statement, if applicable, and continue with the successors.

    val doGuard : Cil.exp -> t -> t guardaction

    Generate the successor to an If statement assuming the given expression is nonzero. Analyses that don't need guard information can return GDefault; this is equivalent to returning GUse of the input. A return value of GUnreachable indicates that this half of the branch will not be taken and should not be explored. This will be called twice per If, once for "then" and once for "else".

    val filterStmt : Cil.stmt -> bool

    Whether to put this statement in the worklist. This is called when a block would normally be put in the worklist.

    diff --git a/api/goblint-cil/GoblintCil/Dominators/index.html b/api/goblint-cil/GoblintCil/Dominators/index.html index 9b3e84109..4aba9e085 100644 --- a/api/goblint-cil/GoblintCil/Dominators/index.html +++ b/api/goblint-cil/GoblintCil/Dominators/index.html @@ -1,5 +1,5 @@ -Dominators (goblint-cil.GoblintCil.Dominators)

    Module GoblintCil.Dominators

    Compute dominators using data flow analysis

    Author: George Necula 5/28/2004 *

    val computeIDom : ?doCFG:bool -> Cil.fundec -> Cil.stmt option Inthash.t

    Invoke on a code after filling in the CFG info and it computes the immediate dominator information. We map each statement to its immediate dominator (None for the start statement, and for the unreachable statements).

    type tree
    val computeDomTree : +Dominators (goblint-cil.GoblintCil.Dominators)

    Module GoblintCil.Dominators

    Compute dominators using data flow analysis

    Author: George Necula 5/28/2004 *

    val computeIDom : ?doCFG:bool -> Cil.fundec -> Cil.stmt option Inthash.t

    Invoke on a code after filling in the CFG info and it computes the immediate dominator information. We map each statement to its immediate dominator (None for the start statement, and for the unreachable statements).

    type tree
    val computeDomTree : ?doCFG:bool -> Cil.fundec -> Cil.stmt option Inthash.t * tree

    returns the IDoms and a map from statement ids to the set of statements that are dominated

    val getIdom : Cil.stmt option Inthash.t -> Cil.stmt -> Cil.stmt option

    This is like Inthash.find but gives an error if the information is Not_found

    val dominates : Cil.stmt option Inthash.t -> Cil.stmt -> Cil.stmt -> bool

    Check whether one statement dominates another.

    val children : tree -> Cil.stmt -> Cil.stmt list

    Return a list of statements dominated by the argument

    type order =
    1. | PreOrder
    2. | PostOrder
    val domTreeIter : (Cil.stmt -> unit) -> order -> tree -> unit

    Iterate over a dominator tree

    val findNaturalLoops : diff --git a/api/goblint-cil/GoblintCil/Errormsg/index.html b/api/goblint-cil/GoblintCil/Errormsg/index.html index 3dc5fd933..c192fcf0b 100644 --- a/api/goblint-cil/GoblintCil/Errormsg/index.html +++ b/api/goblint-cil/GoblintCil/Errormsg/index.html @@ -1,5 +1,5 @@ -Errormsg (goblint-cil.GoblintCil.Errormsg)

    Module GoblintCil.Errormsg

    Utility functions for error-reporting

    val logChannel : Stdlib.out_channel Stdlib.ref

    A channel for printing log messages

    val debugFlag : bool Stdlib.ref

    If set then print debugging info

    val verboseFlag : bool Stdlib.ref
    val colorFlag : bool Stdlib.ref

    Set to true if you want error and warning messages to be colored

    val redEscStr : string
    val greenEscStr : string
    val yellowEscStr : string
    val blueEscStr : string
    val purpleEscStr : string
    val cyanEscStr : string
    val whiteEscStr : string
    val resetEscStr : string
    val warnFlag : bool Stdlib.ref

    Set to true if you want to see all warnings.

    exception Error

    Error reporting functions raise this exception

    val error : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Prints an error message of the form Error: .... Use in conjunction with s, for example: E.s (E.error ... ).

    val bug : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Similar to error except that its output has the form Bug: ...

    val unimp : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Similar to error except that its output has the form Unimplemented: ...

    val s : 'a -> 'b

    Stop the execution by raising an Error.

    val hadErrors : bool Stdlib.ref

    This is set whenever one of the above error functions are called. It must be cleared manually

    val warn : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Like Errormsg.error but does not raise the Errormsg.Error exception. Return type is unit.

    val warnOpt : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Like Errormsg.warn but optional. Printed only if the Errormsg.warnFlag is set

    val log : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Print something to logChannel

    val logg : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    same as Errormsg.log but do not wrap lines

    val null : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Do not actually print (i.e. print to /dev/null)

    val pushContext : (unit -> Pretty.doc) -> unit

    Registers a context printing function

    val popContext : unit -> unit

    Removes the last registered context printing function

    val showContext : unit -> unit

    Show the context stack to stderr

    val withContext : (unit -> Pretty.doc) -> ('a -> 'b) -> 'a -> 'b

    To ensure that the context is registered and removed properly, use the function below

    val newline : unit -> unit
    val newHline : unit -> unit
    val getPosition : unit -> int * string * int * int
    val getHPosition : unit -> int * string

    high-level position

    val setHLine : int -> unit
    val setHFile : string -> unit
    val transformLocation : +Errormsg (goblint-cil.GoblintCil.Errormsg)

    Module GoblintCil.Errormsg

    Utility functions for error-reporting

    val logChannel : Stdlib.out_channel Stdlib.ref

    A channel for printing log messages

    val debugFlag : bool Stdlib.ref

    If set then print debugging info

    val verboseFlag : bool Stdlib.ref
    val colorFlag : bool Stdlib.ref

    Set to true if you want error and warning messages to be colored

    val redEscStr : string
    val greenEscStr : string
    val yellowEscStr : string
    val blueEscStr : string
    val purpleEscStr : string
    val cyanEscStr : string
    val whiteEscStr : string
    val resetEscStr : string
    val warnFlag : bool Stdlib.ref

    Set to true if you want to see all warnings.

    exception Error

    Error reporting functions raise this exception

    val error : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Prints an error message of the form Error: .... Use in conjunction with s, for example: E.s (E.error ... ).

    val bug : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Similar to error except that its output has the form Bug: ...

    val unimp : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Similar to error except that its output has the form Unimplemented: ...

    val s : 'a -> 'b

    Stop the execution by raising an Error.

    val hadErrors : bool Stdlib.ref

    This is set whenever one of the above error functions are called. It must be cleared manually

    val warn : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Like Errormsg.error but does not raise the Errormsg.Error exception. Return type is unit.

    val warnOpt : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Like Errormsg.warn but optional. Printed only if the Errormsg.warnFlag is set

    val log : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Print something to logChannel

    val logg : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    same as Errormsg.log but do not wrap lines

    val null : ('a, unit, Pretty.doc, unit) Stdlib.format4 -> 'a

    Do not actually print (i.e. print to /dev/null)

    val pushContext : (unit -> Pretty.doc) -> unit

    Registers a context printing function

    val popContext : unit -> unit

    Removes the last registered context printing function

    val showContext : unit -> unit

    Show the context stack to stderr

    val withContext : (unit -> Pretty.doc) -> ('a -> 'b) -> 'a -> 'b

    To ensure that the context is registered and removed properly, use the function below

    val newline : unit -> unit
    val newHline : unit -> unit
    val getPosition : unit -> int * string * int * int
    val getHPosition : unit -> int * string

    high-level position

    val setHLine : int -> unit
    val setHFile : string -> unit
    val transformLocation : (file:(string * bool) option -> line:int -> ((string * bool) option * int) option) diff --git a/api/goblint-cil/GoblintCil/Escape/index.html b/api/goblint-cil/GoblintCil/Escape/index.html index 224095468..2c8e1a9b5 100644 --- a/api/goblint-cil/GoblintCil/Escape/index.html +++ b/api/goblint-cil/GoblintCil/Escape/index.html @@ -1,2 +1,2 @@ -Escape (goblint-cil.GoblintCil.Escape)

    Module GoblintCil.Escape

    type wchar = int64

    OCaml types used to represent wide characters and strings

    type wstring = wchar list
    val escape_char : char -> string

    escape various constructs in accordance with C lexical rules

    val escape_string : string -> string
    val escape_wchar : wchar -> string
    val escape_wstring : wstring -> string
    +Escape (goblint-cil.GoblintCil.Escape)

    Module GoblintCil.Escape

    type wchar = int64

    OCaml types used to represent wide characters and strings

    type wstring = wchar list
    val escape_char : char -> string

    escape various constructs in accordance with C lexical rules

    val escape_string : string -> string
    val escape_wchar : wchar -> string
    val escape_wstring : wstring -> string
    diff --git a/api/goblint-cil/GoblintCil/Expcompare/class-volatileFinderClass/index.html b/api/goblint-cil/GoblintCil/Expcompare/class-volatileFinderClass/index.html index eb55bd039..74c4b809d 100644 --- a/api/goblint-cil/GoblintCil/Expcompare/class-volatileFinderClass/index.html +++ b/api/goblint-cil/GoblintCil/Expcompare/class-volatileFinderClass/index.html @@ -1,3 +1,3 @@ -volatileFinderClass (goblint-cil.GoblintCil.Expcompare.volatileFinderClass)

    Class Expcompare.volatileFinderClass

    inherit GoblintCil__.Cil.nopCilVisitor
    method vtype : GoblintCil__.Cil.typ -> +volatileFinderClass (goblint-cil.GoblintCil.Expcompare.volatileFinderClass)

    Class Expcompare.volatileFinderClass

    inherit GoblintCil__.Cil.nopCilVisitor
    method vtype : GoblintCil__.Cil.typ -> GoblintCil__.Cil.typ GoblintCil__.Cil.visitAction
    diff --git a/api/goblint-cil/GoblintCil/Expcompare/index.html b/api/goblint-cil/GoblintCil/Expcompare/index.html index 13c17dfc4..d304a0a58 100644 --- a/api/goblint-cil/GoblintCil/Expcompare/index.html +++ b/api/goblint-cil/GoblintCil/Expcompare/index.html @@ -1,5 +1,5 @@ -Expcompare (goblint-cil.GoblintCil.Expcompare)

    Module GoblintCil.Expcompare

    module E = Errormsg
    val isConstType : Cil.typ -> bool
    val compareExp : Cil.exp -> Cil.exp -> bool
    val compareLval : Cil.lval -> Cil.lval -> bool
    val stripNopCasts : Cil.exp -> Cil.exp
    val compareExpStripCasts : Cil.exp -> Cil.exp -> bool
    val stripCastsForPtrArith : Cil.exp -> Cil.exp
    val compareTypes : +Expcompare (goblint-cil.GoblintCil.Expcompare)

    Module GoblintCil.Expcompare

    module E = Errormsg
    val isConstType : Cil.typ -> bool
    val compareExp : Cil.exp -> Cil.exp -> bool
    val compareLval : Cil.lval -> Cil.lval -> bool
    val stripNopCasts : Cil.exp -> Cil.exp
    val compareExpStripCasts : Cil.exp -> Cil.exp -> bool
    val stripCastsForPtrArith : Cil.exp -> Cil.exp
    val compareTypes : ?ignoreSign:bool -> ?importantAttr:(Cil.attribute -> bool) -> Cil.typ -> diff --git a/api/goblint-cil/GoblintCil/Feature/index.html b/api/goblint-cil/GoblintCil/Feature/index.html index d7711631c..0b2d4cc21 100644 --- a/api/goblint-cil/GoblintCil/Feature/index.html +++ b/api/goblint-cil/GoblintCil/Feature/index.html @@ -1,2 +1,2 @@ -Feature (goblint-cil.GoblintCil.Feature)

    Module GoblintCil.Feature

    Extending CIL with external features

    type t = {
    1. mutable fd_enabled : bool;
      (*

      The enable flag. Set to default value

      *)
    2. fd_name : string;
      (*

      This is used to construct an option "--doxxx" and "--dontxxx" that enable and disable the feature

      *)
    3. fd_description : string;
      (*

      A longer name that can be used to document the new options

      *)
    4. fd_extraopt : (string * Stdlib.Arg.spec * string) list;
      (*

      Additional command line options. The description strings should usually start with a space for Arg.align to print the --help nicely.

      *)
    5. fd_doit : Cil.file -> unit;
      (*

      This performs the transformation

      *)
    6. fd_post_check : bool;
      (*

      Whether to perform a CIL consistency checking after this stage, if checking is enabled (--check is passed to cilly). Set this to true if your feature makes any changes for the program.

      *)
    }

    Description of a CIL feature.

    val register : t -> unit

    Register a feature to be used by CIL. Feature name must be unique.

    val list_registered : unit -> t list

    List registered features.

    val registered : string -> bool

    Check if a given feature is registered.

    val find : string -> t

    Find a feature by name. Raise Not_found if the feature is not registered.

    val enable : string -> unit

    Enable a given feature, by name. Raise Errormsg.Error if the feature is not registered.

    val enabled : string -> bool

    Check if a given feature is enabled. Return false if the feature is not registered.

    Internal

    val init : unit -> unit

    Initialize the module. This needs to be called before loadWithDeps is used. Called automatically by loadFromArgv.

    val loadWithDeps : string -> unit

    Find and dynamically links a module. The name should be either a path to a cmo, cma or cmxs file, or the name of a findlib package. In the latter case, package dependencies are loaded automatically. Each file is loaded at most one. The loaded module must call register to make its features available to CIL.

    val loadFromArgv : string -> unit

    loadFromArgv switch searches Sys.argv for the command-line option switch, and loads the modules passed as parameters. Ignores every other Sys.argv element.

    val loadFromEnv : string -> string list -> unit

    loadFromEnv name default loads coma-separated module names stored in the environment variable name, or default if it is not defined.

    +Feature (goblint-cil.GoblintCil.Feature)

    Module GoblintCil.Feature

    Extending CIL with external features

    type t = {
    1. mutable fd_enabled : bool;
      (*

      The enable flag. Set to default value

      *)
    2. fd_name : string;
      (*

      This is used to construct an option "--doxxx" and "--dontxxx" that enable and disable the feature

      *)
    3. fd_description : string;
      (*

      A longer name that can be used to document the new options

      *)
    4. fd_extraopt : (string * Stdlib.Arg.spec * string) list;
      (*

      Additional command line options. The description strings should usually start with a space for Arg.align to print the --help nicely.

      *)
    5. fd_doit : Cil.file -> unit;
      (*

      This performs the transformation

      *)
    6. fd_post_check : bool;
      (*

      Whether to perform a CIL consistency checking after this stage, if checking is enabled (--check is passed to cilly). Set this to true if your feature makes any changes for the program.

      *)
    }

    Description of a CIL feature.

    val register : t -> unit

    Register a feature to be used by CIL. Feature name must be unique.

    val list_registered : unit -> t list

    List registered features.

    val registered : string -> bool

    Check if a given feature is registered.

    val find : string -> t

    Find a feature by name. Raise Not_found if the feature is not registered.

    val enable : string -> unit

    Enable a given feature, by name. Raise Errormsg.Error if the feature is not registered.

    val enabled : string -> bool

    Check if a given feature is enabled. Return false if the feature is not registered.

    Internal

    val init : unit -> unit

    Initialize the module. This needs to be called before loadWithDeps is used. Called automatically by loadFromArgv.

    val loadWithDeps : string -> unit

    Find and dynamically links a module. The name should be either a path to a cmo, cma or cmxs file, or the name of a findlib package. In the latter case, package dependencies are loaded automatically. Each file is loaded at most one. The loaded module must call register to make its features available to CIL.

    val loadFromArgv : string -> unit

    loadFromArgv switch searches Sys.argv for the command-line option switch, and loads the modules passed as parameters. Ignores every other Sys.argv element.

    val loadFromEnv : string -> string list -> unit

    loadFromEnv name default loads coma-separated module names stored in the environment variable name, or default if it is not defined.

    diff --git a/api/goblint-cil/GoblintCil/Formatcil/index.html b/api/goblint-cil/GoblintCil/Formatcil/index.html index bd889a075..97e92eea5 100644 --- a/api/goblint-cil/GoblintCil/Formatcil/index.html +++ b/api/goblint-cil/GoblintCil/Formatcil/index.html @@ -1,5 +1,5 @@ -Formatcil (goblint-cil.GoblintCil.Formatcil)

    Module GoblintCil.Formatcil

    An Interpreter for constructing CIL constructs

    val cExp : string -> (string * Cil.formatArg) list -> Cil.exp

    Constructs an expression based on the program and the list of arguments. Each argument consists of a name followed by the actual data. This argument will be placed instead of occurrences of "%v:name" in the pattern (where the "v" is dependent on the type of the data). The parsing of the string is memoized. * Only the first expression is parsed.

    val cLval : string -> (string * Cil.formatArg) list -> Cil.lval

    Constructs an lval based on the program and the list of arguments. Only the first lvalue is parsed. The parsing of the string is memoized.

    val cType : string -> (string * Cil.formatArg) list -> Cil.typ

    Constructs a type based on the program and the list of arguments. Only the first type is parsed. The parsing of the string is memoized.

    val cInstr : +Formatcil (goblint-cil.GoblintCil.Formatcil)

    Module GoblintCil.Formatcil

    An Interpreter for constructing CIL constructs

    val cExp : string -> (string * Cil.formatArg) list -> Cil.exp

    Constructs an expression based on the program and the list of arguments. Each argument consists of a name followed by the actual data. This argument will be placed instead of occurrences of "%v:name" in the pattern (where the "v" is dependent on the type of the data). The parsing of the string is memoized. * Only the first expression is parsed.

    val cLval : string -> (string * Cil.formatArg) list -> Cil.lval

    Constructs an lval based on the program and the list of arguments. Only the first lvalue is parsed. The parsing of the string is memoized.

    val cType : string -> (string * Cil.formatArg) list -> Cil.typ

    Constructs a type based on the program and the list of arguments. Only the first type is parsed. The parsing of the string is memoized.

    val cInstr : string -> Cil.location -> (string * Cil.formatArg) list -> diff --git a/api/goblint-cil/GoblintCil/Frontc/index.html b/api/goblint-cil/GoblintCil/Frontc/index.html index 8da514d0e..6279aa68d 100644 --- a/api/goblint-cil/GoblintCil/Frontc/index.html +++ b/api/goblint-cil/GoblintCil/Frontc/index.html @@ -1,2 +1,2 @@ -Frontc (goblint-cil.GoblintCil.Frontc)

    Module GoblintCil.Frontc

    exception ParseError of string
    exception CabsOnly
    val args : (string * Stdlib.Arg.spec * string) list
    val resetErrors : unit -> unit
    val parse : string -> unit -> Cil.file
    val parse_with_cabs : string -> unit -> Cabs.file * Cil.file
    val parse_standalone_exp : string -> Cabs.expression
    +Frontc (goblint-cil.GoblintCil.Frontc)

    Module GoblintCil.Frontc

    exception ParseError of string
    exception CabsOnly
    val args : (string * Stdlib.Arg.spec * string) list
    val resetErrors : unit -> unit
    val parse : string -> unit -> Cil.file
    val parse_with_cabs : string -> unit -> Cabs.file * Cil.file
    val parse_standalone_exp : string -> Cabs.expression
    diff --git a/api/goblint-cil/GoblintCil/GrowArray/index.html b/api/goblint-cil/GoblintCil/GrowArray/index.html index e0ed5c4be..b06a5b6b8 100644 --- a/api/goblint-cil/GoblintCil/GrowArray/index.html +++ b/api/goblint-cil/GoblintCil/GrowArray/index.html @@ -1,5 +1,5 @@ -GrowArray (goblint-cil.GoblintCil.GrowArray)

    Module GoblintCil.GrowArray

    Array operations.

    type 'a t

    The type of growable arrays

    type 'a fill =
    1. | Elem of 'a
    2. | Susp of int -> 'a

    The default value to a new element of the growable array

    val make : int -> 'a fill -> 'a t

    GrowArray.make n x returns a fresh growable array of size at least n with default value specified by x.

    Raise Invalid_argument if n < 0 or n > Sys.max_array_length.

    val num_alloc_index : 'a t -> int

    GrowArray.num_alloc_index a returns the number of allocated entries in the array *

    val max_init_index : 'a t -> int

    GrowArray.max_init_index a returns the maximum index to which has been written.

    Returns -1 if no writes have been made.

    val reset_max_init_index : 'a t -> unit

    GrowArray.reset_init a resets the max_init_index. You should probably use GrowArray.clear a instead if you also want to delete the contents.

    val getg : 'a t -> int -> 'a

    GrowArray.getg a n returns the element number n of array a. The first element has number 0. The last element has number GrowArray.length a - 1.

    If n is outside the range 0 to (GrowArray.max_init_index a), then the array grows to at least n and yields the default value.

    val setg : 'a t -> int -> 'a -> unit

    GrowArray.setg a n x modifies array a in place, replacing element number n with x.

    If n is outside the range 0 to (GrowArray.max_init_index a), then the array grows to at least n and yields the default value.

    val get : 'a t -> int -> 'a

    GrowArray.get a n returns the element number n of grow array a.

    Raise Invalid_argument "Array.get" if n is outside the range of the underlying array.

    val set : 'a t -> int -> 'a -> unit

    GrowArray.set a n x modifies grow array a in place, replacing element number n with x.

    Raise Invalid_argument "Array.set" if n is outside the range of the underlying array.

    val clear : 'a t -> unit

    GrowArray.clear a clears the contents of the array and sets max_init_index to -1. Suspension thunks will be rerun to regenerate the initial values of the array.

    val copy : 'a t -> 'a t

    GrowArray.copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val deep_copy : 'a t -> ('a -> 'a) -> 'a t

    GrowArray.copy a f returns a deep copy of a using f to copy elements of a.

    val iter : ('a -> unit) -> 'a t -> unit

    GrowArray.iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(GrowArray.length a - 1); ().

    val iteri : (int -> 'a -> unit) -> 'a t -> unit

    Same as GrowArray.iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val iter2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

    Same as GrowArray.iteri, but the function is applied to two arrays. iter2 f a b is equivalent to f 0 a.(0) b.(0); f 1 a.(1) b.(1); ...; f n a.(n) b.(n); () where n is the larger of (max_init_index a) or (max_init_index b). The shorter array will grow to match the longer.

    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

    GrowArray.fold_left f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_lefti : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

    GrowArray.fold_lefti f x a computes f (... (f (f x 0 a.(0)) 1 a.(1)) ...) (n-1) a.(n-1), where n is the length of the array a.

    val fold_right : ('b -> 'a -> 'a) -> 'b t -> 'a -> 'a

    GrowArray.fold_right f a x computes f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...)), where n is the length of the array a.

    val d_growarray : +GrowArray (goblint-cil.GoblintCil.GrowArray)

    Module GoblintCil.GrowArray

    Array operations.

    type 'a t

    The type of growable arrays

    type 'a fill =
    1. | Elem of 'a
    2. | Susp of int -> 'a

    The default value to a new element of the growable array

    val make : int -> 'a fill -> 'a t

    GrowArray.make n x returns a fresh growable array of size at least n with default value specified by x.

    Raise Invalid_argument if n < 0 or n > Sys.max_array_length.

    val num_alloc_index : 'a t -> int

    GrowArray.num_alloc_index a returns the number of allocated entries in the array *

    val max_init_index : 'a t -> int

    GrowArray.max_init_index a returns the maximum index to which has been written.

    Returns -1 if no writes have been made.

    val reset_max_init_index : 'a t -> unit

    GrowArray.reset_init a resets the max_init_index. You should probably use GrowArray.clear a instead if you also want to delete the contents.

    val getg : 'a t -> int -> 'a

    GrowArray.getg a n returns the element number n of array a. The first element has number 0. The last element has number GrowArray.length a - 1.

    If n is outside the range 0 to (GrowArray.max_init_index a), then the array grows to at least n and yields the default value.

    val setg : 'a t -> int -> 'a -> unit

    GrowArray.setg a n x modifies array a in place, replacing element number n with x.

    If n is outside the range 0 to (GrowArray.max_init_index a), then the array grows to at least n and yields the default value.

    val get : 'a t -> int -> 'a

    GrowArray.get a n returns the element number n of grow array a.

    Raise Invalid_argument "Array.get" if n is outside the range of the underlying array.

    val set : 'a t -> int -> 'a -> unit

    GrowArray.set a n x modifies grow array a in place, replacing element number n with x.

    Raise Invalid_argument "Array.set" if n is outside the range of the underlying array.

    val clear : 'a t -> unit

    GrowArray.clear a clears the contents of the array and sets max_init_index to -1. Suspension thunks will be rerun to regenerate the initial values of the array.

    val copy : 'a t -> 'a t

    GrowArray.copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val deep_copy : 'a t -> ('a -> 'a) -> 'a t

    GrowArray.copy a f returns a deep copy of a using f to copy elements of a.

    val iter : ('a -> unit) -> 'a t -> unit

    GrowArray.iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(GrowArray.length a - 1); ().

    val iteri : (int -> 'a -> unit) -> 'a t -> unit

    Same as GrowArray.iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val iter2 : (int -> 'a -> 'b -> unit) -> 'a t -> 'b t -> unit

    Same as GrowArray.iteri, but the function is applied to two arrays. iter2 f a b is equivalent to f 0 a.(0) b.(0); f 1 a.(1) b.(1); ...; f n a.(n) b.(n); () where n is the larger of (max_init_index a) or (max_init_index b). The shorter array will grow to match the longer.

    val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a

    GrowArray.fold_left f x a computes f (... (f (f x a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_lefti : ('a -> int -> 'b -> 'a) -> 'a -> 'b t -> 'a

    GrowArray.fold_lefti f x a computes f (... (f (f x 0 a.(0)) 1 a.(1)) ...) (n-1) a.(n-1), where n is the length of the array a.

    val fold_right : ('b -> 'a -> 'a) -> 'b t -> 'a -> 'a

    GrowArray.fold_right f a x computes f a.(0) (f a.(1) ( ... (f a.(n-1) x) ...)), where n is the length of the array a.

    val d_growarray : Pretty.doc -> (int -> 'a -> Pretty.doc) -> unit -> diff --git a/api/goblint-cil/GoblintCil/Inthash/index.html b/api/goblint-cil/GoblintCil/Inthash/index.html index 084fc4f7e..64c2e41ac 100644 --- a/api/goblint-cil/GoblintCil/Inthash/index.html +++ b/api/goblint-cil/GoblintCil/Inthash/index.html @@ -1,2 +1,2 @@ -Inthash (goblint-cil.GoblintCil.Inthash)

    Module GoblintCil.Inthash

    type 'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val length : 'a t -> int
    val copy : 'a t -> 'a t
    val copy_into : 'a t -> 'a t -> unit
    val add : 'a t -> int -> 'a -> unit
    val replace : 'a t -> int -> 'a -> unit
    val remove : 'a t -> int -> unit
    val remove_all : 'a t -> int -> unit
    val mem : 'a t -> int -> bool
    val find : 'a t -> int -> 'a
    val find_all : 'a t -> int -> 'a list
    val tryfind : 'a t -> int -> 'a option
    val iter : (int -> 'a -> unit) -> 'a t -> unit
    val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val memoize : 'a t -> int -> (int -> 'a) -> 'a
    val tolist : 'a t -> (int * 'a) list
    +Inthash (goblint-cil.GoblintCil.Inthash)

    Module GoblintCil.Inthash

    type 'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val length : 'a t -> int
    val copy : 'a t -> 'a t
    val copy_into : 'a t -> 'a t -> unit
    val add : 'a t -> int -> 'a -> unit
    val replace : 'a t -> int -> 'a -> unit
    val remove : 'a t -> int -> unit
    val remove_all : 'a t -> int -> unit
    val mem : 'a t -> int -> bool
    val find : 'a t -> int -> 'a
    val find_all : 'a t -> int -> 'a list
    val tryfind : 'a t -> int -> 'a option
    val iter : (int -> 'a -> unit) -> 'a t -> unit
    val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    val memoize : 'a t -> int -> (int -> 'a) -> 'a
    val tolist : 'a t -> (int * 'a) list
    diff --git a/api/goblint-cil/GoblintCil/Machdep/index.html b/api/goblint-cil/GoblintCil/Machdep/index.html index 86c199d8c..6436c31c9 100644 --- a/api/goblint-cil/GoblintCil/Machdep/index.html +++ b/api/goblint-cil/GoblintCil/Machdep/index.html @@ -1,2 +1,2 @@ -Machdep (goblint-cil.GoblintCil.Machdep)

    Module GoblintCil.Machdep

    type mach = {
    1. version_major : int;
    2. version_minor : int;
    3. version : string;
    4. underscore_name : bool;
    5. sizeof_short : int;
    6. sizeof_int : int;
    7. sizeof_bool : int;
    8. sizeof_long : int;
    9. sizeof_longlong : int;
    10. sizeof_ptr : int;
    11. sizeof_float : int;
    12. sizeof_float32x : int;
    13. sizeof_float64x : int;
    14. sizeof_double : int;
    15. sizeof_longdouble : int;
    16. sizeof_float128 : int;
    17. sizeof_floatcomplex : int;
    18. sizeof_doublecomplex : int;
    19. sizeof_longdoublecomplex : int;
    20. sizeof_float128complex : int;
    21. sizeof_void : int;
    22. sizeof_fun : int;
    23. size_t : string;
    24. wchar_t : string;
    25. char16_t : string;
    26. char32_t : string;
    27. alignof_short : int;
    28. alignof_int : int;
    29. alignof_bool : int;
    30. alignof_long : int;
    31. alignof_longlong : int;
    32. alignof_ptr : int;
    33. alignof_enum : int;
    34. alignof_float : int;
    35. alignof_float32x : int;
    36. alignof_float64x : int;
    37. alignof_double : int;
    38. alignof_longdouble : int;
    39. alignof_float128 : int;
    40. alignof_floatcomplex : int;
    41. alignof_doublecomplex : int;
    42. alignof_longdoublecomplex : int;
    43. alignof_float128complex : int;
    44. alignof_str : int;
    45. alignof_fun : int;
    46. alignof_aligned : int;
    47. char_is_unsigned : bool;
    48. little_endian : bool;
    49. __thread_is_keyword : bool;
    50. __builtin_va_list : bool;
    }
    val gcc : mach
    val theMachine : mach Stdlib.ref
    +Machdep (goblint-cil.GoblintCil.Machdep)

    Module GoblintCil.Machdep

    type mach = {
    1. version_major : int;
    2. version_minor : int;
    3. version : string;
    4. underscore_name : bool;
    5. sizeof_short : int;
    6. sizeof_int : int;
    7. sizeof_bool : int;
    8. sizeof_long : int;
    9. sizeof_longlong : int;
    10. sizeof_ptr : int;
    11. sizeof_float : int;
    12. sizeof_float32x : int;
    13. sizeof_float64x : int;
    14. sizeof_double : int;
    15. sizeof_longdouble : int;
    16. sizeof_float128 : int;
    17. sizeof_floatcomplex : int;
    18. sizeof_doublecomplex : int;
    19. sizeof_longdoublecomplex : int;
    20. sizeof_float128complex : int;
    21. sizeof_void : int;
    22. sizeof_fun : int;
    23. size_t : string;
    24. wchar_t : string;
    25. char16_t : string;
    26. char32_t : string;
    27. alignof_short : int;
    28. alignof_int : int;
    29. alignof_bool : int;
    30. alignof_long : int;
    31. alignof_longlong : int;
    32. alignof_ptr : int;
    33. alignof_enum : int;
    34. alignof_float : int;
    35. alignof_float32x : int;
    36. alignof_float64x : int;
    37. alignof_double : int;
    38. alignof_longdouble : int;
    39. alignof_float128 : int;
    40. alignof_floatcomplex : int;
    41. alignof_doublecomplex : int;
    42. alignof_longdoublecomplex : int;
    43. alignof_float128complex : int;
    44. alignof_str : int;
    45. alignof_fun : int;
    46. alignof_aligned : int;
    47. char_is_unsigned : bool;
    48. little_endian : bool;
    49. __thread_is_keyword : bool;
    50. __builtin_va_list : bool;
    }
    val gcc : mach
    val gcc32 : mach option
    val gcc64 : mach option
    val theMachine : mach Stdlib.ref
    diff --git a/api/goblint-cil/GoblintCil/Machdepenv/index.html b/api/goblint-cil/GoblintCil/Machdepenv/index.html index b11eb9789..3f2eeef8c 100644 --- a/api/goblint-cil/GoblintCil/Machdepenv/index.html +++ b/api/goblint-cil/GoblintCil/Machdepenv/index.html @@ -1,2 +1,2 @@ -Machdepenv (goblint-cil.GoblintCil.Machdepenv)

    Module GoblintCil.Machdepenv

    module R = Str
    module L = Stdlib.List
    module H = Stdlib.Hashtbl
    val preparse : string -> (string, string list) H.t
    val errorWrap : string -> (string -> 'a) -> 'a
    val getNthString : int -> ('a, 'b list) H.t -> 'a -> 'b
    val getNthInt : int -> (string, string list) H.t -> string -> int
    val getNthBool : int -> (string, string list) H.t -> string -> bool
    val getBool : (string, string list) H.t -> string -> bool
    val getInt : (string, string list) H.t -> string -> int
    val getSizeof : (string, string list) H.t -> string -> int
    val getAlignof : (string, string list) H.t -> string -> int
    val respace : string -> string
    val modelParse : string -> Machdep.mach
    +Machdepenv (goblint-cil.GoblintCil.Machdepenv)

    Module GoblintCil.Machdepenv

    module R = Str
    module L = Stdlib.List
    module H = Stdlib.Hashtbl
    val preparse : string -> (string, string list) H.t
    val errorWrap : string -> (string -> 'a) -> 'a
    val getNthString : int -> ('a, 'b list) H.t -> 'a -> 'b
    val getNthInt : int -> (string, string list) H.t -> string -> int
    val getNthBool : int -> (string, string list) H.t -> string -> bool
    val getBool : (string, string list) H.t -> string -> bool
    val getInt : (string, string list) H.t -> string -> int
    val getSizeof : (string, string list) H.t -> string -> int
    val getAlignof : (string, string list) H.t -> string -> int
    val respace : string -> string
    val modelParse : string -> Machdep.mach
    diff --git a/api/goblint-cil/GoblintCil/Mergecil/index.html b/api/goblint-cil/GoblintCil/Mergecil/index.html index 37fbf57a0..803f78eeb 100644 --- a/api/goblint-cil/GoblintCil/Mergecil/index.html +++ b/api/goblint-cil/GoblintCil/Mergecil/index.html @@ -1,2 +1,2 @@ -Mergecil (goblint-cil.GoblintCil.Mergecil)

    Module GoblintCil.Mergecil

    val ignore_merge_conflicts : bool Stdlib.ref

    Set this to true to ignore the merge conflicts

    val merge_inlines : bool Stdlib.ref

    Try to merge definitions of inline functions. They can appear in multiple files and we would like them all to be the same. This can slow down the merger an order of magnitude !!!

    val merge : Cil.file list -> string -> Cil.file

    Merge a number of CIL files

    +Mergecil (goblint-cil.GoblintCil.Mergecil)

    Module GoblintCil.Mergecil

    val ignore_merge_conflicts : bool Stdlib.ref

    Set this to true to ignore the merge conflicts

    val merge_inlines : bool Stdlib.ref

    Try to merge definitions of inline functions. They can appear in multiple files and we would like them all to be the same. This can slow down the merger an order of magnitude !!!

    val merge : Cil.file list -> string -> Cil.file

    Merge a number of CIL files

    diff --git a/api/goblint-cil/GoblintCil/Patch/index.html b/api/goblint-cil/GoblintCil/Patch/index.html index 0057c203b..25d5bf691 100644 --- a/api/goblint-cil/GoblintCil/Patch/index.html +++ b/api/goblint-cil/GoblintCil/Patch/index.html @@ -1,2 +1,2 @@ -Patch (goblint-cil.GoblintCil.Patch)

    Module GoblintCil.Patch

    val applyPatch : Cabs.file -> Cabs.file -> Cabs.file
    +Patch (goblint-cil.GoblintCil.Patch)

    Module GoblintCil.Patch

    val applyPatch : Cabs.file -> Cabs.file -> Cabs.file
    diff --git a/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/argument-1-Map/index.html b/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/argument-1-Map/index.html index 9242e47c3..d661e3cc9 100644 --- a/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/argument-1-Map/index.html +++ b/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/argument-1-Map/index.html @@ -1,2 +1,2 @@ -Map (goblint-cil.GoblintCil.Pretty.MakeMapPrinter.Map)

    Parameter MakeMapPrinter.Map

    type key
    type 'a t
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    +Map (goblint-cil.GoblintCil.Pretty.MakeMapPrinter.Map)

    Parameter MakeMapPrinter.Map

    type key
    type 'a t
    val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
    diff --git a/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/index.html b/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/index.html index 086e5cf2a..ba5ad7665 100644 --- a/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/index.html +++ b/api/goblint-cil/GoblintCil/Pretty/MakeMapPrinter/index.html @@ -1,5 +1,5 @@ -MakeMapPrinter (goblint-cil.GoblintCil.Pretty.MakeMapPrinter)

    Module Pretty.MakeMapPrinter

    Format maps.

    Parameters

    module Map : sig ... end

    Signature

    val docMap : ?sep:doc -> (Map.key -> 'a -> doc) -> unit -> 'a Map.t -> doc

    Format a map, analogous to docList.

    val d_map : +MakeMapPrinter (goblint-cil.GoblintCil.Pretty.MakeMapPrinter)

    Module Pretty.MakeMapPrinter

    Format maps.

    Parameters

    module Map : sig ... end

    Signature

    val docMap : ?sep:doc -> (Map.key -> 'a -> doc) -> unit -> 'a Map.t -> doc

    Format a map, analogous to docList.

    val d_map : ?dmaplet:(doc -> doc -> doc) -> string -> (unit -> Map.key -> doc) -> diff --git a/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/argument-1-Set/index.html b/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/argument-1-Set/index.html index 0357d1fef..88d8ca577 100644 --- a/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/argument-1-Set/index.html +++ b/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/argument-1-Set/index.html @@ -1,2 +1,2 @@ -Set (goblint-cil.GoblintCil.Pretty.MakeSetPrinter.Set)

    Parameter MakeSetPrinter.Set

    type elt
    type t
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
    +Set (goblint-cil.GoblintCil.Pretty.MakeSetPrinter.Set)

    Parameter MakeSetPrinter.Set

    type elt
    type t
    val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
    diff --git a/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/index.html b/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/index.html index 5620a9221..a30063e94 100644 --- a/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/index.html +++ b/api/goblint-cil/GoblintCil/Pretty/MakeSetPrinter/index.html @@ -1,2 +1,2 @@ -MakeSetPrinter (goblint-cil.GoblintCil.Pretty.MakeSetPrinter)

    Module Pretty.MakeSetPrinter

    Format sets.

    Parameters

    module Set : sig ... end

    Signature

    val docSet : ?sep:doc -> (Set.elt -> doc) -> unit -> Set.t -> doc

    Format a set, analogous to docList.

    val d_set : string -> (unit -> Set.elt -> doc) -> unit -> Set.t -> doc

    Format a set, analogous to d_list.

    +MakeSetPrinter (goblint-cil.GoblintCil.Pretty.MakeSetPrinter)

    Module Pretty.MakeSetPrinter

    Format sets.

    Parameters

    module Set : sig ... end

    Signature

    val docSet : ?sep:doc -> (Set.elt -> doc) -> unit -> Set.t -> doc

    Format a set, analogous to docList.

    val d_set : string -> (unit -> Set.elt -> doc) -> unit -> Set.t -> doc

    Format a set, analogous to d_list.

    diff --git a/api/goblint-cil/GoblintCil/Pretty/index.html b/api/goblint-cil/GoblintCil/Pretty/index.html index ff83d308a..860676d84 100644 --- a/api/goblint-cil/GoblintCil/Pretty/index.html +++ b/api/goblint-cil/GoblintCil/Pretty/index.html @@ -1,5 +1,5 @@ -Pretty (goblint-cil.GoblintCil.Pretty)

    Module GoblintCil.Pretty

    Utility functions for pretty-printing. The major features provided by this module are

    • An fprintf-style interface with support for user-defined printers
    • The printout is fit to a width by selecting some of the optional newlines
    • Constructs for alignment and indentation
    • Print ellipsis starting at a certain nesting depth
    • Constructs for printing lists and arrays

    Pretty-printing occurs in two stages:

    • Construct a Pretty.doc object that encodes all of the elements to be printed along with alignment specifiers and optional and mandatory newlines
    • Format the Pretty.doc to a certain width and emit it as a string, to an output stream or pass it to a user-defined function

    The formatting algorithm is not optimal but it does a pretty good job while still operating in linear time. The original version was based on a pretty printer by Philip Wadler which turned out to not scale to large jobs.

    API

    type doc

    The type of unformated documents. Elements of this type can be constructed in two ways. Either with a number of constructor shown below, or using the Pretty.dprintf function with a printf-like interface. The Pretty.dprintf method is slightly slower so we do not use it for large jobs such as the output routines for a compiler. But we use it for small jobs such as logging and error messages.

    Constructors for the doc type.

    val nil : doc

    Constructs an empty document

    val (++) : doc -> doc -> doc

    Concatenates two documents. This is an infix operator that associates to the left.

    val concat : doc -> doc -> doc
    val text : string -> doc

    A document that prints the given string

    val num : int -> doc

    A document that prints an integer in decimal form

    val num64 : int64 -> doc

    A document that prints a 64-bit int in decimal form

    val real : float -> doc

    A document that prints a real number

    val chr : char -> doc

    A document that prints a character. This is just like Pretty.text with a one-character string.

    val line : doc

    A document that consists of a mandatory newline. This is just like (text +Pretty (goblint-cil.GoblintCil.Pretty)

    Module GoblintCil.Pretty

    Utility functions for pretty-printing. The major features provided by this module are

    • An fprintf-style interface with support for user-defined printers
    • The printout is fit to a width by selecting some of the optional newlines
    • Constructs for alignment and indentation
    • Print ellipsis starting at a certain nesting depth
    • Constructs for printing lists and arrays

    Pretty-printing occurs in two stages:

    • Construct a Pretty.doc object that encodes all of the elements to be printed along with alignment specifiers and optional and mandatory newlines
    • Format the Pretty.doc to a certain width and emit it as a string, to an output stream or pass it to a user-defined function

    The formatting algorithm is not optimal but it does a pretty good job while still operating in linear time. The original version was based on a pretty printer by Philip Wadler which turned out to not scale to large jobs.

    API

    type doc

    The type of unformated documents. Elements of this type can be constructed in two ways. Either with a number of constructor shown below, or using the Pretty.dprintf function with a printf-like interface. The Pretty.dprintf method is slightly slower so we do not use it for large jobs such as the output routines for a compiler. But we use it for small jobs such as logging and error messages.

    Constructors for the doc type.

    val nil : doc

    Constructs an empty document

    val (++) : doc -> doc -> doc

    Concatenates two documents. This is an infix operator that associates to the left.

    val concat : doc -> doc -> doc
    val text : string -> doc

    A document that prints the given string

    val num : int -> doc

    A document that prints an integer in decimal form

    val num64 : int64 -> doc

    A document that prints a 64-bit int in decimal form

    val real : float -> doc

    A document that prints a real number

    val chr : char -> doc

    A document that prints a character. This is just like Pretty.text with a one-character string.

    val line : doc

    A document that consists of a mandatory newline. This is just like (text "\n"). The new line will be indented to the current indentation level, unless you use Pretty.leftflush right after this.

    val leftflush : doc

    Use after a Pretty.line to prevent the indentation. Whatever follows next will be flushed left. Indentation resumes on the next line.

    val break : doc

    A document that consists of either a space or a line break. Also called an optional line break. Such a break will be taken only if necessary to fit the document in a given width. If the break is not taken a space is printed instead.

    val align : doc

    Mark the current column as the current indentation level. Does not print anything. All taken line breaks will align to this column. The previous alignment level is saved on a stack.

    val unalign : doc

    Reverts to the last saved indentation level.

    val mark : doc

    Mark the beginning of a markup section. The width of a markup section is considered 0 for the purpose of computing identation

    val unmark : doc

    The end of a markup section

    Syntactic sugar

    val indent : int -> doc -> doc

    Indents the document. Same as ((text " ") ++ align ++ doc ++ unalign), with the specified number of spaces.

    val markup : doc -> doc

    Prints a document as markup. The marked document cannot contain line breaks or alignment constructs.

    val seq : sep:doc -> doit:('a -> doc) -> elements:'a list -> doc

    Formats a sequence. sep is a separator, doit is a function that converts an element to a document.

    val docList : ?sep:doc -> ('a -> doc) -> unit -> 'a list -> doc

    An alternative function for printing a list. The unit argument is there to make this function more easily usable with the Pretty.dprintf interface. The first argument is a separator, by default a comma.

    val d_list : string -> (unit -> 'a -> doc) -> unit -> 'a list -> doc

    sm: Yet another list printer. This one accepts the same kind of printing function that Pretty.dprintf does, and itself works in the dprintf context. Also accepts a string as the separator since that's by far the most common.

    val docArray : ?sep:doc -> (int -> 'a -> doc) -> unit -> 'a array -> doc

    Formats an array. A separator and a function that prints an array element. The default separator is a comma.

    val docOpt : ('a -> doc) -> unit -> 'a option -> doc

    Prints an 'a option with None or Some

    val d_int32 : int32 -> doc

    Print an int32

    val f_int32 : unit -> int32 -> doc
    val d_int64 : int64 -> doc
    val f_int64 : unit -> int64 -> doc
    module MakeMapPrinter (Map : sig ... end) : sig ... end

    Format maps.

    module MakeSetPrinter (Set : sig ... end) : sig ... end

    Format sets.

    val insert : unit -> doc -> doc

    A function that is useful with the printf-like interface

    val dprintf : ('a, unit, doc, doc) Stdlib.format4 -> 'a

    This function provides an alternative method for constructing doc objects. The first argument for this function is a format string argument (of type ('a, unit, doc) format; if you insist on understanding what that means see the module Printf). The format string is like that for the printf function in C, except that it understands a few more formatting controls, all starting with the @ character.

    See the gprintf function if you want to pipe the result of dprintf into some other functions.

    The following special formatting characters are understood (these do not correspond to arguments of the function):

    In addition to the usual printf % formatting characters the following two new characters are supported:

    • %t Corresponds to an argument of type unit -> doc. This argument is invoked to produce a document
    • %a Corresponds to two arguments. The first of type unit -> 'a -> doc and the second of type 'a. (The extra unit is do to the peculiarities of the built-in support for format strings in Ocaml. It turns out that it is not a major problem.) Here is an example of how you use this:
    dprintf "Name=%s, SSN=%7d, Children=\@\[%a\@\]\n"
                  pers.name pers.ssn (docList (chr ',' ++ break) text)
                  pers.children

    The result of dprintf is a Pretty.doc. You can format the document and emit it using the functions Pretty.fprint and Pretty.sprint.

    val gprintf : (doc -> 'b) -> ('a, unit, doc, 'b) Stdlib.format4 -> 'a

    Like Pretty.dprintf but more general. It also takes a function that is invoked on the constructed document but before any formatting is done. The type of the format argument means that 'a is the type of the parameters of this function, unit is the type of the first argument to %a and %t formats, doc is the type of the intermediate result, and 'b is the type of the result of gprintf.

    val fprint : Stdlib.out_channel -> width:int -> doc -> unit

    Format the document to the given width and emit it to the given channel

    val sprint : width:int -> doc -> string

    Format the document to the given width and emit it as a string

    val fprintf : Stdlib.out_channel -> ('a, unit, doc) Stdlib.format -> 'a

    Like Pretty.dprintf followed by Pretty.fprint

    val printf : ('a, unit, doc) Stdlib.format -> 'a

    Like Pretty.fprintf applied to stdout

    val eprintf : ('a, unit, doc) Stdlib.format -> 'a

    Like Pretty.fprintf applied to stderr

    val withPrintDepth : int -> (unit -> unit) -> unit

    Invokes a thunk, with printDepth temporarily set to the specified value

    The following variables can be used to control the operation of the printer

    val printDepth : int Stdlib.ref

    Specifies the nesting depth of the align/unalign pairs at which everything is replaced with ellipsis

    val printIndent : bool Stdlib.ref

    If false then does not indent

    val fastMode : bool Stdlib.ref

    If set to true then optional breaks are taken only when the document has exceeded the given width. This means that the printout will looked more ragged but it will be faster

    val flushOften : bool Stdlib.ref

    If true the it flushes after every print

    val flattenBeforePrint : bool Stdlib.ref

    Whether to rebalance doc before printing it to avoid stack-overflows

    val countNewLines : int Stdlib.ref

    Keep a running count of the taken newlines. You can read and write this from the client code if you want

    val auto_printer : string -> 'b

    A function that when used at top-level in a module will direct the pa_prtype module generate automatically the printing functions for a type

    diff --git a/api/goblint-cil/GoblintCil/RmUnused/index.html b/api/goblint-cil/GoblintCil/RmUnused/index.html index bb23c715a..15d71f8a4 100644 --- a/api/goblint-cil/GoblintCil/RmUnused/index.html +++ b/api/goblint-cil/GoblintCil/RmUnused/index.html @@ -1,2 +1,2 @@ -RmUnused (goblint-cil.GoblintCil.RmUnused)

    Module GoblintCil.RmUnused

    type rootsFilter = Cil.global -> bool
    val isDefaultRoot : rootsFilter
    val isExportedRoot : rootsFilter
    val isCompleteProgramRoot : rootsFilter
    val removeUnused : ?isRoot:rootsFilter -> Cil.file -> unit
    val keepUnused : bool Stdlib.ref
    val rmUnusedInlines : bool Stdlib.ref
    +RmUnused (goblint-cil.GoblintCil.RmUnused)

    Module GoblintCil.RmUnused

    type rootsFilter = Cil.global -> bool
    val isDefaultRoot : rootsFilter
    val isExportedRoot : rootsFilter
    val isCompleteProgramRoot : rootsFilter
    val removeUnused : ?isRoot:rootsFilter -> Cil.file -> unit
    val keepUnused : bool Stdlib.ref
    val rmUnusedInlines : bool Stdlib.ref
    diff --git a/api/goblint-cil/GoblintCil/Stats/index.html b/api/goblint-cil/GoblintCil/Stats/index.html index d1d90b64b..b0386213f 100644 --- a/api/goblint-cil/GoblintCil/Stats/index.html +++ b/api/goblint-cil/GoblintCil/Stats/index.html @@ -1,2 +1,2 @@ -Stats (goblint-cil.GoblintCil.Stats)

    Module GoblintCil.Stats

    Utilities for maintaining timing statistics

    type timerModeEnum =
    1. | Disabled
      (*

      Do not collect timing information

      *)
    2. | SoftwareTimer
      (*

      Use OCaml's Unix.time for timing information

      *)
    type t = {
    1. name : string;
      (*

      Name of the task

      *)
    2. mutable time : float;
      (*

      In seconds

      *)
    3. mutable ncalls : int;
      (*

      Number of repetitions. Only set if Stats.countCalls is true.

      *)
    4. mutable sub : t list;
      (*

      Subtasks

      *)
    }

    A timing entry

    val top : t

    The top-level timing entry

    val reset : timerModeEnum -> unit

    Resets all the timings and specifies the method to use for future timings. Call this before doing any timing.

    val countCalls : bool Stdlib.ref

    Flag to indicate whether or not to count the number of calls of to Stats.repeattime or Stats.time for each label. (default: false)

    val time : string -> ('a -> 'b) -> 'a -> 'b

    Time a function and associate the time with the given string. If some timing information is already associated with that string, then accumulate the times. If this function is invoked within another timed function then you can have a hierarchy of timings

    val repeattime : float -> string -> ('a -> 'b) -> 'a -> 'b

    repeattime is like time but runs the function several times until the total running time is greater or equal to the first argument. The total time is then divided by the number of times the function was run.

    val print : Stdlib.out_channel -> string -> unit

    Print the current stats preceeded by a message

    val lookupTime : string -> float

    Return the cumulative time of all calls to Stats.time and Stats.repeattime with the given label.

    val timethis : ('a -> 'b) -> 'a -> 'b

    Time a function and set lastTime to the time it took

    val lastTime : float Stdlib.ref
    +Stats (goblint-cil.GoblintCil.Stats)

    Module GoblintCil.Stats

    Utilities for maintaining timing statistics

    type timerModeEnum =
    1. | Disabled
      (*

      Do not collect timing information

      *)
    2. | SoftwareTimer
      (*

      Use OCaml's Unix.time for timing information

      *)
    type t = {
    1. name : string;
      (*

      Name of the task

      *)
    2. mutable time : float;
      (*

      In seconds

      *)
    3. mutable ncalls : int;
      (*

      Number of repetitions. Only set if Stats.countCalls is true.

      *)
    4. mutable sub : t list;
      (*

      Subtasks

      *)
    }

    A timing entry

    val top : t

    The top-level timing entry

    val reset : timerModeEnum -> unit

    Resets all the timings and specifies the method to use for future timings. Call this before doing any timing.

    val countCalls : bool Stdlib.ref

    Flag to indicate whether or not to count the number of calls of to Stats.repeattime or Stats.time for each label. (default: false)

    val time : string -> ('a -> 'b) -> 'a -> 'b

    Time a function and associate the time with the given string. If some timing information is already associated with that string, then accumulate the times. If this function is invoked within another timed function then you can have a hierarchy of timings

    val repeattime : float -> string -> ('a -> 'b) -> 'a -> 'b

    repeattime is like time but runs the function several times until the total running time is greater or equal to the first argument. The total time is then divided by the number of times the function was run.

    val print : Stdlib.out_channel -> string -> unit

    Print the current stats preceeded by a message

    val lookupTime : string -> float

    Return the cumulative time of all calls to Stats.time and Stats.repeattime with the given label.

    val timethis : ('a -> 'b) -> 'a -> 'b

    Time a function and set lastTime to the time it took

    val lastTime : float Stdlib.ref
    diff --git a/api/goblint-cil/GoblintCil/Trace/index.html b/api/goblint-cil/GoblintCil/Trace/index.html index 87b12b0c4..fc20263d0 100644 --- a/api/goblint-cil/GoblintCil/Trace/index.html +++ b/api/goblint-cil/GoblintCil/Trace/index.html @@ -1,2 +1,2 @@ -Trace (goblint-cil.GoblintCil.Trace)

    Module GoblintCil.Trace

    val traceSubsystems : string list Stdlib.ref
    val traceAddSys : string -> unit
    val traceActive : string -> bool
    val traceAddMulti : string -> unit
    val traceIndentLevel : int Stdlib.ref
    val traceIndent : string -> unit
    val traceOutdent : string -> unit
    val trace : string -> Pretty.doc -> unit
    val tracei : string -> Pretty.doc -> unit
    val traceu : string -> Pretty.doc -> unit
    +Trace (goblint-cil.GoblintCil.Trace)

    Module GoblintCil.Trace

    val traceSubsystems : string list Stdlib.ref
    val traceAddSys : string -> unit
    val traceActive : string -> bool
    val traceAddMulti : string -> unit
    val traceIndentLevel : int Stdlib.ref
    val traceIndent : string -> unit
    val traceOutdent : string -> unit
    val trace : string -> Pretty.doc -> unit
    val tracei : string -> Pretty.doc -> unit
    val traceu : string -> Pretty.doc -> unit
    diff --git a/api/goblint-cil/GoblintCil/Util/index.html b/api/goblint-cil/GoblintCil/Util/index.html index d8c3d419b..91344be6e 100644 --- a/api/goblint-cil/GoblintCil/Util/index.html +++ b/api/goblint-cil/GoblintCil/Util/index.html @@ -1,2 +1,2 @@ -Util (goblint-cil.GoblintCil.Util)

    Module GoblintCil.Util

    A bunch of generally useful functions

    val list_append : 'a list -> 'a list -> 'a list

    tail-recursive append

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    More efficient map

    val memoize : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> ('a -> 'b) -> 'b
    val valOf : 'a option -> 'a

    Get the value of an option. Raises Failure if None

    val list_map_opt : ('a -> 'b) -> 'a list option -> 'b list option
    val equals : 'a -> 'a -> bool

    This has the semantics of (=) on OCaml 3.07 and earlier. It can handle cyclic values as long as a structure in the cycle has a unique name or id in some field that occurs before any fields that have cyclic pointers.

    val list_filter_map : ('a -> 'b option) -> 'a list -> 'b list
    +Util (goblint-cil.GoblintCil.Util)

    Module GoblintCil.Util

    A bunch of generally useful functions

    val list_append : 'a list -> 'a list -> 'a list

    tail-recursive append

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    More efficient map

    val memoize : ('a, 'b) Stdlib.Hashtbl.t -> 'a -> ('a -> 'b) -> 'b
    val valOf : 'a option -> 'a

    Get the value of an option. Raises Failure if None

    val list_map_opt : ('a -> 'b) -> 'a list option -> 'b list option
    val equals : 'a -> 'a -> bool

    This has the semantics of (=) on OCaml 3.07 and earlier. It can handle cyclic values as long as a structure in the cycle has a unique name or id in some field that occurs before any fields that have cyclic pointers.

    val list_filter_map : ('a -> 'b option) -> 'a list -> 'b list
    diff --git a/api/goblint-cil/GoblintCil/Whitetrack/index.html b/api/goblint-cil/GoblintCil/Whitetrack/index.html index 959c4476c..f01427bc4 100644 --- a/api/goblint-cil/GoblintCil/Whitetrack/index.html +++ b/api/goblint-cil/GoblintCil/Whitetrack/index.html @@ -1,5 +1,5 @@ -Whitetrack (goblint-cil.GoblintCil.Whitetrack)

    Module GoblintCil.Whitetrack

    val wraplexer : +Whitetrack (goblint-cil.GoblintCil.Whitetrack)

    Module GoblintCil.Whitetrack

    val wraplexer : (Stdlib.Lexing.lexbuf -> string * string * 'a * Cabs.cabsloc) -> Stdlib.Lexing.lexbuf -> 'a
    val setFinalWhite : string -> unit
    val print : string -> unit
    val printl : string list -> unit
    val printu : string -> unit
    val print_maybe : string -> unit
    val printEOF : unit -> unit
    val setLoc : Cabs.cabsloc -> unit
    val setOutput : Stdlib.out_channel -> unit
    val getOutput : unit -> Stdlib.out_channel
    val enabled : bool Stdlib.ref
    diff --git a/api/goblint-cil/GoblintCil/class-defaultCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/class-defaultCilPrinterClass/index.html index f2ba6ce39..511c8b29a 100644 --- a/api/goblint-cil/GoblintCil/class-defaultCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/class-defaultCilPrinterClass/index.html @@ -1,5 +1,5 @@ -defaultCilPrinterClass (goblint-cil.GoblintCil.defaultCilPrinterClass)

    Class GoblintCil.defaultCilPrinterClass

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> +defaultCilPrinterClass (goblint-cil.GoblintCil.defaultCilPrinterClass)

    Class GoblintCil.defaultCilPrinterClass

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

    Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

    Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

    method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

    Attribute parameter

    method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

    Attribute lists

    method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

    Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

    method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

    Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

    method pExp : unit -> exp -> GoblintCil__.Pretty.doc

    Print expressions

    method pInit : unit -> init -> GoblintCil__.Pretty.doc

    Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

    method dInit : Stdlib.out_channel -> int -> init -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    diff --git a/api/goblint-cil/GoblintCil/class-descriptiveCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/class-descriptiveCilPrinterClass/index.html index a0f8980cf..3f6763cba 100644 --- a/api/goblint-cil/GoblintCil/class-descriptiveCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/class-descriptiveCilPrinterClass/index.html @@ -1,2 +1,2 @@ -descriptiveCilPrinterClass (goblint-cil.GoblintCil.descriptiveCilPrinterClass)

    Class GoblintCil.descriptiveCilPrinterClass

    Like defaultCilPrinterClass, but instead of temporary variable names it prints the description that was provided when the temp was created. This is usually better for messages that are printed for end users, although you may want the temporary names for debugging.

    The boolean here enables descriptive printing. Usually use true here, but you can set enable to false to make this class behave like defaultCilPrinterClass. This allows subclasses to turn the feature off.

    inherit cilPrinter
    method startTemps : unit -> unit
    method stopTemps : unit -> unit
    method pTemps : unit -> GoblintCil__.Pretty.doc
    +descriptiveCilPrinterClass (goblint-cil.GoblintCil.descriptiveCilPrinterClass)

    Class GoblintCil.descriptiveCilPrinterClass

    Like defaultCilPrinterClass, but instead of temporary variable names it prints the description that was provided when the temp was created. This is usually better for messages that are printed for end users, although you may want the temporary names for debugging.

    The boolean here enables descriptive printing. Usually use true here, but you can set enable to false to make this class behave like defaultCilPrinterClass. This allows subclasses to turn the feature off.

    inherit cilPrinter
    method startTemps : unit -> unit
    method stopTemps : unit -> unit
    method pTemps : unit -> GoblintCil__.Pretty.doc
    diff --git a/api/goblint-cil/GoblintCil/class-nopCilVisitor/index.html b/api/goblint-cil/GoblintCil/class-nopCilVisitor/index.html index 962612f59..96a8e245d 100644 --- a/api/goblint-cil/GoblintCil/class-nopCilVisitor/index.html +++ b/api/goblint-cil/GoblintCil/class-nopCilVisitor/index.html @@ -1,2 +1,2 @@ -nopCilVisitor (goblint-cil.GoblintCil.nopCilVisitor)

    Class GoblintCil.nopCilVisitor

    Default Visitor. Traverses the CIL tree without modifying anything

    method vvdec : varinfo -> varinfo visitAction

    Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

    method vvrbl : varinfo -> varinfo visitAction

    Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

    method vexpr : exp -> exp visitAction

    Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

    method vlval : lval -> lval visitAction

    Invoked on each lvalue occurrence

    method voffs : offset -> offset visitAction

    Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

    method vinitoffs : offset -> offset visitAction

    Invoked on each offset appearing in the list of a CompoundInit initializer.

    method vinst : instr -> instr list visitAction

    Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

    method vstmt : stmt -> stmt visitAction

    Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

    method vblock : block -> block visitAction

    Block.

    method vfunc : fundec -> fundec visitAction

    Function definition. Replaced in place.

    method vglob : global -> global list visitAction

    Global (vars, types, etc.)

    method vinit : varinfo -> offset -> init -> init visitAction

    Initializers for static, const and global variables, pass the variable where this occurs, and the offset

    method vtype : typ -> typ visitAction

    Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method vattr : attribute -> attribute list visitAction

    Attribute. Each attribute can be replaced by a list

    method vattrparam : attrparam -> attrparam visitAction

    Attribute parameters.

    method queueInstr : instr list -> unit

    Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

    method unqueueInstr : unit -> instr list

    Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

    +nopCilVisitor (goblint-cil.GoblintCil.nopCilVisitor)

    Class GoblintCil.nopCilVisitor

    Default Visitor. Traverses the CIL tree without modifying anything

    method vvdec : varinfo -> varinfo visitAction

    Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

    method vvrbl : varinfo -> varinfo visitAction

    Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

    method vexpr : exp -> exp visitAction

    Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

    method vlval : lval -> lval visitAction

    Invoked on each lvalue occurrence

    method voffs : offset -> offset visitAction

    Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

    method vinitoffs : offset -> offset visitAction

    Invoked on each offset appearing in the list of a CompoundInit initializer.

    method vinst : instr -> instr list visitAction

    Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

    method vstmt : stmt -> stmt visitAction

    Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

    method vblock : block -> block visitAction

    Block.

    method vfunc : fundec -> fundec visitAction

    Function definition. Replaced in place.

    method vglob : global -> global list visitAction

    Global (vars, types, etc.)

    method vinit : varinfo -> offset -> init -> init visitAction

    Initializers for static, const and global variables, pass the variable where this occurs, and the offset

    method vtype : typ -> typ visitAction

    Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method vattr : attribute -> attribute list visitAction

    Attribute. Each attribute can be replaced by a list

    method vattrparam : attrparam -> attrparam visitAction

    Attribute parameters.

    method queueInstr : instr list -> unit

    Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

    method unqueueInstr : unit -> instr list

    Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

    diff --git a/api/goblint-cil/GoblintCil/class-plainCilPrinterClass/index.html b/api/goblint-cil/GoblintCil/class-plainCilPrinterClass/index.html index 622348497..cff3042da 100644 --- a/api/goblint-cil/GoblintCil/class-plainCilPrinterClass/index.html +++ b/api/goblint-cil/GoblintCil/class-plainCilPrinterClass/index.html @@ -1,5 +1,5 @@ -plainCilPrinterClass (goblint-cil.GoblintCil.plainCilPrinterClass)

    Class GoblintCil.plainCilPrinterClass

    These are pretty-printers that will show you more details on the internal CIL representation, without trying hard to make it look like C

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> +plainCilPrinterClass (goblint-cil.GoblintCil.plainCilPrinterClass)

    Class GoblintCil.plainCilPrinterClass

    These are pretty-printers that will show you more details on the internal CIL representation, without trying hard to make it look like C

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

    Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

    Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

    method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

    Attribute parameter

    method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

    Attribute lists

    method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

    Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

    method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

    Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

    method pExp : unit -> exp -> GoblintCil__.Pretty.doc

    Print expressions

    method pInit : unit -> init -> GoblintCil__.Pretty.doc

    Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

    method dInit : Stdlib.out_channel -> int -> init -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    diff --git a/api/goblint-cil/GoblintCil/class-type-cilPrinter/index.html b/api/goblint-cil/GoblintCil/class-type-cilPrinter/index.html index 364149d7d..3deae2082 100644 --- a/api/goblint-cil/GoblintCil/class-type-cilPrinter/index.html +++ b/api/goblint-cil/GoblintCil/class-type-cilPrinter/index.html @@ -1,5 +1,5 @@ -cilPrinter (goblint-cil.GoblintCil.cilPrinter)

    Class type GoblintCil.cilPrinter

    A printer interface for CIL trees. Create instantiations of this type by specializing the class defaultCilPrinterClass.

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> +cilPrinter (goblint-cil.GoblintCil.cilPrinter)

    Class type GoblintCil.cilPrinter

    A printer interface for CIL trees. Create instantiations of this type by specializing the class defaultCilPrinterClass.

    method setCurrentFormals : varinfo list -> unit
    method setPrintInstrTerminator : string -> unit
    method getPrintInstrTerminator : unit -> string
    method pVDecl : unit -> varinfo -> GoblintCil__.Pretty.doc

    Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

    method pVar : varinfo -> GoblintCil__.Pretty.doc

    Invoked on each variable use.

    method pLval : unit -> lval -> GoblintCil__.Pretty.doc

    Invoked on each lvalue occurrence

    method pOffset : GoblintCil__.Pretty.doc -> offset -> GoblintCil__.Pretty.doc

    Invoked on each offset occurrence. The second argument is the base.

    method pInstr : unit -> instr -> GoblintCil__.Pretty.doc

    Invoked on each instruction occurrence.

    method pLabel : unit -> label -> GoblintCil__.Pretty.doc

    Print a label.

    method pStmt : unit -> stmt -> GoblintCil__.Pretty.doc

    Control-flow statement. This is used by printGlobal and by dumpGlobal.

    method dStmt : Stdlib.out_channel -> int -> stmt -> unit

    Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

    method dBlock : Stdlib.out_channel -> int -> block -> unit

    Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

    method pBlock : unit -> block -> GoblintCil__.Pretty.doc

    Print a block.

    method pGlobal : unit -> global -> GoblintCil__.Pretty.doc

    Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

    method dGlobal : Stdlib.out_channel -> global -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    method pFieldDecl : unit -> fieldinfo -> GoblintCil__.Pretty.doc

    A field declaration

    method pType : GoblintCil__.Pretty.doc option -> unit -> typ -> GoblintCil__.Pretty.doc

    Use of some type in some declaration. The first argument is used to print the declared element, or is None if we are just printing a type with no name being declared. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method pAttr : attribute -> GoblintCil__.Pretty.doc * bool

    Attribute. Also return an indication whether this attribute must be printed inside the __attribute__ list or not.

    method pAttrParam : unit -> attrparam -> GoblintCil__.Pretty.doc

    Attribute parameter

    method pAttrs : unit -> attributes -> GoblintCil__.Pretty.doc

    Attribute lists

    method pLineDirective : ?forcefile:bool -> location -> GoblintCil__.Pretty.doc

    Print a line-number. This is assumed to come always on an empty line. If the forcefile argument is present and is true then the file name will be printed always. Otherwise the file name is printed only if it is different from the last time time this function is called. The last file name is stored in a private field inside the cilPrinter object.

    method pStmtKind : stmt -> unit -> stmtkind -> GoblintCil__.Pretty.doc

    Print a statement kind. The code to be printed is given in the stmtkind argument. The initial stmt argument records the statement which follows the one being printed; defaultCilPrinterClass uses this information to prettify statement printing in certain special cases.

    method pExp : unit -> exp -> GoblintCil__.Pretty.doc

    Print expressions

    method pInit : unit -> init -> GoblintCil__.Pretty.doc

    Print initializers. This can be slow and is used by printGlobal but not by dumpGlobal.

    method dInit : Stdlib.out_channel -> int -> init -> unit

    Dump a global to a file with a given indentation. This is used by dumpGlobal

    diff --git a/api/goblint-cil/GoblintCil/class-type-cilVisitor/index.html b/api/goblint-cil/GoblintCil/class-type-cilVisitor/index.html index 6ec4761c1..1f16b7150 100644 --- a/api/goblint-cil/GoblintCil/class-type-cilVisitor/index.html +++ b/api/goblint-cil/GoblintCil/class-type-cilVisitor/index.html @@ -1,2 +1,2 @@ -cilVisitor (goblint-cil.GoblintCil.cilVisitor)

    Class type GoblintCil.cilVisitor

    A visitor interface for traversing CIL trees. Create instantiations of this type by specializing the class nopCilVisitor. Each of the specialized visiting functions can also call the queueInstr to specify that some instructions should be inserted before the current instruction or statement. Use syntax like self#queueInstr to call a method associated with the current object.

    method vvdec : varinfo -> varinfo visitAction

    Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

    method vvrbl : varinfo -> varinfo visitAction

    Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

    method vexpr : exp -> exp visitAction

    Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

    method vlval : lval -> lval visitAction

    Invoked on each lvalue occurrence

    method voffs : offset -> offset visitAction

    Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

    method vinitoffs : offset -> offset visitAction

    Invoked on each offset appearing in the list of a CompoundInit initializer.

    method vinst : instr -> instr list visitAction

    Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

    method vstmt : stmt -> stmt visitAction

    Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

    method vblock : block -> block visitAction

    Block.

    method vfunc : fundec -> fundec visitAction

    Function definition. Replaced in place.

    method vglob : global -> global list visitAction

    Global (vars, types, etc.)

    method vinit : varinfo -> offset -> init -> init visitAction

    Initializers for static, const and global variables, pass the variable where this occurs, and the offset

    method vtype : typ -> typ visitAction

    Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method vattr : attribute -> attribute list visitAction

    Attribute. Each attribute can be replaced by a list

    method vattrparam : attrparam -> attrparam visitAction

    Attribute parameters.

    method queueInstr : instr list -> unit

    Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

    method unqueueInstr : unit -> instr list

    Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

    +cilVisitor (goblint-cil.GoblintCil.cilVisitor)

    Class type GoblintCil.cilVisitor

    A visitor interface for traversing CIL trees. Create instantiations of this type by specializing the class nopCilVisitor. Each of the specialized visiting functions can also call the queueInstr to specify that some instructions should be inserted before the current instruction or statement. Use syntax like self#queueInstr to call a method associated with the current object.

    method vvdec : varinfo -> varinfo visitAction

    Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

    method vvrbl : varinfo -> varinfo visitAction

    Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

    method vexpr : exp -> exp visitAction

    Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

    method vlval : lval -> lval visitAction

    Invoked on each lvalue occurrence

    method voffs : offset -> offset visitAction

    Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

    method vinitoffs : offset -> offset visitAction

    Invoked on each offset appearing in the list of a CompoundInit initializer.

    method vinst : instr -> instr list visitAction

    Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

    method vstmt : stmt -> stmt visitAction

    Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

    method vblock : block -> block visitAction

    Block.

    method vfunc : fundec -> fundec visitAction

    Function definition. Replaced in place.

    method vglob : global -> global list visitAction

    Global (vars, types, etc.)

    method vinit : varinfo -> offset -> init -> init visitAction

    Initializers for static, const and global variables, pass the variable where this occurs, and the offset

    method vtype : typ -> typ visitAction

    Use of some type. Note that for structure/union and enumeration types the definition of the composite type is not visited. Use vglob to visit it.

    method vattr : attribute -> attribute list visitAction

    Attribute. Each attribute can be replaced by a list

    method vattrparam : attrparam -> attrparam visitAction

    Attribute parameters.

    method queueInstr : instr list -> unit

    Add here instructions while visiting to queue them to precede the current statement or instruction being processed. Use this method only when you are visiting an expression that is inside a function body, or a statement, because otherwise there will no place for the visitor to place your instructions.

    method unqueueInstr : unit -> instr list

    Gets the queue of instructions and resets the queue. This is done automatically for you when you visit statements.

    diff --git a/api/goblint-cil/GoblintCil/class-type-descriptiveCilPrinter/index.html b/api/goblint-cil/GoblintCil/class-type-descriptiveCilPrinter/index.html index e802e6824..becef7aaf 100644 --- a/api/goblint-cil/GoblintCil/class-type-descriptiveCilPrinter/index.html +++ b/api/goblint-cil/GoblintCil/class-type-descriptiveCilPrinter/index.html @@ -1,2 +1,2 @@ -descriptiveCilPrinter (goblint-cil.GoblintCil.descriptiveCilPrinter)

    Class type GoblintCil.descriptiveCilPrinter

    inherit cilPrinter
    method startTemps : unit -> unit
    method stopTemps : unit -> unit
    method pTemps : unit -> GoblintCil__.Pretty.doc
    +descriptiveCilPrinter (goblint-cil.GoblintCil.descriptiveCilPrinter)

    Class type GoblintCil.descriptiveCilPrinter

    inherit cilPrinter
    method startTemps : unit -> unit
    method stopTemps : unit -> unit
    method pTemps : unit -> GoblintCil__.Pretty.doc
    diff --git a/api/goblint-cil/GoblintCil/index.html b/api/goblint-cil/GoblintCil/index.html index 0da176a28..ed07549f0 100644 --- a/api/goblint-cil/GoblintCil/index.html +++ b/api/goblint-cil/GoblintCil/index.html @@ -1,5 +1,5 @@ -GoblintCil (goblint-cil.GoblintCil)

    Module GoblintCil

    CIL API Documentation.

    val initCIL : unit -> unit

    Call this function to perform some initialization.

    val cilVersion : string

    These are the CIL version numbers. A CIL version is a number of the form M.m.r (major, minor and release)

    type cstd = Cil.cstd =
    1. | C90
    2. | C99
    3. | C11
    val cstd_of_string : string -> cstd
    val cstd : cstd Stdlib.ref
    val gnu89inline : bool Stdlib.ref
    val addReturnOnNoreturnFallthrough : bool Stdlib.ref

    This module defines the abstract syntax of CIL. It also provides utility functions for traversing the CIL data structures, and pretty-printing them. The parser can be invoked as Frontc.parse: string -> unit -> file. This function must be given the name of a preprocessed C file and will return the top-level data structure that describes a whole source file. The parsing and elaboration into CIL is done as for GCC source.

    The Abstract Syntax of CIL

    The top-level representation of a CIL source file (and the result of the parsing and elaboration). Its main contents is the list of global declarations and definitions. You can iterate over the globals in a file using the following iterators: mapGlobals, iterGlobals and foldGlobals. You can also use the dummyFile when you need a file as a placeholder. For each global item CIL stores the source location where it appears (using the type location)

    type file = Cil.file = {
    1. mutable fileName : string;
      (*

      The complete file name

      *)
    2. mutable globals : global list;
      (*

      List of globals as they will appear in the printed file

      *)
    3. mutable globinit : fundec option;
      (*

      An optional global initializer function. This is a function where you can put stuff that must be executed before the program is started. This function is conceptually at the end of the file, although it is not part of the globals list. Use getGlobInit to create/get one.

      *)
    4. mutable globinitcalled : bool;
      (*

      Whether the global initialization function is called in main. This should always be false if there is no global initializer. When you create a global initialization CIL will try to insert code in main to call it. This will not happen if your file does not contain a function called "main"

      *)
    }

    Top-level representation of a C source file

    and comment = location * string

    Globals. The main type for representing global declarations and definitions. A list of these form a CIL file. The order of globals in the file is generally important.

    and global = Cil.global =
    1. | GType of typeinfo * location
      (*

      A typedef. All uses of type names (through the TNamed constructor) must be preceded in the file by a definition of the name. The string is the defined name and always not-empty.

      *)
    2. | GCompTag of compinfo * location
      (*

      Defines a struct/union tag with some fields. There must be one of these for each struct/union tag that you use (through the TComp constructor) since this is the only context in which the fields are printed. Consequently nested structure tag definitions must be broken into individual definitions with the innermost structure defined first.

      *)
    3. | GCompTagDecl of compinfo * location
      (*

      Declares a struct/union tag. Use as a forward declaration. This is printed without the fields.

      *)
    4. | GEnumTag of enuminfo * location
      (*

      Declares an enumeration tag with some fields. There must be one of these for each enumeration tag that you use (through the TEnum constructor) since this is the only context in which the items are printed.

      *)
    5. | GEnumTagDecl of enuminfo * location
      (*

      Declares an enumeration tag. Use as a forward declaration. This is printed without the items.

      *)
    6. | GVarDecl of varinfo * location
      (*

      A variable declaration (not a definition). If the variable has a function type then this is a prototype. There can be several declarations and at most one definition for a given variable. If both forms appear then they must share the same varinfo structure. A prototype shares the varinfo with the fundec of the definition. Either has storage Extern or there must be a definition in this file

      *)
    7. | GVar of varinfo * initinfo * location
      (*

      A variable definition. Can have an initializer. The initializer is updateable so that you can change it without requiring to recreate the list of globals. There can be at most one definition for a variable in an entire program. Cannot have storage Extern or function type. Note: the initializer field is kept for backwards compatibility, but it is now also available directly in the varinfo.

      *)
    8. | GFun of fundec * location
      (*

      A function definition.

      *)
    9. | GAsm of string * location
      (*

      Global asm statement. These ones can contain only a template

      *)
    10. | GPragma of attribute * location
      (*

      Pragmas at top level. Use the same syntax as attributes

      *)
    11. | GText of string
      (*

      Some text (printed verbatim) at top level. E.g., this way you can put comments in the output.

      *)

    A global declaration or definition

    Types. A C type is represented in CIL using the type typ. Among types we differentiate the integral types (with different kinds denoting the sign and precision), floating point types, enumeration types, array and pointer types, and function types. Every type is associated with a list of attributes, which are always kept in sorted order. Use addAttribute and addAttributes to construct list of attributes. If you want to inspect a type, you should use unrollType or unrollTypeDeep to see through the uses of named types.

    CIL is configured at build-time with the sizes and alignments of the underlying compiler. CIL contains functions that can compute the size of a type (in bits) bitsSizeOf, the alignment of a type (in bytes) alignOf_int, and can convert an offset into a start and width (both in bits) using the function bitsOffset. At the moment these functions do not take into account the packed attributes and pragmas.

    and typ = Cil.typ =
    1. | TVoid of attributes
      (*

      Void type. Also predefined as voidType

      *)
    2. | TInt of ikind * attributes
      (*

      An integer type. The kind specifies the sign and width. Several useful variants are predefined as intType, uintType, longType, charType.

      *)
    3. | TFloat of fkind * attributes
      (*

      A floating-point type. The kind specifies the precision. You can also use the predefined constant doubleType.

      *)
    4. | TPtr of typ * attributes
      (*

      Pointer type. Several useful variants are predefined as charPtrType, charConstPtrType (pointer to a constant character), voidPtrType, intPtrType

      *)
    5. | TArray of typ * exp option * attributes
      (*

      Array type. It indicates the base type and the array length.

      *)
    6. | TFun of typ * (string * typ * attributes) list option * bool * attributes
      (*

      Function type. Indicates the type of the result, the name, type and name attributes of the formal arguments (None if no arguments were specified, as in a function whose definition or prototype we have not seen; Some [] means void). Use argsToList to obtain a list of arguments. The boolean indicates if it is a variable-argument function. If this is the type of a varinfo for which we have a function declaration then the information for the formals must match that in the function's sformals. Use setFormals, or setFunctionType, or makeFormalVar for this purpose.

      *)
    7. | TNamed of typeinfo * attributes
      (*

      The use of a named type. Each such type name must be preceded in the file by a GType global. This is printed as just the type name. The actual referred type is not printed here and is carried only to simplify processing. To see through a sequence of named type references, use unrollType or unrollTypeDeep. The attributes are in addition to those given when the type name was defined.

      *)
    8. | TComp of compinfo * attributes
      (*

      The most delicate issue for C types is that recursion that is possible by using structures and pointers. To address this issue we have a more complex representation for structured types (struct and union). Each such type is represented using the compinfo type. For each composite type the compinfo structure must be declared at top level using GCompTag and all references to it must share the same copy of the structure. The attributes given are those pertaining to this use of the type and are in addition to the attributes that were given at the definition of the type and which are stored in the compinfo.

      *)
    9. | TEnum of enuminfo * attributes
      (*

      A reference to an enumeration type. All such references must share the enuminfo among them and with a GEnumTag global that precedes all uses. The attributes refer to this use of the enumeration and are in addition to the attributes of the enumeration itself, which are stored inside the enuminfo

      *)
    10. | TBuiltin_va_list of attributes
      (*

      This is the same as the gcc's type with the same name

      *)

    There are a number of functions for querying the kind of a type. These are isIntegralType, isArithmeticType, isPointerType, isScalarType, isFunctionType, isArrayType.

    There are two easy ways to scan a type. First, you can use the existsType to return a boolean answer about a type. This function is controlled by a user-provided function that is queried for each type that is used to construct the current type. The function can specify whether to terminate the scan with a boolean result or to continue the scan for the nested types.

    The other method for scanning types is provided by the visitor interface (see cilVisitor).

    If you want to compare types (or to use them as hash-values) then you should use instead type signatures (represented as typsig). These contain the same information as types but canonicalized such that simple Ocaml structural equality will tell whether two types are equal. Use typeSig to compute the signature of a type. If you want to ignore certain type attributes then use typeSigWithAttrs.

    and ikind = Cil.ikind =
    1. | IChar
      (*

      char

      *)
    2. | ISChar
      (*

      signed char

      *)
    3. | IUChar
      (*

      unsigned char

      *)
    4. | IBool
      (*

      _Bool (C99)

      *)
    5. | IInt
      (*

      int

      *)
    6. | IUInt
      (*

      unsigned int

      *)
    7. | IShort
      (*

      short

      *)
    8. | IUShort
      (*

      unsigned short

      *)
    9. | ILong
      (*

      long

      *)
    10. | IULong
      (*

      unsigned long

      *)
    11. | ILongLong
      (*

      long long (or _int64 on Microsoft Visual C)

      *)
    12. | IULongLong
      (*

      unsigned long long (or unsigned _int64 on Microsoft Visual C)

      *)
    13. | IInt128
      (*

      __int128

      *)
    14. | IUInt128
      (*

      unsigned __int128

      *)

    Various kinds of integers

    and fkind = Cil.fkind =
    1. | FFloat
      (*

      float

      *)
    2. | FDouble
      (*

      double

      *)
    3. | FLongDouble
      (*

      long double

      *)
    4. | FFloat128
      (*

      float128

      *)
    5. | FComplexFloat
      (*

      float _Complex

      *)
    6. | FComplexDouble
      (*

      double _Complex

      *)
    7. | FComplexLongDouble
      (*

      long double _Complex

      *)
    8. | FComplexFloat128
      (*

      _float128 _Complex

      *)

    Various kinds of floating-point numbers

    Attributes.

    and attribute = Cil.attribute =
    1. | Attr of string * attrparam list
      (*

      An attribute has a name and some optional parameters. The name should not start or end with underscore. When CIL parses attribute names it will strip leading and ending underscores (to ensure that the multitude of GCC attributes such as const, __const and __const__ all mean the same thing.)

      *)
    and attributes = attribute list

    Attributes are lists sorted by the attribute name. Use the functions addAttribute and addAttributes to insert attributes in an attribute list and maintain the sortedness.

    and attrparam = Cil.attrparam =
    1. | AInt of int
      (*

      An integer constant

      *)
    2. | AStr of string
      (*

      A string constant

      *)
    3. | ACons of string * attrparam list
      (*

      Constructed attributes. These are printed foo(a1,a2,...,an). The list of parameters can be empty and in that case the parentheses are not printed.

      *)
    4. | ASizeOf of typ
      (*

      A way to talk about types

      *)
    5. | ASizeOfE of attrparam
    6. | ASizeOfS of typsig
      (*

      Replacement for ASizeOf in type signatures. Only used for attributes inside typsigs.

      *)
    7. | AAlignOf of typ
    8. | AAlignOfE of attrparam
    9. | AAlignOfS of typsig
    10. | AUnOp of unop * attrparam
    11. | ABinOp of binop * attrparam * attrparam
    12. | ADot of attrparam * string
      (*

      a.foo *

      *)
    13. | AStar of attrparam
      (*

      * a

      *)
    14. | AAddrOf of attrparam
      (*

      & a *

      *)
    15. | AIndex of attrparam * attrparam
      (*

      a1a2

      *)
    16. | AQuestion of attrparam * attrparam * attrparam
      (*

      a1 ? a2 : a3 *

      *)
    17. | AAssign of attrparam * attrparam
      (*

      a1 = a2

      *)

    The type of parameters of attributes

    Structures. The compinfo describes the definition of a structure or union type. Each such compinfo must be defined at the top-level using the GCompTag constructor and must be shared by all references to this type (using either the TComp type constructor or from the definition of the fields.

    If all you need is to scan the definition of each composite type once, you can do that by scanning all top-level GCompTag.

    Constructing a compinfo can be tricky since it must contain fields that might refer to the host compinfo and furthermore the type of the field might need to refer to the compinfo for recursive types. Use the mkCompInfo function to create a compinfo. You can easily fetch the fieldinfo for a given field in a structure with getCompField.

    and compinfo = Cil.compinfo = {
    1. mutable cstruct : bool;
      (*

      True if struct, False if union

      *)
    2. mutable cname : string;
      (*

      The name. Always non-empty. Use compFullName to get the full name of a comp (along with the struct or union)

      *)
    3. mutable ckey : int;
      (*

      A unique integer. This is assigned by mkCompInfo using a global variable in the Cil module. Thus two identical structs in two different files might have different keys. Use copyCompInfo to copy structures so that a new key is assigned.

      *)
    4. mutable cfields : fieldinfo list;
      (*

      Information about the fields. Notice that each fieldinfo has a pointer back to the host compinfo. This means that you should not share fieldinfo's between two compinfo's

      *)
    5. mutable cattr : attributes;
      (*

      The attributes that are defined at the same time as the composite type. These attributes can be supplemented individually at each reference to this compinfo using the TComp type constructor.

      *)
    6. mutable cdefined : bool;
      (*

      This boolean flag can be used to distinguish between structures that have not been defined and those that have been defined but have no fields (such things are allowed in gcc).

      *)
    7. mutable creferenced : bool;
      (*

      True if used. Initially set to false.

      *)
    }

    The definition of a structure or union type. Use mkCompInfo to make one and use copyCompInfo to copy one (this ensures that a new key is assigned and that the fields have the right pointers to parents.).

    Structure fields. The fieldinfo structure is used to describe a structure or union field. Fields, just like variables, can have attributes associated with the field itself or associated with the type of the field (stored along with the type of the field).

    and fieldinfo = Cil.fieldinfo = {
    1. mutable fcomp : compinfo;
      (*

      The host structure that contains this field. There can be only one compinfo that contains the field.

      *)
    2. mutable fname : string;
      (*

      The name of the field. Might be the value of missingFieldName in which case it must be a bitfield and is not printed and it does not participate in initialization

      *)
    3. mutable ftype : typ;
      (*

      The type

      *)
    4. mutable fbitfield : int option;
      (*

      If a bitfield then ftype should be an integer type and the width of the bitfield must be 0 or a positive integer smaller or equal to the width of the integer type. A field of width 0 is used in C to control the alignment of fields.

      *)
    5. mutable fattr : attributes;
      (*

      The attributes for this field (not for its type)

      *)
    6. mutable floc : location;
      (*

      The location where this field is defined

      *)
    }

    Information about a struct/union field

    Enumerations. Information about an enumeration. This is shared by all references to an enumeration. Make sure you have a GEnumTag for each of of these.

    and enuminfo = Cil.enuminfo = {
    1. mutable ename : string;
      (*

      The name. Always non-empty.

      *)
    2. mutable eitems : (string * attributes * exp * location) list;
      (*

      Items with names and values. This list should be non-empty. The item values must be compile-time constants.

      *)
    3. mutable eattr : attributes;
      (*

      The attributes that are defined at the same time as the enumeration type. These attributes can be supplemented individually at each reference to this enuminfo using the TEnum type constructor.

      *)
    4. mutable ereferenced : bool;
      (*

      True if used. Initially set to false

      *)
    5. mutable ekind : ikind;
      (*

      The integer kind used to represent this enum. Per ANSI-C, this should always be IInt, but gcc allows other integer kinds

      *)
    }

    Information about an enumeration

    and typeinfo = Cil.typeinfo = {
    1. mutable tname : string;
      (*

      The name. Can be empty only in a GType when introducing a composite or enumeration tag. If empty cannot be referred to from the file

      *)
    2. mutable ttype : typ;
      (*

      The actual type. This includes the attributes that were present in the typedef

      *)
    3. mutable treferenced : bool;
      (*

      True if used. Initially set to false

      *)
    }

    Information about a defined type

    Variables. Each local or global variable is represented by a unique varinfo structure. A global varinfo can be introduced with the GVarDecl or GVar or GFun globals. A local varinfo can be introduced as part of a function definition fundec.

    All references to a given global or local variable must refer to the same copy of the varinfo. Each varinfo has a globally unique identifier that can be used to index maps and hashtables (the name can also be used for this purpose, except for locals from different functions). This identifier is constructor using a global counter.

    It is very important that you construct varinfo structures using only one of the following functions:

    • makeGlobalVar : to make a global variable
    • makeTempVar : to make a temporary local variable whose name will be generated so that to avoid conflict with other locals.
    • makeLocalVar : like makeTempVar but you can specify the exact name to be used.
    • copyVarinfo: make a shallow copy of a varinfo assigning a new name and a new unique identifier

    A varinfo is also used in a function type to denote the list of formals.

    and varinfo = Cil.varinfo = {
    1. mutable vname : string;
      (*

      The name of the variable. Cannot be empty. It is primarily your responsibility to ensure the uniqueness of a variable name. For local variables makeTempVar helps you ensure that the name is unique.

      *)
    2. mutable vtype : typ;
      (*

      The declared type of the variable.

      *)
    3. mutable vattr : attributes;
      (*

      A list of attributes associated with the variable.

      *)
    4. mutable vstorage : storage;
      (*

      The storage-class

      *)
    5. mutable vglob : bool;
      (*

      True if this is a global variable

      *)
    6. mutable vinline : bool;
      (*

      Whether this varinfo is for an inline function.

      *)
    7. mutable vdecl : location;
      (*

      Location of variable declaration.

      *)
    8. vinit : initinfo;
      (*

      Optional initializer. Only used for static and global variables. Initializers for other types of local variables are turned into assignments. Not mutable because the init field in initinfo is mutable already.

      *)
    9. mutable vid : int;
      (*

      A unique integer identifier. This field will be set for you if you use one of the makeFormalVar, makeLocalVar, makeTempVar, makeGlobalVar, or copyVarinfo.

      *)
    10. mutable vaddrof : bool;
      (*

      True if the address of this variable is taken. CIL will set these flags when it parses C, but you should make sure to set the flag whenever your transformation create AddrOf expression.

      *)
    11. mutable vreferenced : bool;
      (*

      True if this variable is ever referenced. This is computed by RmUnused.removeUnused. It is safe to just initialize this to False

      *)
    12. mutable vdescr : Pretty.doc;
      (*

      For most temporary variables, a description of what the var holds. (e.g. for temporaries used for function call results, this string is a representation of the function call.)

      *)
    13. mutable vdescrpure : bool;
      (*

      Indicates whether the vdescr above is a pure expression or call. Printing a non-pure vdescr more than once may yield incorrect results.

      *)
    14. mutable vhasdeclinstruction : bool;
      (*

      Indicates whether a VarDecl instruction was generated for this variable. Only applies to local variables. Currently, this is relevant for when to print the declaration. If this is true, it might be incorrect to print the declaration at the beginning of the function, rather than where the VarDecl instruction is. This was introduced to handle VLAs.

      *)
    }

    Information about a variable.

    and storage = Cil.storage =
    1. | NoStorage
      (*

      The default storage. Nothing is printed

      *)
    2. | Static
    3. | Register
    4. | Extern

    Storage-class information

    Expressions. The CIL expression language contains only the side-effect free expressions of C. They are represented as the type exp. There are several interesting aspects of CIL expressions:

    Integer and floating point constants can carry their textual representation. This way the integer 15 can be printed as 0xF if that is how it occurred in the source.

    CIL uses 64 bits to represent the integer constants and also stores the width of the integer type. Care must be taken to ensure that the constant is representable with the given width. Use the functions kinteger, kinteger64 and integer to construct constant expressions. CIL predefines the constants zero, one and mone (for -1).

    Use the function isConstant to test if an expression is a constant.

    CIL keeps the type of all unary and binary expressions. You can think of that type qualifying the operator. Furthermore there are different operators for arithmetic and comparisons on arithmetic types and on pointers.

    Another unusual aspect of CIL is that the implicit conversion between an expression of array type and one of pointer type is made explicit, using the StartOf expression constructor (which is not printed). If you apply the AddrOf}constructor to an lvalue of type T then you will be getting an expression of type TPtr(T).

    You can find the type of an expression with typeOf.

    You can perform constant folding on expressions using the function constFold.

    and exp = Cil.exp =
    1. | Const of constant
      (*

      Constant

      *)
    2. | Lval of lval
      (*

      Lvalue

      *)
    3. | SizeOf of typ
      (*

      sizeof(<type>). Has unsigned int type (ISO 6.5.3.4). This is not turned into a constant because some transformations might want to change types

      *)
    4. | Real of exp
      (*

      __real__(<expression>)

      *)
    5. | Imag of exp
      (*

      __imag__(<expression>)

      *)
    6. | SizeOfE of exp
      (*

      sizeof(<expression>)

      *)
    7. | SizeOfStr of string
      (*

      sizeof(string_literal). We separate this case out because this is the only instance in which a string literal should not be treated as having type pointer to character.

      *)
    8. | AlignOf of typ
      (*

      This corresponds to the GCC __alignof_. Has unsigned int type

      *)
    9. | AlignOfE of exp
    10. | UnOp of unop * exp * typ
      (*

      Unary operation. Includes the type of the result.

      *)
    11. | BinOp of binop * exp * exp * typ
      (*

      Binary operation. Includes the type of the result. The arithmetic conversions are made explicit for the arguments.

      *)
    12. | Question of exp * exp * exp * typ
      (*

      (a ? b : c) operation. Includes the type of the result

      *)
    13. | CastE of typ * exp
      (*

      Use mkCast to make casts.

      *)
    14. | AddrOf of lval
      (*

      Always use mkAddrOf to construct one of these. Apply to an lvalue of type T yields an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use.

      *)
    15. | AddrOfLabel of stmt Stdlib.ref
      (*

      The address of a label, using GCC's label-as-value extension. If you want to use these, you must set useComputedGoto.

      *)
    16. | StartOf of lval
      (*

      Conversion from an array to a pointer to the beginning of the array. Given an lval of type TArray(T) produces an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use. In C this operation is implicit, the StartOf operator is not printed. We have it in CIL because it makes the typing rules simpler.

      *)

    Expressions (Side-effect free)

    Constants.

    and wstring_type = Cil.wstring_type =
    1. | Wchar_t
    2. | Char16_t
    3. | Char32_t
    and encoding = Cil.encoding =
    1. | No_encoding
    2. | Utf8
    and constant = Cil.constant =
    1. | CInt of Cilint.cilint * ikind * string option
      (*

      Integer constant. Give the ikind (see ISO9899 6.1.3.2) and the textual representation, if available. (This allows us to print a constant as, for example, 0xF instead of 15.) Use integer or kinteger to create these.

      *)
    2. | CStr of string * encoding
      (*

      String constant. The escape characters inside the string have been already interpreted. This constant has pointer to character type! The only case when you would like a string literal to have an array type is when it is an argument to sizeof. In that case you should use SizeOfStr.

      *)
    3. | CWStr of int64 list * wstring_type
      (*

      Wide character string constant. Note that the local interpretation of such a literal depends on wcharType and wcharKind. Such a constant has type pointer to wcharType. The escape characters in the string have not been "interpreted" in the sense that L"A\xabcd" remains "A\xabcd" rather than being represented as the wide character list with two elements: 65 and 43981. That "interpretation" depends on the underlying wide character type.

      *)
    4. | CChr of char
      (*

      Character constant. This has type int, so use charConstToInt to read the value in case sign-extension is needed.

      *)
    5. | CReal of float * fkind * string option
      (*

      Floating point constant. Give the fkind (see ISO 6.4.4.2) and also the textual representation, if available.

      *)
    6. | CEnum of exp * string * enuminfo
      (*

      An enumeration constant with the given value, name, from the given enuminfo. This is used only if lowerConstants is true (default). Use constFoldVisitor to replace these with integer constants.

      *)

    Literal constants

    and unop = Cil.unop =
    1. | Neg
      (*

      Unary minus

      *)
    2. | BNot
      (*

      Bitwise complement (~)

      *)
    3. | LNot
      (*

      Logical Not (!)

      *)

    Unary operators

    and binop = Cil.binop =
    1. | PlusA
      (*

      arithmetic +

      *)
    2. | PlusPI
      (*

      pointer + integer

      *)
    3. | IndexPI
      (*

      pointer + integer but only when it arises from an expression e[i] when e is a pointer and not an array. This is semantically the same as PlusPI but CCured uses this as a hint that the integer is probably positive.

      *)
    4. | MinusA
      (*

      arithmetic -

      *)
    5. | MinusPI
      (*

      pointer - integer

      *)
    6. | MinusPP
      (*

      pointer - pointer

      *)
    7. | Mult
      (*

      *

      *)
    8. | Div
      (*

      /

      *)
    9. | Mod
      (*

      %

      *)
    10. | Shiftlt
      (*

      shift left

      *)
    11. | Shiftrt
      (*

      shift right

      *)
    12. | Lt
      (*

      < (arithmetic comparison)

      *)
    13. | Gt
      (*

      > (arithmetic comparison)

      *)
    14. | Le
      (*

      <= (arithmetic comparison)

      *)
    15. | Ge
      (*

      > (arithmetic comparison)

      *)
    16. | Eq
      (*

      == (arithmetic comparison)

      *)
    17. | Ne
      (*

      != (arithmetic comparison)

      *)
    18. | BAnd
      (*

      bitwise and

      *)
    19. | BXor
      (*

      exclusive-or

      *)
    20. | BOr
      (*

      inclusive-or

      *)
    21. | LAnd
      (*

      logical and. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

      *)
    22. | LOr
      (*

      logical or. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

      *)

    Binary operations

    and lval = lhost * offset

    Lvalues. Lvalues are the sublanguage of expressions that can appear at the left of an assignment or as operand to the address-of operator. In C the syntax for lvalues is not always a good indication of the meaning of the lvalue. For example the C value

    a[0][1][2]

    might involve 1, 2 or 3 memory reads when used in an expression context, depending on the declared type of the variable a. If a has type int +GoblintCil (goblint-cil.GoblintCil)

    Module GoblintCil

    CIL API Documentation.

    val initCIL : unit -> unit

    Call this function to perform some initialization.

    val cilVersion : string

    These are the CIL version numbers. A CIL version is a number of the form M.m.r (major, minor and release)

    type cstd = Cil.cstd =
    1. | C90
    2. | C99
    3. | C11
    val cstd_of_string : string -> cstd
    val cstd : cstd Stdlib.ref
    val gnu89inline : bool Stdlib.ref
    val addReturnOnNoreturnFallthrough : bool Stdlib.ref

    This module defines the abstract syntax of CIL. It also provides utility functions for traversing the CIL data structures, and pretty-printing them. The parser can be invoked as Frontc.parse: string -> unit -> file. This function must be given the name of a preprocessed C file and will return the top-level data structure that describes a whole source file. The parsing and elaboration into CIL is done as for GCC source.

    The Abstract Syntax of CIL

    The top-level representation of a CIL source file (and the result of the parsing and elaboration). Its main contents is the list of global declarations and definitions. You can iterate over the globals in a file using the following iterators: mapGlobals, iterGlobals and foldGlobals. You can also use the dummyFile when you need a file as a placeholder. For each global item CIL stores the source location where it appears (using the type location)

    type file = Cil.file = {
    1. mutable fileName : string;
      (*

      The complete file name

      *)
    2. mutable globals : global list;
      (*

      List of globals as they will appear in the printed file

      *)
    3. mutable globinit : fundec option;
      (*

      An optional global initializer function. This is a function where you can put stuff that must be executed before the program is started. This function is conceptually at the end of the file, although it is not part of the globals list. Use getGlobInit to create/get one.

      *)
    4. mutable globinitcalled : bool;
      (*

      Whether the global initialization function is called in main. This should always be false if there is no global initializer. When you create a global initialization CIL will try to insert code in main to call it. This will not happen if your file does not contain a function called "main"

      *)
    }

    Top-level representation of a C source file

    and comment = location * string

    Globals. The main type for representing global declarations and definitions. A list of these form a CIL file. The order of globals in the file is generally important.

    and global = Cil.global =
    1. | GType of typeinfo * location
      (*

      A typedef. All uses of type names (through the TNamed constructor) must be preceded in the file by a definition of the name. The string is the defined name and always not-empty.

      *)
    2. | GCompTag of compinfo * location
      (*

      Defines a struct/union tag with some fields. There must be one of these for each struct/union tag that you use (through the TComp constructor) since this is the only context in which the fields are printed. Consequently nested structure tag definitions must be broken into individual definitions with the innermost structure defined first.

      *)
    3. | GCompTagDecl of compinfo * location
      (*

      Declares a struct/union tag. Use as a forward declaration. This is printed without the fields.

      *)
    4. | GEnumTag of enuminfo * location
      (*

      Declares an enumeration tag with some fields. There must be one of these for each enumeration tag that you use (through the TEnum constructor) since this is the only context in which the items are printed.

      *)
    5. | GEnumTagDecl of enuminfo * location
      (*

      Declares an enumeration tag. Use as a forward declaration. This is printed without the items.

      *)
    6. | GVarDecl of varinfo * location
      (*

      A variable declaration (not a definition). If the variable has a function type then this is a prototype. There can be several declarations and at most one definition for a given variable. If both forms appear then they must share the same varinfo structure. A prototype shares the varinfo with the fundec of the definition. Either has storage Extern or there must be a definition in this file

      *)
    7. | GVar of varinfo * initinfo * location
      (*

      A variable definition. Can have an initializer. The initializer is updateable so that you can change it without requiring to recreate the list of globals. There can be at most one definition for a variable in an entire program. Cannot have storage Extern or function type. Note: the initializer field is kept for backwards compatibility, but it is now also available directly in the varinfo.

      *)
    8. | GFun of fundec * location
      (*

      A function definition.

      *)
    9. | GAsm of string * location
      (*

      Global asm statement. These ones can contain only a template

      *)
    10. | GPragma of attribute * location
      (*

      Pragmas at top level. Use the same syntax as attributes

      *)
    11. | GText of string
      (*

      Some text (printed verbatim) at top level. E.g., this way you can put comments in the output.

      *)

    A global declaration or definition

    Types. A C type is represented in CIL using the type typ. Among types we differentiate the integral types (with different kinds denoting the sign and precision), floating point types, enumeration types, array and pointer types, and function types. Every type is associated with a list of attributes, which are always kept in sorted order. Use addAttribute and addAttributes to construct list of attributes. If you want to inspect a type, you should use unrollType or unrollTypeDeep to see through the uses of named types.

    CIL is configured at build-time with the sizes and alignments of the underlying compiler. CIL contains functions that can compute the size of a type (in bits) bitsSizeOf, the alignment of a type (in bytes) alignOf_int, and can convert an offset into a start and width (both in bits) using the function bitsOffset. At the moment these functions do not take into account the packed attributes and pragmas.

    and typ = Cil.typ =
    1. | TVoid of attributes
      (*

      Void type. Also predefined as voidType

      *)
    2. | TInt of ikind * attributes
      (*

      An integer type. The kind specifies the sign and width. Several useful variants are predefined as intType, uintType, longType, charType.

      *)
    3. | TFloat of fkind * attributes
      (*

      A floating-point type. The kind specifies the precision. You can also use the predefined constant doubleType.

      *)
    4. | TPtr of typ * attributes
      (*

      Pointer type. Several useful variants are predefined as charPtrType, charConstPtrType (pointer to a constant character), voidPtrType, intPtrType

      *)
    5. | TArray of typ * exp option * attributes
      (*

      Array type. It indicates the base type and the array length.

      *)
    6. | TFun of typ * (string * typ * attributes) list option * bool * attributes
      (*

      Function type. Indicates the type of the result, the name, type and name attributes of the formal arguments (None if no arguments were specified, as in a function whose definition or prototype we have not seen; Some [] means void). Use argsToList to obtain a list of arguments. The boolean indicates if it is a variable-argument function. If this is the type of a varinfo for which we have a function declaration then the information for the formals must match that in the function's sformals. Use setFormals, or setFunctionType, or makeFormalVar for this purpose.

      *)
    7. | TNamed of typeinfo * attributes
      (*

      The use of a named type. Each such type name must be preceded in the file by a GType global. This is printed as just the type name. The actual referred type is not printed here and is carried only to simplify processing. To see through a sequence of named type references, use unrollType or unrollTypeDeep. The attributes are in addition to those given when the type name was defined.

      *)
    8. | TComp of compinfo * attributes
      (*

      The most delicate issue for C types is that recursion that is possible by using structures and pointers. To address this issue we have a more complex representation for structured types (struct and union). Each such type is represented using the compinfo type. For each composite type the compinfo structure must be declared at top level using GCompTag and all references to it must share the same copy of the structure. The attributes given are those pertaining to this use of the type and are in addition to the attributes that were given at the definition of the type and which are stored in the compinfo.

      *)
    9. | TEnum of enuminfo * attributes
      (*

      A reference to an enumeration type. All such references must share the enuminfo among them and with a GEnumTag global that precedes all uses. The attributes refer to this use of the enumeration and are in addition to the attributes of the enumeration itself, which are stored inside the enuminfo

      *)
    10. | TBuiltin_va_list of attributes
      (*

      This is the same as the gcc's type with the same name

      *)

    There are a number of functions for querying the kind of a type. These are isIntegralType, isArithmeticType, isPointerType, isScalarType, isFunctionType, isArrayType.

    There are two easy ways to scan a type. First, you can use the existsType to return a boolean answer about a type. This function is controlled by a user-provided function that is queried for each type that is used to construct the current type. The function can specify whether to terminate the scan with a boolean result or to continue the scan for the nested types.

    The other method for scanning types is provided by the visitor interface (see cilVisitor).

    If you want to compare types (or to use them as hash-values) then you should use instead type signatures (represented as typsig). These contain the same information as types but canonicalized such that simple Ocaml structural equality will tell whether two types are equal. Use typeSig to compute the signature of a type. If you want to ignore certain type attributes then use typeSigWithAttrs.

    and ikind = Cil.ikind =
    1. | IChar
      (*

      char

      *)
    2. | ISChar
      (*

      signed char

      *)
    3. | IUChar
      (*

      unsigned char

      *)
    4. | IBool
      (*

      _Bool (C99)

      *)
    5. | IInt
      (*

      int

      *)
    6. | IUInt
      (*

      unsigned int

      *)
    7. | IShort
      (*

      short

      *)
    8. | IUShort
      (*

      unsigned short

      *)
    9. | ILong
      (*

      long

      *)
    10. | IULong
      (*

      unsigned long

      *)
    11. | ILongLong
      (*

      long long (or _int64 on Microsoft Visual C)

      *)
    12. | IULongLong
      (*

      unsigned long long (or unsigned _int64 on Microsoft Visual C)

      *)
    13. | IInt128
      (*

      __int128

      *)
    14. | IUInt128
      (*

      unsigned __int128

      *)

    Various kinds of integers

    and fkind = Cil.fkind =
    1. | FFloat
      (*

      float

      *)
    2. | FDouble
      (*

      double

      *)
    3. | FLongDouble
      (*

      long double

      *)
    4. | FFloat128
      (*

      float128

      *)
    5. | FComplexFloat
      (*

      float _Complex

      *)
    6. | FComplexDouble
      (*

      double _Complex

      *)
    7. | FComplexLongDouble
      (*

      long double _Complex

      *)
    8. | FComplexFloat128
      (*

      _float128 _Complex

      *)

    Various kinds of floating-point numbers

    Attributes.

    and attribute = Cil.attribute =
    1. | Attr of string * attrparam list
      (*

      An attribute has a name and some optional parameters. The name should not start or end with underscore. When CIL parses attribute names it will strip leading and ending underscores (to ensure that the multitude of GCC attributes such as const, __const and __const__ all mean the same thing.)

      *)
    and attributes = attribute list

    Attributes are lists sorted by the attribute name. Use the functions addAttribute and addAttributes to insert attributes in an attribute list and maintain the sortedness.

    and attrparam = Cil.attrparam =
    1. | AInt of int
      (*

      An integer constant

      *)
    2. | AStr of string
      (*

      A string constant

      *)
    3. | ACons of string * attrparam list
      (*

      Constructed attributes. These are printed foo(a1,a2,...,an). The list of parameters can be empty and in that case the parentheses are not printed.

      *)
    4. | ASizeOf of typ
      (*

      A way to talk about types

      *)
    5. | ASizeOfE of attrparam
    6. | ASizeOfS of typsig
      (*

      Replacement for ASizeOf in type signatures. Only used for attributes inside typsigs.

      *)
    7. | AAlignOf of typ
    8. | AAlignOfE of attrparam
    9. | AAlignOfS of typsig
    10. | AUnOp of unop * attrparam
    11. | ABinOp of binop * attrparam * attrparam
    12. | ADot of attrparam * string
      (*

      a.foo *

      *)
    13. | AStar of attrparam
      (*

      * a

      *)
    14. | AAddrOf of attrparam
      (*

      & a *

      *)
    15. | AIndex of attrparam * attrparam
      (*

      a1a2

      *)
    16. | AQuestion of attrparam * attrparam * attrparam
      (*

      a1 ? a2 : a3 *

      *)
    17. | AAssign of attrparam * attrparam
      (*

      a1 = a2

      *)

    The type of parameters of attributes

    Structures. The compinfo describes the definition of a structure or union type. Each such compinfo must be defined at the top-level using the GCompTag constructor and must be shared by all references to this type (using either the TComp type constructor or from the definition of the fields.

    If all you need is to scan the definition of each composite type once, you can do that by scanning all top-level GCompTag.

    Constructing a compinfo can be tricky since it must contain fields that might refer to the host compinfo and furthermore the type of the field might need to refer to the compinfo for recursive types. Use the mkCompInfo function to create a compinfo. You can easily fetch the fieldinfo for a given field in a structure with getCompField.

    and compinfo = Cil.compinfo = {
    1. mutable cstruct : bool;
      (*

      True if struct, False if union

      *)
    2. mutable cname : string;
      (*

      The name. Always non-empty. Use compFullName to get the full name of a comp (along with the struct or union)

      *)
    3. mutable ckey : int;
      (*

      A unique integer. This is assigned by mkCompInfo using a global variable in the Cil module. Thus two identical structs in two different files might have different keys. Use copyCompInfo to copy structures so that a new key is assigned.

      *)
    4. mutable cfields : fieldinfo list;
      (*

      Information about the fields. Notice that each fieldinfo has a pointer back to the host compinfo. This means that you should not share fieldinfo's between two compinfo's

      *)
    5. mutable cattr : attributes;
      (*

      The attributes that are defined at the same time as the composite type. These attributes can be supplemented individually at each reference to this compinfo using the TComp type constructor.

      *)
    6. mutable cdefined : bool;
      (*

      This boolean flag can be used to distinguish between structures that have not been defined and those that have been defined but have no fields (such things are allowed in gcc).

      *)
    7. mutable creferenced : bool;
      (*

      True if used. Initially set to false.

      *)
    }

    The definition of a structure or union type. Use mkCompInfo to make one and use copyCompInfo to copy one (this ensures that a new key is assigned and that the fields have the right pointers to parents.).

    Structure fields. The fieldinfo structure is used to describe a structure or union field. Fields, just like variables, can have attributes associated with the field itself or associated with the type of the field (stored along with the type of the field).

    and fieldinfo = Cil.fieldinfo = {
    1. mutable fcomp : compinfo;
      (*

      The host structure that contains this field. There can be only one compinfo that contains the field.

      *)
    2. mutable fname : string;
      (*

      The name of the field. Might be the value of missingFieldName in which case it must be a bitfield and is not printed and it does not participate in initialization

      *)
    3. mutable ftype : typ;
      (*

      The type

      *)
    4. mutable fbitfield : int option;
      (*

      If a bitfield then ftype should be an integer type and the width of the bitfield must be 0 or a positive integer smaller or equal to the width of the integer type. A field of width 0 is used in C to control the alignment of fields.

      *)
    5. mutable fattr : attributes;
      (*

      The attributes for this field (not for its type)

      *)
    6. mutable floc : location;
      (*

      The location where this field is defined

      *)
    }

    Information about a struct/union field

    Enumerations. Information about an enumeration. This is shared by all references to an enumeration. Make sure you have a GEnumTag for each of of these.

    and enuminfo = Cil.enuminfo = {
    1. mutable ename : string;
      (*

      The name. Always non-empty.

      *)
    2. mutable eitems : (string * attributes * exp * location) list;
      (*

      Items with names and values. This list should be non-empty. The item values must be compile-time constants.

      *)
    3. mutable eattr : attributes;
      (*

      The attributes that are defined at the same time as the enumeration type. These attributes can be supplemented individually at each reference to this enuminfo using the TEnum type constructor.

      *)
    4. mutable ereferenced : bool;
      (*

      True if used. Initially set to false

      *)
    5. mutable ekind : ikind;
      (*

      The integer kind used to represent this enum. Per ANSI-C, this should always be IInt, but gcc allows other integer kinds

      *)
    }

    Information about an enumeration

    and typeinfo = Cil.typeinfo = {
    1. mutable tname : string;
      (*

      The name. Can be empty only in a GType when introducing a composite or enumeration tag. If empty cannot be referred to from the file

      *)
    2. mutable ttype : typ;
      (*

      The actual type. This includes the attributes that were present in the typedef

      *)
    3. mutable treferenced : bool;
      (*

      True if used. Initially set to false

      *)
    }

    Information about a defined type

    Variables. Each local or global variable is represented by a unique varinfo structure. A global varinfo can be introduced with the GVarDecl or GVar or GFun globals. A local varinfo can be introduced as part of a function definition fundec.

    All references to a given global or local variable must refer to the same copy of the varinfo. Each varinfo has a globally unique identifier that can be used to index maps and hashtables (the name can also be used for this purpose, except for locals from different functions). This identifier is constructor using a global counter.

    It is very important that you construct varinfo structures using only one of the following functions:

    • makeGlobalVar : to make a global variable
    • makeTempVar : to make a temporary local variable whose name will be generated so that to avoid conflict with other locals.
    • makeLocalVar : like makeTempVar but you can specify the exact name to be used.
    • copyVarinfo: make a shallow copy of a varinfo assigning a new name and a new unique identifier

    A varinfo is also used in a function type to denote the list of formals.

    and varinfo = Cil.varinfo = {
    1. mutable vname : string;
      (*

      The name of the variable. Cannot be empty. It is primarily your responsibility to ensure the uniqueness of a variable name. For local variables makeTempVar helps you ensure that the name is unique.

      *)
    2. mutable vtype : typ;
      (*

      The declared type of the variable.

      *)
    3. mutable vattr : attributes;
      (*

      A list of attributes associated with the variable.

      *)
    4. mutable vstorage : storage;
      (*

      The storage-class

      *)
    5. mutable vglob : bool;
      (*

      True if this is a global variable

      *)
    6. mutable vinline : bool;
      (*

      Whether this varinfo is for an inline function.

      *)
    7. mutable vdecl : location;
      (*

      Location of variable declaration.

      *)
    8. vinit : initinfo;
      (*

      Optional initializer. Only used for static and global variables. Initializers for other types of local variables are turned into assignments. Not mutable because the init field in initinfo is mutable already.

      *)
    9. mutable vid : int;
      (*

      A unique integer identifier. This field will be set for you if you use one of the makeFormalVar, makeLocalVar, makeTempVar, makeGlobalVar, or copyVarinfo.

      *)
    10. mutable vaddrof : bool;
      (*

      True if the address of this variable is taken. CIL will set these flags when it parses C, but you should make sure to set the flag whenever your transformation create AddrOf expression.

      *)
    11. mutable vreferenced : bool;
      (*

      True if this variable is ever referenced. This is computed by RmUnused.removeUnused. It is safe to just initialize this to False

      *)
    12. mutable vdescr : Pretty.doc;
      (*

      For most temporary variables, a description of what the var holds. (e.g. for temporaries used for function call results, this string is a representation of the function call.)

      *)
    13. mutable vdescrpure : bool;
      (*

      Indicates whether the vdescr above is a pure expression or call. Printing a non-pure vdescr more than once may yield incorrect results.

      *)
    14. mutable vhasdeclinstruction : bool;
      (*

      Indicates whether a VarDecl instruction was generated for this variable. Only applies to local variables. Currently, this is relevant for when to print the declaration. If this is true, it might be incorrect to print the declaration at the beginning of the function, rather than where the VarDecl instruction is. This was introduced to handle VLAs.

      *)
    }

    Information about a variable.

    and storage = Cil.storage =
    1. | NoStorage
      (*

      The default storage. Nothing is printed

      *)
    2. | Static
    3. | Register
    4. | Extern

    Storage-class information

    Expressions. The CIL expression language contains only the side-effect free expressions of C. They are represented as the type exp. There are several interesting aspects of CIL expressions:

    Integer and floating point constants can carry their textual representation. This way the integer 15 can be printed as 0xF if that is how it occurred in the source.

    CIL uses 64 bits to represent the integer constants and also stores the width of the integer type. Care must be taken to ensure that the constant is representable with the given width. Use the functions kinteger, kinteger64 and integer to construct constant expressions. CIL predefines the constants zero, one and mone (for -1).

    Use the function isConstant to test if an expression is a constant.

    CIL keeps the type of all unary and binary expressions. You can think of that type qualifying the operator. Furthermore there are different operators for arithmetic and comparisons on arithmetic types and on pointers.

    Another unusual aspect of CIL is that the implicit conversion between an expression of array type and one of pointer type is made explicit, using the StartOf expression constructor (which is not printed). If you apply the AddrOf}constructor to an lvalue of type T then you will be getting an expression of type TPtr(T).

    You can find the type of an expression with typeOf.

    You can perform constant folding on expressions using the function constFold.

    and exp = Cil.exp =
    1. | Const of constant
      (*

      Constant

      *)
    2. | Lval of lval
      (*

      Lvalue

      *)
    3. | SizeOf of typ
      (*

      sizeof(<type>). Has unsigned int type (ISO 6.5.3.4). This is not turned into a constant because some transformations might want to change types

      *)
    4. | Real of exp
      (*

      __real__(<expression>)

      *)
    5. | Imag of exp
      (*

      __imag__(<expression>)

      *)
    6. | SizeOfE of exp
      (*

      sizeof(<expression>)

      *)
    7. | SizeOfStr of string
      (*

      sizeof(string_literal). We separate this case out because this is the only instance in which a string literal should not be treated as having type pointer to character.

      *)
    8. | AlignOf of typ
      (*

      This corresponds to the GCC __alignof_. Has unsigned int type

      *)
    9. | AlignOfE of exp
    10. | UnOp of unop * exp * typ
      (*

      Unary operation. Includes the type of the result.

      *)
    11. | BinOp of binop * exp * exp * typ
      (*

      Binary operation. Includes the type of the result. The arithmetic conversions are made explicit for the arguments.

      *)
    12. | Question of exp * exp * exp * typ
      (*

      (a ? b : c) operation. Includes the type of the result

      *)
    13. | CastE of typ * exp
      (*

      Use mkCast to make casts.

      *)
    14. | AddrOf of lval
      (*

      Always use mkAddrOf to construct one of these. Apply to an lvalue of type T yields an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use.

      *)
    15. | AddrOfLabel of stmt Stdlib.ref
      (*

      The address of a label, using GCC's label-as-value extension. If you want to use these, you must set useComputedGoto.

      *)
    16. | StartOf of lval
      (*

      Conversion from an array to a pointer to the beginning of the array. Given an lval of type TArray(T) produces an expression of type TPtr(T). Use mkAddrOrStartOf to make one of these if you are not sure which one to use. In C this operation is implicit, the StartOf operator is not printed. We have it in CIL because it makes the typing rules simpler.

      *)

    Expressions (Side-effect free)

    Constants.

    and wstring_type = Cil.wstring_type =
    1. | Wchar_t
    2. | Char16_t
    3. | Char32_t
    and encoding = Cil.encoding =
    1. | No_encoding
    2. | Utf8
    and constant = Cil.constant =
    1. | CInt of Cilint.cilint * ikind * string option
      (*

      Integer constant. Give the ikind (see ISO9899 6.1.3.2) and the textual representation, if available. (This allows us to print a constant as, for example, 0xF instead of 15.) Use integer or kinteger to create these.

      *)
    2. | CStr of string * encoding
      (*

      String constant. The escape characters inside the string have been already interpreted. This constant has pointer to character type! The only case when you would like a string literal to have an array type is when it is an argument to sizeof. In that case you should use SizeOfStr.

      *)
    3. | CWStr of int64 list * wstring_type
      (*

      Wide character string constant. Note that the local interpretation of such a literal depends on wcharType and wcharKind. Such a constant has type pointer to wcharType. The escape characters in the string have not been "interpreted" in the sense that L"A\xabcd" remains "A\xabcd" rather than being represented as the wide character list with two elements: 65 and 43981. That "interpretation" depends on the underlying wide character type.

      *)
    4. | CChr of char
      (*

      Character constant. This has type int, so use charConstToInt to read the value in case sign-extension is needed.

      *)
    5. | CReal of float * fkind * string option
      (*

      Floating point constant. Give the fkind (see ISO 6.4.4.2) and also the textual representation, if available.

      *)
    6. | CEnum of exp * string * enuminfo
      (*

      An enumeration constant with the given value, name, from the given enuminfo. This is used only if lowerConstants is true (default). Use constFoldVisitor to replace these with integer constants.

      *)

    Literal constants

    and unop = Cil.unop =
    1. | Neg
      (*

      Unary minus

      *)
    2. | BNot
      (*

      Bitwise complement (~)

      *)
    3. | LNot
      (*

      Logical Not (!)

      *)

    Unary operators

    and binop = Cil.binop =
    1. | PlusA
      (*

      arithmetic +

      *)
    2. | PlusPI
      (*

      pointer + integer

      *)
    3. | IndexPI
      (*

      pointer + integer but only when it arises from an expression e[i] when e is a pointer and not an array. This is semantically the same as PlusPI but CCured uses this as a hint that the integer is probably positive.

      *)
    4. | MinusA
      (*

      arithmetic -

      *)
    5. | MinusPI
      (*

      pointer - integer

      *)
    6. | MinusPP
      (*

      pointer - pointer

      *)
    7. | Mult
      (*

      *

      *)
    8. | Div
      (*

      /

      *)
    9. | Mod
      (*

      %

      *)
    10. | Shiftlt
      (*

      shift left

      *)
    11. | Shiftrt
      (*

      shift right

      *)
    12. | Lt
      (*

      < (arithmetic comparison)

      *)
    13. | Gt
      (*

      > (arithmetic comparison)

      *)
    14. | Le
      (*

      <= (arithmetic comparison)

      *)
    15. | Ge
      (*

      > (arithmetic comparison)

      *)
    16. | Eq
      (*

      == (arithmetic comparison)

      *)
    17. | Ne
      (*

      != (arithmetic comparison)

      *)
    18. | BAnd
      (*

      bitwise and

      *)
    19. | BXor
      (*

      exclusive-or

      *)
    20. | BOr
      (*

      inclusive-or

      *)
    21. | LAnd
      (*

      logical and. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

      *)
    22. | LOr
      (*

      logical or. Unlike other expressions this one does not always evaluate both operands. If you want to use these, you must set useLogicalOperators.

      *)

    Binary operations

    and lval = lhost * offset

    Lvalues. Lvalues are the sublanguage of expressions that can appear at the left of an assignment or as operand to the address-of operator. In C the syntax for lvalues is not always a good indication of the meaning of the lvalue. For example the C value

    a[0][1][2]

    might involve 1, 2 or 3 memory reads when used in an expression context, depending on the declared type of the variable a. If a has type int [4][4][4] then we have one memory read from somewhere inside the area that stores the array a. On the other hand if a has type int *** then the expression really means * ( * ( * (a + 0) + 1) + 2), in which case it is clear that it involves three separate memory operations.

    An lvalue denotes the contents of a range of memory addresses. This range is denoted as a host object along with an offset within the object. The host object can be of two kinds: a local or global variable, or an object whose address is in a pointer expression. We distinguish the two cases so that we can tell quickly whether we are accessing some component of a variable directly or we are accessing a memory location through a pointer. To make it easy to tell what an lvalue means CIL represents lvalues as a host object and an offset (see lval). The host object (represented as lhost) can be a local or global variable or can be the object pointed-to by a pointer expression. The offset (represented as offset) is a sequence of field or array index designators.

    Both the typing rules and the meaning of an lvalue is very precisely specified in CIL.

    The following are a few useful function for operating on lvalues:

    The following equivalences hold

    Mem(AddrOf(Mem a, aoff)), off   = Mem a, aoff + off
     Mem(AddrOf(Var v, aoff)), off   = Var v, aoff + off
     AddrOf (Mem a, NoOffset)        = a
    and lhost = Cil.lhost =
    1. | Var of varinfo
      (*

      The host is a variable.

      *)
    2. | Mem of exp
      (*

      The host is an object of type T when the expression has pointer TPtr(T).

      *)

    The host part of an lval.

    and offset = Cil.offset =
    1. | NoOffset
      (*

      No offset. Can be applied to any lvalue and does not change either the starting address or the type. This is used when the lval consists of just a host or as a terminator in a list of other kinds of offsets.

      *)
    2. | Field of fieldinfo * offset
      (*

      A field offset. Can be applied only to an lvalue that denotes a structure or a union that contains the mentioned field. This advances the offset to the beginning of the mentioned field and changes the type to the type of the mentioned field.

      *)
    3. | Index of exp * offset
      (*

      An array index offset. Can be applied only to an lvalue that denotes an array. This advances the starting address of the lval to the beginning of the mentioned array element and changes the denoted type to be the type of the array element

      *)

    The offset part of an lval. Each offset can be applied to certain kinds of lvalues and its effect is that it advances the starting address of the lvalue and changes the denoted type, essentially focusing to some smaller lvalue that is contained in the original one.

    and init = Cil.init =
    1. | SingleInit of exp
      (*

      A single initializer

      *)
    2. | CompoundInit of typ * (offset * init) list
      (*

      Used only for initializers of structures, unions and arrays. The offsets are all of the form Field(f, NoOffset) or Index(i, diff --git a/api/goblint-cil/Liveness/L/index.html b/api/goblint-cil/Liveness/L/index.html index 9c7031de4..5d31dbf54 100644 --- a/api/goblint-cil/Liveness/L/index.html +++ b/api/goblint-cil/Liveness/L/index.html @@ -1,2 +1,2 @@ -L (goblint-cil.Liveness.L)

      Module Liveness.L

      val compute : GoblintCil.Cil.stmt list -> unit
      +L (goblint-cil.Liveness.L)

      Module Liveness.L

      val compute : GoblintCil.Cil.stmt list -> unit
      diff --git a/api/goblint-cil/Liveness/LiveFlow/index.html b/api/goblint-cil/Liveness/LiveFlow/index.html index d7e850148..9cdc14d91 100644 --- a/api/goblint-cil/Liveness/LiveFlow/index.html +++ b/api/goblint-cil/Liveness/LiveFlow/index.html @@ -1,2 +1,2 @@ -LiveFlow (goblint-cil.Liveness.LiveFlow)

      Module Liveness.LiveFlow

      val name : string
      val debug : bool Stdlib.ref
      type t = VS.t
      val pretty : unit -> VS.t -> GoblintCil.Pretty.doc
      val stmtStartData : VS.t IH.t
      val funcExitData : VS.t
      val combineStmtStartData : GoblintCil.stmt -> old:t -> t -> VS.t option
      val combineSuccessors : VS.t -> VS.t -> VS.t
      val doInstr : GoblintCil.instr -> 'a -> VS.t DF.action
      val filterStmt : 'a -> 'b -> bool
      +LiveFlow (goblint-cil.Liveness.LiveFlow)

      Module Liveness.LiveFlow

      val name : string
      val debug : bool Stdlib.ref
      type t = VS.t
      val pretty : unit -> VS.t -> GoblintCil.Pretty.doc
      val stmtStartData : VS.t IH.t
      val funcExitData : VS.t
      val combineStmtStartData : GoblintCil.stmt -> old:t -> t -> VS.t option
      val combineSuccessors : VS.t -> VS.t -> VS.t
      val doInstr : GoblintCil.instr -> 'a -> VS.t DF.action
      val filterStmt : 'a -> 'b -> bool
      diff --git a/api/goblint-cil/Liveness/Usedef/VS/index.html b/api/goblint-cil/Liveness/Usedef/VS/index.html index 1aa581122..0446c6b51 100644 --- a/api/goblint-cil/Liveness/Usedef/VS/index.html +++ b/api/goblint-cil/Liveness/Usedef/VS/index.html @@ -1,2 +1,2 @@ -VS (goblint-cil.Liveness.Usedef.VS)

      Module Usedef.VS

      type t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val disjoint : t -> t -> bool
      val diff : t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val map : (elt -> elt) -> t -> t
      val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val filter_map : (elt -> elt option) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val min_elt_opt : t -> elt option
      val max_elt : t -> elt
      val max_elt_opt : t -> elt option
      val choose : t -> elt
      val choose_opt : t -> elt option
      val split : elt -> t -> t * bool * t
      val find : elt -> t -> elt
      val find_opt : elt -> t -> elt option
      val find_first : (elt -> bool) -> t -> elt
      val find_first_opt : (elt -> bool) -> t -> elt option
      val find_last : (elt -> bool) -> t -> elt
      val find_last_opt : (elt -> bool) -> t -> elt option
      val of_list : elt list -> t
      val to_seq_from : elt -> t -> elt Stdlib.Seq.t
      val to_seq : t -> elt Stdlib.Seq.t
      val to_rev_seq : t -> elt Stdlib.Seq.t
      val add_seq : elt Stdlib.Seq.t -> t -> t
      val of_seq : elt Stdlib.Seq.t -> t
      +VS (goblint-cil.Liveness.Usedef.VS)

      Module Usedef.VS

      type t
      val empty : t
      val is_empty : t -> bool
      val mem : elt -> t -> bool
      val add : elt -> t -> t
      val singleton : elt -> t
      val remove : elt -> t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val disjoint : t -> t -> bool
      val diff : t -> t -> t
      val compare : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val iter : (elt -> unit) -> t -> unit
      val map : (elt -> elt) -> t -> t
      val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
      val for_all : (elt -> bool) -> t -> bool
      val exists : (elt -> bool) -> t -> bool
      val filter : (elt -> bool) -> t -> t
      val filter_map : (elt -> elt option) -> t -> t
      val partition : (elt -> bool) -> t -> t * t
      val cardinal : t -> int
      val elements : t -> elt list
      val min_elt : t -> elt
      val min_elt_opt : t -> elt option
      val max_elt : t -> elt
      val max_elt_opt : t -> elt option
      val choose : t -> elt
      val choose_opt : t -> elt option
      val split : elt -> t -> t * bool * t
      val find : elt -> t -> elt
      val find_opt : elt -> t -> elt option
      val find_first : (elt -> bool) -> t -> elt
      val find_first_opt : (elt -> bool) -> t -> elt option
      val find_last : (elt -> bool) -> t -> elt
      val find_last_opt : (elt -> bool) -> t -> elt option
      val of_list : elt list -> t
      val to_seq_from : elt -> t -> elt Stdlib.Seq.t
      val to_seq : t -> elt Stdlib.Seq.t
      val to_rev_seq : t -> elt Stdlib.Seq.t
      val add_seq : elt Stdlib.Seq.t -> t -> t
      val of_seq : elt Stdlib.Seq.t -> t
      diff --git a/api/goblint-cil/Liveness/Usedef/class-useDefVisitorClass/index.html b/api/goblint-cil/Liveness/Usedef/class-useDefVisitorClass/index.html index b0eb15e94..88a5d36b3 100644 --- a/api/goblint-cil/Liveness/Usedef/class-useDefVisitorClass/index.html +++ b/api/goblint-cil/Liveness/Usedef/class-useDefVisitorClass/index.html @@ -1,5 +1,5 @@ -useDefVisitorClass (goblint-cil.Liveness.Usedef.useDefVisitorClass)

      Class Usedef.useDefVisitorClass

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +useDefVisitorClass (goblint-cil.Liveness.Usedef.useDefVisitorClass)

      Class Usedef.useDefVisitorClass

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Liveness/Usedef/index.html b/api/goblint-cil/Liveness/Usedef/index.html index 91d839bfb..147918151 100644 --- a/api/goblint-cil/Liveness/Usedef/index.html +++ b/api/goblint-cil/Liveness/Usedef/index.html @@ -1,5 +1,5 @@ -Usedef (goblint-cil.Liveness.Usedef)

      Module Liveness.Usedef

      compute use/def information

      module VS : sig ... end
      val getUseDefFunctionRef : +Usedef (goblint-cil.Liveness.Usedef)

      Module Liveness.Usedef

      compute use/def information

      module VS : sig ... end
      val getUseDefFunctionRef : (GoblintCil.exp -> GoblintCil.exp list -> VS.t * VS.t * GoblintCil.exp list) diff --git a/api/goblint-cil/Liveness/class-deadnessVisitorClass/index.html b/api/goblint-cil/Liveness/class-deadnessVisitorClass/index.html index baa146b7a..553838506 100644 --- a/api/goblint-cil/Liveness/class-deadnessVisitorClass/index.html +++ b/api/goblint-cil/Liveness/class-deadnessVisitorClass/index.html @@ -1,2 +1,2 @@ -deadnessVisitorClass (goblint-cil.Liveness.deadnessVisitorClass)

      Class Liveness.deadnessVisitorClass

      val mutable sid : int
      val mutable liv_dat_lst : VS.t list
      val mutable cur_liv_dat : VS.t option
      val mutable post_dead_vars : VS.t
      val mutable post_live_vars : VS.t
      +deadnessVisitorClass (goblint-cil.Liveness.deadnessVisitorClass)

      Class Liveness.deadnessVisitorClass

      val mutable sid : int
      val mutable liv_dat_lst : VS.t list
      val mutable cur_liv_dat : VS.t option
      val mutable post_dead_vars : VS.t
      val mutable post_live_vars : VS.t
      diff --git a/api/goblint-cil/Liveness/class-doFeatureClass/index.html b/api/goblint-cil/Liveness/class-doFeatureClass/index.html index 1e2d4cc83..6e4a04901 100644 --- a/api/goblint-cil/Liveness/class-doFeatureClass/index.html +++ b/api/goblint-cil/Liveness/class-doFeatureClass/index.html @@ -1,2 +1,2 @@ -doFeatureClass (goblint-cil.Liveness.doFeatureClass)

      Class Liveness.doFeatureClass

      +doFeatureClass (goblint-cil.Liveness.doFeatureClass)

      Class Liveness.doFeatureClass

      diff --git a/api/goblint-cil/Liveness/class-livenessVisitorClass/index.html b/api/goblint-cil/Liveness/class-livenessVisitorClass/index.html index 9f7f51626..743c20c2b 100644 --- a/api/goblint-cil/Liveness/class-livenessVisitorClass/index.html +++ b/api/goblint-cil/Liveness/class-livenessVisitorClass/index.html @@ -1,2 +1,2 @@ -livenessVisitorClass (goblint-cil.Liveness.livenessVisitorClass)

      Class Liveness.livenessVisitorClass

      val mutable sid : int
      val mutable liv_dat_lst : VS.t list
      val mutable cur_liv_dat : VS.t option
      +livenessVisitorClass (goblint-cil.Liveness.livenessVisitorClass)

      Class Liveness.livenessVisitorClass

      val mutable sid : int
      val mutable liv_dat_lst : VS.t list
      val mutable cur_liv_dat : VS.t option
      diff --git a/api/goblint-cil/Liveness/class-nullAdderClass/index.html b/api/goblint-cil/Liveness/class-nullAdderClass/index.html index 08650b274..0a9c18eb8 100644 --- a/api/goblint-cil/Liveness/class-nullAdderClass/index.html +++ b/api/goblint-cil/Liveness/class-nullAdderClass/index.html @@ -1,2 +1,2 @@ -nullAdderClass (goblint-cil.Liveness.nullAdderClass)

      Class Liveness.nullAdderClass

      +nullAdderClass (goblint-cil.Liveness.nullAdderClass)

      Class Liveness.nullAdderClass

      diff --git a/api/goblint-cil/Liveness/index.html b/api/goblint-cil/Liveness/index.html index 54cad7796..d72583c56 100644 --- a/api/goblint-cil/Liveness/index.html +++ b/api/goblint-cil/Liveness/index.html @@ -1,5 +1,5 @@ -Liveness (goblint-cil.Liveness)

      Module Liveness

      module Usedef : sig ... end
      module UD = Usedef
      module IH = GoblintCil.Inthash
      val debug : bool Stdlib.ref
      val ignore_inst : (GoblintCil.instr -> bool) Stdlib.ref
      val ignore_call : (GoblintCil.instr -> bool) Stdlib.ref
      val registerIgnoreInst : (GoblintCil.instr -> bool) -> unit
      val registerIgnoreCall : (GoblintCil.instr -> bool) -> unit
      val live_label : string Stdlib.ref
      val live_func : string Stdlib.ref
      module VS = UD.VS
      val debug_print : unit -> VS.t -> GoblintCil.Pretty.doc
      val min_print : unit -> VS.t -> GoblintCil.Pretty.doc
      val printer : (unit -> VS.t -> GoblintCil.Pretty.doc) Stdlib.ref
      module LiveFlow : sig ... end
      module L : sig ... end
      val all_stmts : GoblintCil.stmt list Stdlib.ref
      class nullAdderClass : object ... end
      val null_adder : GoblintCil.fundec -> GoblintCil.stmt list
      val computeLiveness : GoblintCil.fundec -> unit
      val getLiveSet : int -> VS.t option
      val getLiveness : GoblintCil.stmt -> VS.t
      val getPostLiveness : GoblintCil.stmt -> LiveFlow.t
      val instrLiveness : +Liveness (goblint-cil.Liveness)

      Module Liveness

      module Usedef : sig ... end
      module UD = Usedef
      module IH = GoblintCil.Inthash
      val debug : bool Stdlib.ref
      val ignore_inst : (GoblintCil.instr -> bool) Stdlib.ref
      val ignore_call : (GoblintCil.instr -> bool) Stdlib.ref
      val registerIgnoreInst : (GoblintCil.instr -> bool) -> unit
      val registerIgnoreCall : (GoblintCil.instr -> bool) -> unit
      val live_label : string Stdlib.ref
      val live_func : string Stdlib.ref
      module VS = UD.VS
      val debug_print : unit -> VS.t -> GoblintCil.Pretty.doc
      val min_print : unit -> VS.t -> GoblintCil.Pretty.doc
      val printer : (unit -> VS.t -> GoblintCil.Pretty.doc) Stdlib.ref
      module LiveFlow : sig ... end
      module L : sig ... end
      val all_stmts : GoblintCil.stmt list Stdlib.ref
      class nullAdderClass : object ... end
      val null_adder : GoblintCil.fundec -> GoblintCil.stmt list
      val computeLiveness : GoblintCil.fundec -> unit
      val getLiveSet : int -> VS.t option
      val getLiveness : GoblintCil.stmt -> VS.t
      val getPostLiveness : GoblintCil.stmt -> LiveFlow.t
      val instrLiveness : GoblintCil.instr list -> GoblintCil.stmt -> VS.t -> diff --git a/api/goblint-cil/Makecfg/MakeCFG/class-callBBVisitor/index.html b/api/goblint-cil/Makecfg/MakeCFG/class-callBBVisitor/index.html index 2bb54bafa..337136fd1 100644 --- a/api/goblint-cil/Makecfg/MakeCFG/class-callBBVisitor/index.html +++ b/api/goblint-cil/Makecfg/MakeCFG/class-callBBVisitor/index.html @@ -1,2 +1,2 @@ -callBBVisitor (goblint-cil.Makecfg.MakeCFG.callBBVisitor)

      Class MakeCFG.callBBVisitor

      +callBBVisitor (goblint-cil.Makecfg.MakeCFG.callBBVisitor)

      Class MakeCFG.callBBVisitor

      diff --git a/api/goblint-cil/Makecfg/MakeCFG/class-vidVisitor/index.html b/api/goblint-cil/Makecfg/MakeCFG/class-vidVisitor/index.html index 44a7edfe3..9f084998e 100644 --- a/api/goblint-cil/Makecfg/MakeCFG/class-vidVisitor/index.html +++ b/api/goblint-cil/Makecfg/MakeCFG/class-vidVisitor/index.html @@ -1,2 +1,2 @@ -vidVisitor (goblint-cil.Makecfg.MakeCFG.vidVisitor)

      Class MakeCFG.vidVisitor

      +vidVisitor (goblint-cil.Makecfg.MakeCFG.vidVisitor)

      Class MakeCFG.vidVisitor

      diff --git a/api/goblint-cil/Makecfg/MakeCFG/index.html b/api/goblint-cil/Makecfg/MakeCFG/index.html index acdfd768e..92be3dd41 100644 --- a/api/goblint-cil/Makecfg/MakeCFG/index.html +++ b/api/goblint-cil/Makecfg/MakeCFG/index.html @@ -1,2 +1,2 @@ -MakeCFG (goblint-cil.Makecfg.MakeCFG)

      Module Makecfg.MakeCFG

      val contains_call : GoblintCil.instr list -> bool
      class callBBVisitor : object ... end
      val calls_end_basic_blocks : GoblintCil.file -> unit
      class vidVisitor : object ... end
      val globally_unique_vids : GoblintCil.file -> unit
      val makeCFGFeature : GoblintCil.Feature.t
      +MakeCFG (goblint-cil.Makecfg.MakeCFG)

      Module Makecfg.MakeCFG

      val contains_call : GoblintCil.instr list -> bool
      class callBBVisitor : object ... end
      val calls_end_basic_blocks : GoblintCil.file -> unit
      class vidVisitor : object ... end
      val globally_unique_vids : GoblintCil.file -> unit
      val makeCFGFeature : GoblintCil.Feature.t
      diff --git a/api/goblint-cil/Makecfg/index.html b/api/goblint-cil/Makecfg/index.html index 5594e5543..f4033956f 100644 --- a/api/goblint-cil/Makecfg/index.html +++ b/api/goblint-cil/Makecfg/index.html @@ -1,2 +1,2 @@ -Makecfg (goblint-cil.Makecfg)

      Module Makecfg

      module MakeCFG : sig ... end
      +Makecfg (goblint-cil.Makecfg)

      Module Makecfg

      module MakeCFG : sig ... end
      diff --git a/api/goblint-cil/Ptranal/index.html b/api/goblint-cil/Ptranal/index.html index b4cbec0c4..5389ef9f1 100644 --- a/api/goblint-cil/Ptranal/index.html +++ b/api/goblint-cil/Ptranal/index.html @@ -1,2 +1,2 @@ -Ptranal (goblint-cil.Ptranal)

      Module Ptranal

      val debug : bool Stdlib.ref

      Print extra debugging info

      val debug_constraints : bool Stdlib.ref

      Debug constraints (print all constraints)

      val debug_aliases : bool Stdlib.ref

      Debug smart alias queries

      val debug_may_aliases : bool Stdlib.ref

      Debug may alias queries

      val smart_aliases : bool Stdlib.ref
      val print_constraints : bool Stdlib.ref

      Print out the top level constraints

      val analyze_mono : bool Stdlib.ref

      Make the analysis monomorphic

      val no_sub : bool Stdlib.ref

      Disable subtyping

      val no_flow : bool Stdlib.ref

      Make the flow step a no-op

      val show_progress : bool Stdlib.ref

      Show the progress of the flow step

      val conservative_undefineds : bool Stdlib.ref

      Treat undefined functions conservatively

      val callHasNoSideEffects : (GoblintCil.Cil.exp -> bool) Stdlib.ref

      client can specify particular external functions that have no side effects

      val analyze_file : GoblintCil.Cil.file -> unit

      Analyze a file

      val print_types : unit -> unit

      Print the type of each lvalue in the program

      exception UnknownLocation

      If undefined functions are analyzed conservatively, any of the high-level queries may raise this exception

      val may_alias : GoblintCil.Cil.exp -> GoblintCil.Cil.exp -> bool
      val resolve_lval : GoblintCil.Cil.lval -> GoblintCil.Cil.varinfo list
      val resolve_exp : GoblintCil.Cil.exp -> GoblintCil.Cil.varinfo list
      val resolve_funptr : GoblintCil.Cil.exp -> GoblintCil.Cil.fundec list
      type absloc

      type for abstract locations

      val absloc_of_varinfo : GoblintCil.Cil.varinfo -> absloc

      Give an abstract location for a varinfo

      val absloc_of_lval : GoblintCil.Cil.lval -> absloc

      Give an abstract location for an Cil lvalue

      val absloc_eq : absloc -> absloc -> bool

      may the two abstract locations be aliased?

      val absloc_e_points_to : GoblintCil.Cil.exp -> absloc list
      val absloc_e_transitive_points_to : GoblintCil.Cil.exp -> absloc list
      val absloc_lval_aliases : GoblintCil.Cil.lval -> absloc list
      val d_absloc : unit -> absloc -> GoblintCil.Pretty.doc

      Print a string representing an absloc, for debugging.

      val compute_results : bool -> unit

      Compute points to sets for variables. If true is passed, print the sets.

      val compute_aliases : bool -> unit
      val feature : GoblintCil.Feature.t
      +Ptranal (goblint-cil.Ptranal)

      Module Ptranal

      val debug : bool Stdlib.ref

      Print extra debugging info

      val debug_constraints : bool Stdlib.ref

      Debug constraints (print all constraints)

      val debug_aliases : bool Stdlib.ref

      Debug smart alias queries

      val debug_may_aliases : bool Stdlib.ref

      Debug may alias queries

      val smart_aliases : bool Stdlib.ref
      val print_constraints : bool Stdlib.ref

      Print out the top level constraints

      val analyze_mono : bool Stdlib.ref

      Make the analysis monomorphic

      val no_sub : bool Stdlib.ref

      Disable subtyping

      val no_flow : bool Stdlib.ref

      Make the flow step a no-op

      val show_progress : bool Stdlib.ref

      Show the progress of the flow step

      val conservative_undefineds : bool Stdlib.ref

      Treat undefined functions conservatively

      val callHasNoSideEffects : (GoblintCil.Cil.exp -> bool) Stdlib.ref

      client can specify particular external functions that have no side effects

      val analyze_file : GoblintCil.Cil.file -> unit

      Analyze a file

      val print_types : unit -> unit

      Print the type of each lvalue in the program

      exception UnknownLocation

      If undefined functions are analyzed conservatively, any of the high-level queries may raise this exception

      val may_alias : GoblintCil.Cil.exp -> GoblintCil.Cil.exp -> bool
      val resolve_lval : GoblintCil.Cil.lval -> GoblintCil.Cil.varinfo list
      val resolve_exp : GoblintCil.Cil.exp -> GoblintCil.Cil.varinfo list
      val resolve_funptr : GoblintCil.Cil.exp -> GoblintCil.Cil.fundec list
      type absloc

      type for abstract locations

      val absloc_of_varinfo : GoblintCil.Cil.varinfo -> absloc

      Give an abstract location for a varinfo

      val absloc_of_lval : GoblintCil.Cil.lval -> absloc

      Give an abstract location for an Cil lvalue

      val absloc_eq : absloc -> absloc -> bool

      may the two abstract locations be aliased?

      val absloc_e_points_to : GoblintCil.Cil.exp -> absloc list
      val absloc_e_transitive_points_to : GoblintCil.Cil.exp -> absloc list
      val absloc_lval_aliases : GoblintCil.Cil.lval -> absloc list
      val d_absloc : unit -> absloc -> GoblintCil.Pretty.doc

      Print a string representing an absloc, for debugging.

      val compute_results : bool -> unit

      Compute points to sets for variables. If true is passed, print the sets.

      val compute_aliases : bool -> unit
      val feature : GoblintCil.Feature.t
      diff --git a/api/goblint-cil/Syntacticsearch/CodeQuery/index.html b/api/goblint-cil/Syntacticsearch/CodeQuery/index.html index 72e070e2e..dfd3bf90d 100644 --- a/api/goblint-cil/Syntacticsearch/CodeQuery/index.html +++ b/api/goblint-cil/Syntacticsearch/CodeQuery/index.html @@ -1,5 +1,5 @@ -CodeQuery (goblint-cil.Syntacticsearch.CodeQuery)

      Module Syntacticsearch.CodeQuery

      module Result = Ppx_deriving_yojson_runtime.Result
      type selectable =
      1. | Name_sel
      2. | Location_sel
      3. | Type_sel
      4. | ID_sel
      val selectable_to_yojson : selectable -> Yojson.Safe.t
      val selectable_of_yojson : +CodeQuery (goblint-cil.Syntacticsearch.CodeQuery)

      Module Syntacticsearch.CodeQuery

      module Result = Ppx_deriving_yojson_runtime.Result
      type selectable =
      1. | Name_sel
      2. | Location_sel
      3. | Type_sel
      4. | ID_sel
      val selectable_to_yojson : selectable -> Yojson.Safe.t
      val selectable_of_yojson : Yojson.Safe.t -> selectable Ppx_deriving_yojson_runtime.error_or
      type select = selectable list
      val select_to_yojson : select -> Yojson.Safe.t
      val select_of_yojson : Yojson.Safe.t -> diff --git a/api/goblint-cil/Syntacticsearch/FuncDatatype/index.html b/api/goblint-cil/Syntacticsearch/FuncDatatype/index.html index 285a2ad34..9e0b1f732 100644 --- a/api/goblint-cil/Syntacticsearch/FuncDatatype/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncDatatype/index.html @@ -1,5 +1,5 @@ -FuncDatatype (goblint-cil.Syntacticsearch.FuncDatatype)

      Module Syntacticsearch.FuncDatatype

      val find_def : +FuncDatatype (goblint-cil.Syntacticsearch.FuncDatatype)

      Module Syntacticsearch.FuncDatatype

      val find_def : Stdlib.String.t -> GoblintCil.file -> (string * GoblintCil.location * Stdlib.String.t * int) list
      val find_def_all : diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_usesvar_with_tmp/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_usesvar_with_tmp/index.html index 45e3bf8cd..7809ace98 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_usesvar_with_tmp/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_usesvar_with_tmp/index.html @@ -1,5 +1,5 @@ -find_calls_usesvar_with_tmp (goblint-cil.Syntacticsearch.FuncFunction.find_calls_usesvar_with_tmp)

      Class FuncFunction.find_calls_usesvar_with_tmp

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +find_calls_usesvar_with_tmp (goblint-cil.Syntacticsearch.FuncFunction.find_calls_usesvar_with_tmp)

      Class FuncFunction.find_calls_usesvar_with_tmp

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_with_tmp/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_with_tmp/index.html index d34fbcc7d..28b9045a9 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_with_tmp/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-find_calls_with_tmp/index.html @@ -1,5 +1,5 @@ -find_calls_with_tmp (goblint-cil.Syntacticsearch.FuncFunction.find_calls_with_tmp)

      Class FuncFunction.find_calls_with_tmp

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +find_calls_with_tmp (goblint-cil.Syntacticsearch.FuncFunction.find_calls_with_tmp)

      Class FuncFunction.find_calls_with_tmp

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_returns/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_returns/index.html index 10520eff5..0f7efff15 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_returns/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_returns/index.html @@ -1,5 +1,5 @@ -fun_find_returns (goblint-cil.Syntacticsearch.FuncFunction.fun_find_returns)

      Class FuncFunction.fun_find_returns

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +fun_find_returns (goblint-cil.Syntacticsearch.FuncFunction.fun_find_returns)

      Class FuncFunction.fun_find_returns

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_sig/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_sig/index.html index d42f8f919..07959f0cf 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_sig/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_sig/index.html @@ -1,5 +1,5 @@ -fun_find_sig (goblint-cil.Syntacticsearch.FuncFunction.fun_find_sig)

      Class FuncFunction.fun_find_sig

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +fun_find_sig (goblint-cil.Syntacticsearch.FuncFunction.fun_find_sig)

      Class FuncFunction.fun_find_sig

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses/index.html index aff514ab9..3a358de1a 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses/index.html @@ -1,5 +1,5 @@ -fun_find_uses (goblint-cil.Syntacticsearch.FuncFunction.fun_find_uses)

      Class FuncFunction.fun_find_uses

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +fun_find_uses (goblint-cil.Syntacticsearch.FuncFunction.fun_find_uses)

      Class FuncFunction.fun_find_uses

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses_in_fun/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses_in_fun/index.html index c5e47f60d..96423c636 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses_in_fun/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_uses_in_fun/index.html @@ -1,5 +1,5 @@ -fun_find_uses_in_fun (goblint-cil.Syntacticsearch.FuncFunction.fun_find_uses_in_fun)

      Class FuncFunction.fun_find_uses_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +fun_find_uses_in_fun (goblint-cil.Syntacticsearch.FuncFunction.fun_find_uses_in_fun)

      Class FuncFunction.fun_find_uses_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_usesvar_in_fun/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_usesvar_in_fun/index.html index e72fd386e..bbdd64327 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_usesvar_in_fun/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/class-fun_find_usesvar_in_fun/index.html @@ -1,5 +1,5 @@ -fun_find_usesvar_in_fun (goblint-cil.Syntacticsearch.FuncFunction.fun_find_usesvar_in_fun)

      Class FuncFunction.fun_find_usesvar_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +fun_find_usesvar_in_fun (goblint-cil.Syntacticsearch.FuncFunction.fun_find_usesvar_in_fun)

      Class FuncFunction.fun_find_usesvar_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncFunction/index.html b/api/goblint-cil/Syntacticsearch/FuncFunction/index.html index 9b84d3e94..e06c30abb 100644 --- a/api/goblint-cil/Syntacticsearch/FuncFunction/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncFunction/index.html @@ -1,5 +1,5 @@ -FuncFunction (goblint-cil.Syntacticsearch.FuncFunction)

      Module Syntacticsearch.FuncFunction

      val is_equal_funname_funid : +FuncFunction (goblint-cil.Syntacticsearch.FuncFunction)

      Module Syntacticsearch.FuncFunction

      val is_equal_funname_funid : GoblintCil.varinfo -> Stdlib.String.t -> int -> diff --git a/api/goblint-cil/Syntacticsearch/FuncVar/class-var_find_def_in_fun/index.html b/api/goblint-cil/Syntacticsearch/FuncVar/class-var_find_def_in_fun/index.html index eb7715175..c74b979a9 100644 --- a/api/goblint-cil/Syntacticsearch/FuncVar/class-var_find_def_in_fun/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncVar/class-var_find_def_in_fun/index.html @@ -1,5 +1,5 @@ -var_find_def_in_fun (goblint-cil.Syntacticsearch.FuncVar.var_find_def_in_fun)

      Class FuncVar.var_find_def_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +var_find_def_in_fun (goblint-cil.Syntacticsearch.FuncVar.var_find_def_in_fun)

      Class FuncVar.var_find_def_in_fun

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncVar/class-var_search_in_expr/index.html b/api/goblint-cil/Syntacticsearch/FuncVar/class-var_search_in_expr/index.html index b336725b0..82b8639ab 100644 --- a/api/goblint-cil/Syntacticsearch/FuncVar/class-var_search_in_expr/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncVar/class-var_search_in_expr/index.html @@ -1,5 +1,5 @@ -var_search_in_expr (goblint-cil.Syntacticsearch.FuncVar.var_search_in_expr)

      Class FuncVar.var_search_in_expr

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      method vinitoffs : GoblintCil.offset -> +var_search_in_expr (goblint-cil.Syntacticsearch.FuncVar.var_search_in_expr)

      Class FuncVar.var_search_in_expr

      Invoked for each variable declaration. The subtrees to be traversed are those corresponding to the type and attributes of the variable. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions. This means that the list of formals in a function definition will be traversed twice, once as part of the function type and second as part of the formals in a function definition.

      Invoked on each variable use. Here only the SkipChildren and ChangeTo actions make sense since there are no subtrees. Note that the type and attributes of the variable are not traversed for a variable use

      Invoked on each expression occurrence. The subtrees are the subexpressions, the types (for a Cast or SizeOf expression) or the variable use.

      Invoked on each lvalue occurrence

      Invoked on each offset occurrence that is *not* as part of an initializer list specification, i.e. in an lval or recursively inside an offset.

      Invoked on each offset appearing in the list of a CompoundInit initializer.

      Invoked on each instruction occurrence. The ChangeTo action can replace this instruction with a list of instructions

      Control-flow statement. The default DoChildren action does not create a new statement when the components change. Instead it updates the contents of the original statement. This is done to preserve the sharing with Goto and Case statements that point to the original statement. If you use the ChangeTo action then you should take care of preserving that sharing yourself.

      Function definition. Replaced in place.

      Global (vars, types, etc.)

      method vinit : GoblintCil.varinfo -> GoblintCil.offset -> diff --git a/api/goblint-cil/Syntacticsearch/FuncVar/index.html b/api/goblint-cil/Syntacticsearch/FuncVar/index.html index 29c6a27bf..8657edc83 100644 --- a/api/goblint-cil/Syntacticsearch/FuncVar/index.html +++ b/api/goblint-cil/Syntacticsearch/FuncVar/index.html @@ -1,5 +1,5 @@ -FuncVar (goblint-cil.Syntacticsearch.FuncVar)

      Module Syntacticsearch.FuncVar

      val is_equal_varname_varid : +FuncVar (goblint-cil.Syntacticsearch.FuncVar)

      Module Syntacticsearch.FuncVar

      val is_equal_varname_varid : GoblintCil.varinfo -> Stdlib.String.t -> int -> diff --git a/api/goblint-cil/Syntacticsearch/QueryMapping/index.html b/api/goblint-cil/Syntacticsearch/QueryMapping/index.html index 15e2a9228..3d834aa20 100644 --- a/api/goblint-cil/Syntacticsearch/QueryMapping/index.html +++ b/api/goblint-cil/Syntacticsearch/QueryMapping/index.html @@ -1,5 +1,5 @@ -QueryMapping (goblint-cil.Syntacticsearch.QueryMapping)

      Module Syntacticsearch.QueryMapping

      val loc_default : GoblintCil.location
      val delete_elem : +QueryMapping (goblint-cil.Syntacticsearch.QueryMapping)

      Module Syntacticsearch.QueryMapping

      val loc_default : GoblintCil.location
      val delete_elem : (Stdlib.String.t * GoblintCil.location * Stdlib.String.t * 'a) -> (Stdlib.String.t * GoblintCil.location * Stdlib.String.t * 'a) list -> (Stdlib.String.t * GoblintCil.location * Stdlib.String.t * 'a) list
      val delete_duplicates : 'a list -> ('a, int) Stdlib.Hashtbl.t -> 'a list
      val and_one_elem : diff --git a/api/goblint-cil/Syntacticsearch/ResultPrinter/index.html b/api/goblint-cil/Syntacticsearch/ResultPrinter/index.html index b84534e4f..55c250232 100644 --- a/api/goblint-cil/Syntacticsearch/ResultPrinter/index.html +++ b/api/goblint-cil/Syntacticsearch/ResultPrinter/index.html @@ -1,5 +1,5 @@ -ResultPrinter (goblint-cil.Syntacticsearch.ResultPrinter)

      Module Syntacticsearch.ResultPrinter

      val contains : 'a list -> 'a -> bool
      val get_max_lengths : +ResultPrinter (goblint-cil.Syntacticsearch.ResultPrinter)

      Module Syntacticsearch.ResultPrinter

      val contains : 'a list -> 'a -> bool
      val get_max_lengths : (string * GoblintCil.location * string * int) list -> int -> int -> diff --git a/api/goblint-cil/Syntacticsearch/index.html b/api/goblint-cil/Syntacticsearch/index.html index bd5727520..0de15be61 100644 --- a/api/goblint-cil/Syntacticsearch/index.html +++ b/api/goblint-cil/Syntacticsearch/index.html @@ -1,2 +1,2 @@ -Syntacticsearch (goblint-cil.Syntacticsearch)

      Module Syntacticsearch

      module CodeQuery : sig ... end
      module FuncDatatype : sig ... end
      module FuncFunction : sig ... end
      module FuncVar : sig ... end
      module QueryMapping : sig ... end
      module ResultPrinter : sig ... end
      +Syntacticsearch (goblint-cil.Syntacticsearch)

      Module Syntacticsearch

      module CodeQuery : sig ... end
      module FuncDatatype : sig ... end
      module FuncFunction : sig ... end
      module FuncVar : sig ... end
      module QueryMapping : sig ... end
      module ResultPrinter : sig ... end
      diff --git a/api/goblint-cil/Zrapp/class-zraCilPrinterClass/index.html b/api/goblint-cil/Zrapp/class-zraCilPrinterClass/index.html index 972f79932..9fa2e5abf 100644 --- a/api/goblint-cil/Zrapp/class-zraCilPrinterClass/index.html +++ b/api/goblint-cil/Zrapp/class-zraCilPrinterClass/index.html @@ -1,5 +1,5 @@ -zraCilPrinterClass (goblint-cil.Zrapp.zraCilPrinterClass)

      Class Zrapp.zraCilPrinterClass

      method setCurrentFormals : GoblintCil.Cil.varinfo list -> unit
      method setPrintInstrTerminator : string -> unit
      method getPrintInstrTerminator : unit -> string
      method pVDecl : unit -> GoblintCil.Cil.varinfo -> GoblintCil__.Pretty.doc

      Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

      method pVar : GoblintCil.Cil.varinfo -> GoblintCil__.Pretty.doc

      Invoked on each variable use.

      method pLval : unit -> GoblintCil.Cil.lval -> GoblintCil__.Pretty.doc

      Invoked on each lvalue occurrence

      method pOffset : GoblintCil__.Pretty.doc -> +zraCilPrinterClass (goblint-cil.Zrapp.zraCilPrinterClass)

      Class Zrapp.zraCilPrinterClass

      method setCurrentFormals : GoblintCil.Cil.varinfo list -> unit
      method setPrintInstrTerminator : string -> unit
      method getPrintInstrTerminator : unit -> string
      method pVDecl : unit -> GoblintCil.Cil.varinfo -> GoblintCil__.Pretty.doc

      Invoked for each variable declaration. Note that variable declarations are all the GVar, GVarDecl, GFun, all the varinfo in formals of function types, and the formals and locals for function definitions.

      method pVar : GoblintCil.Cil.varinfo -> GoblintCil__.Pretty.doc

      Invoked on each variable use.

      method pLval : unit -> GoblintCil.Cil.lval -> GoblintCil__.Pretty.doc

      Invoked on each lvalue occurrence

      method pOffset : GoblintCil__.Pretty.doc -> GoblintCil.Cil.offset -> GoblintCil__.Pretty.doc

      Invoked on each offset occurrence. The second argument is the base.

      method pInstr : unit -> GoblintCil.Cil.instr -> GoblintCil__.Pretty.doc

      Invoked on each instruction occurrence.

      method pLabel : unit -> GoblintCil.Cil.label -> GoblintCil__.Pretty.doc

      Print a label.

      method pStmt : unit -> GoblintCil.Cil.stmt -> GoblintCil__.Pretty.doc

      Control-flow statement. This is used by printGlobal and by dumpGlobal.

      method dStmt : Stdlib.out_channel -> int -> GoblintCil.Cil.stmt -> unit

      Dump a control-flow statement to a file with a given indentation. This is used by dumpGlobal.

      method dBlock : Stdlib.out_channel -> int -> GoblintCil.Cil.block -> unit

      Dump a control-flow block to a file with a given indentation. This is used by dumpGlobal.

      method pBlock : unit -> GoblintCil.Cil.block -> GoblintCil__.Pretty.doc

      Print a block.

      method pGlobal : unit -> GoblintCil.Cil.global -> GoblintCil__.Pretty.doc

      Global (vars, types, etc.). This can be slow and is used only by printGlobal but not by dumpGlobal.

      method dGlobal : Stdlib.out_channel -> GoblintCil.Cil.global -> unit

      Dump a global to a file with a given indentation. This is used by dumpGlobal

      method pFieldDecl : unit -> GoblintCil.Cil.fieldinfo -> GoblintCil__.Pretty.doc

      A field declaration

      method pType : GoblintCil__.Pretty.doc option -> unit -> diff --git a/api/goblint-cil/Zrapp/index.html b/api/goblint-cil/Zrapp/index.html index 5ecf0d430..61e489cfe 100644 --- a/api/goblint-cil/Zrapp/index.html +++ b/api/goblint-cil/Zrapp/index.html @@ -1,5 +1,5 @@ -Zrapp (goblint-cil.Zrapp)

      Module Zrapp

      val debug : bool Stdlib.ref
      val doElimTemps : bool Stdlib.ref
      val deputyAttrs : bool Stdlib.ref
      val zraCilPrinter : GoblintCil.Cil.cilPrinter
      val pp_exp : +Zrapp (goblint-cil.Zrapp)

      Module Zrapp

      val debug : bool Stdlib.ref
      val doElimTemps : bool Stdlib.ref
      val deputyAttrs : bool Stdlib.ref
      val zraCilPrinter : GoblintCil.Cil.cilPrinter
      val pp_exp : GoblintCil.Cil.fundec -> unit -> GoblintCil.Cil.exp -> diff --git a/api/goblint-cil/index.html b/api/goblint-cil/index.html index 120d658f9..4a7398be4 100644 --- a/api/goblint-cil/index.html +++ b/api/goblint-cil/index.html @@ -1,2 +1,2 @@ -index (goblint-cil.index)

      goblint-cil index

      Library goblint-cil

      The entry point of this library is the module: GoblintCil.

      Library goblint-cil.dataslicing

      The entry point of this library is the module: Dataslicing.

      Library goblint-cil.liveness

      The entry point of this library is the module: Liveness.

      Library goblint-cil.makecfg

      The entry point of this library is the module: Makecfg.

      Library goblint-cil.pta

      The entry point of this library is the module: Ptranal.

      Library goblint-cil.syntacticsearch

      The entry point of this library is the module: Syntacticsearch.

      Library goblint-cil.zrapp

      The entry point of this library is the module: Zrapp.

      +index (goblint-cil.index)

      goblint-cil index

      Library goblint-cil

      The entry point of this library is the module: GoblintCil.

      Library goblint-cil.dataslicing

      The entry point of this library is the module: Dataslicing.

      Library goblint-cil.liveness

      The entry point of this library is the module: Liveness.

      Library goblint-cil.makecfg

      The entry point of this library is the module: Makecfg.

      Library goblint-cil.pta

      The entry point of this library is the module: Ptranal.

      Library goblint-cil.syntacticsearch

      The entry point of this library is the module: Syntacticsearch.

      Library goblint-cil.zrapp

      The entry point of this library is the module: Zrapp.

      diff --git a/api/index.html b/api/index.html index a7a496727..2ac50456c 100644 --- a/api/index.html +++ b/api/index.html @@ -11,7 +11,7 @@

      OCaml package documentation

        -
      1. goblint-cil 2.0.4-6-g135fc3c
      2. +
      3. goblint-cil 2.0.4-10-g98095b4
      diff --git a/api/odoc.support/odoc.css b/api/odoc.support/odoc.css index 71148de3d..15240b577 100644 --- a/api/odoc.support/odoc.css +++ b/api/odoc.support/odoc.css @@ -1,7 +1,7 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.4.2 */ + odoc 2.4.3 */ /* Fonts */ /* noticia-text-regular - latin */ diff --git a/examples/ex1.txt b/examples/ex1.txt index 9dd0e3240..877c66373 100644 --- a/examples/ex1.txt +++ b/examples/ex1.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex1.c" diff --git a/examples/ex10.txt b/examples/ex10.txt index 63f88113d..70c9abb71 100644 --- a/examples/ex10.txt +++ b/examples/ex10.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex10.c" diff --git a/examples/ex11.txt b/examples/ex11.txt index ec9782ac3..076bfddab 100644 --- a/examples/ex11.txt +++ b/examples/ex11.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex11.c" diff --git a/examples/ex12.txt b/examples/ex12.txt index 1eb0bd184..f8d99eadf 100644 --- a/examples/ex12.txt +++ b/examples/ex12.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 2 "cilcode.tmp/ex12.c" diff --git a/examples/ex13.txt b/examples/ex13.txt index 6946d9d47..73d594d98 100644 --- a/examples/ex13.txt +++ b/examples/ex13.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex13.c" diff --git a/examples/ex14.txt b/examples/ex14.txt index cfcae8681..f049cec96 100644 --- a/examples/ex14.txt +++ b/examples/ex14.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex14.c" diff --git a/examples/ex15.txt b/examples/ex15.txt index 72a1552d9..f189bb101 100644 --- a/examples/ex15.txt +++ b/examples/ex15.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex15.c" diff --git a/examples/ex16.txt b/examples/ex16.txt index 3155e3786..1f2bb160c 100644 --- a/examples/ex16.txt +++ b/examples/ex16.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex16.c" diff --git a/examples/ex17.txt b/examples/ex17.txt index 8ebcc6cd5..5a2a8123e 100644 --- a/examples/ex17.txt +++ b/examples/ex17.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex17.c" diff --git a/examples/ex18.txt b/examples/ex18.txt index 3951dd368..0e0731d8c 100644 --- a/examples/ex18.txt +++ b/examples/ex18.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex18.c" diff --git a/examples/ex19.txt b/examples/ex19.txt index ad99fc390..aecd5974b 100644 --- a/examples/ex19.txt +++ b/examples/ex19.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex19.c" diff --git a/examples/ex2.txt b/examples/ex2.txt index c112ccb04..e55c8868c 100644 --- a/examples/ex2.txt +++ b/examples/ex2.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex2.c" diff --git a/examples/ex20.txt b/examples/ex20.txt index 840aaafd6..64af5a9f5 100644 --- a/examples/ex20.txt +++ b/examples/ex20.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex20.c" diff --git a/examples/ex21.txt b/examples/ex21.txt index 962cdc66e..061c63457 100644 --- a/examples/ex21.txt +++ b/examples/ex21.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex21.c" diff --git a/examples/ex22.txt b/examples/ex22.txt index 463a3b5a8..95628836a 100644 --- a/examples/ex22.txt +++ b/examples/ex22.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 356 "/usr/include/stdio.h" diff --git a/examples/ex23.txt b/examples/ex23.txt index 5def1d6ac..c718c961d 100644 --- a/examples/ex23.txt +++ b/examples/ex23.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex23.c" diff --git a/examples/ex3.txt b/examples/ex3.txt index 19bf4539e..e15c664ff 100644 --- a/examples/ex3.txt +++ b/examples/ex3.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex3.c" diff --git a/examples/ex4.txt b/examples/ex4.txt index 008e425ab..8550c5645 100644 --- a/examples/ex4.txt +++ b/examples/ex4.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 2 "cilcode.tmp/ex4.c" diff --git a/examples/ex5.txt b/examples/ex5.txt index 62bea25ff..af43665f0 100644 --- a/examples/ex5.txt +++ b/examples/ex5.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex5.c" diff --git a/examples/ex6.txt b/examples/ex6.txt index d0eb75aa7..f76bc9150 100644 --- a/examples/ex6.txt +++ b/examples/ex6.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex6.c" diff --git a/examples/ex7.txt b/examples/ex7.txt index 07339b749..b2546bc6c 100644 --- a/examples/ex7.txt +++ b/examples/ex7.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 2 "cilcode.tmp/ex7.c" diff --git a/examples/ex8.txt b/examples/ex8.txt index d482d96e2..149f22cae 100644 --- a/examples/ex8.txt +++ b/examples/ex8.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 2 "cilcode.tmp/ex8.c" diff --git a/examples/ex9.txt b/examples/ex9.txt index ca6703d77..b271ee415 100644 --- a/examples/ex9.txt +++ b/examples/ex9.txt @@ -1,4 +1,4 @@ -/* Generated by Goblint-CIL v. 2.0.4-6-g135fc3c */ +/* Generated by Goblint-CIL v. 2.0.4-10-g98095b4 */ /* print_CIL_Input is true */ #line 1 "cilcode.tmp/ex9.c" diff --git a/header.html b/header.html index e90b6e49a..a9e96a7e7 100644 --- a/header.html +++ b/header.html @@ -5,13 +5,13 @@ -Goblint-CIL Documentation (v. 2.0.4-6-g135fc3c) +Goblint-CIL Documentation (v. 2.0.4-10-g98095b4) -

      Goblint-CIL - Infrastructure for C Program Analysis and Transformation (v. 2.0.4-6-g135fc3c)

      +

      Goblint-CIL - Infrastructure for C Program Analysis and Transformation (v. 2.0.4-10-g98095b4)

      diff --git a/index.html b/index.html index 5e69d440a..680e25670 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ -CIL Documentation (v. 2.0.4-6-g135fc3c) +CIL Documentation (v. 2.0.4-10-g98095b4)