package goblint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b729c94adb383a39aea32eb005c988dfd44b92af22ee6a4eedf4239542ac6c26
sha512=643b98770e5fe5644324c95c9ae3a9f698f25c8b11b298f0751d524e0b20af368b2a465fc8200b75a73d48fc9a053fd90f5e8920d4db070927f93188bb8687e0
doc/goblint.lib/Goblint_lib/index.html
Module Goblint_libSource
Main library.
Framework
Main external executable functionality: command-line, front-end and analysis execution.
module Control : sig ... endMain internal functionality: analysis of the program by abstract interpretation via constraint solving.
module Server : sig ... endInteractive server mode using JSON-RPC.
CFG
Control-flow graphs (CFGs) are used to represent each function.
module Node = Nodemodule Edge = Edgemodule MyCFG = MyCFGmodule CfgTools : sig ... endConstruction and output of CFGs.
Specification
Analyses are specified by domains and transfer functions. A dynamic composition of analyses is combined with CFGs to produce a constraint system.
module Analyses : sig ... endAnalysis specification and constraint system signatures.
module Constraints : sig ... endConstruction of a constraint system from an analysis specification and CFGs. Transformatons of analysis specifications as functors.
module AnalysisState = AnalysisStatemodule AnalysisStateUtil : sig ... endmodule ControlSpecC = ControlSpecCMaster control program (MCP) is the analysis specification for the dynamic product of activated analyses.
module MCP : sig ... endMCP analysis specification.
module MCPRegistry : sig ... endRegistry of dynamically activatable analyses. Analysis specification modules for the dynamic product.
module MCPAccess : sig ... endMemory access metadata module for MCP.
MCP allows activated analyses to query each other during the analysis. Query results from different analyses for the same query are met for precision.
module Queries : sig ... endQueries and their result lattices.
MCP allows activated analyses to emit events to each other during the analysis.
module Events : sig ... endEvents.
Results
The following modules help query the constraint system solution using semantic information.
module ResultQuery : sig ... endPerform queries on the constraint system solution.
module VarQuery : sig ... endQueries for constraint variables related to semantic elements.
Configuration
Runtime configuration is represented as JSON. Options are specified and documented by the JSON schema src/common/util/options.schema.json.
module GobConfig = GobConfigmodule AfterConfig = AfterConfigmodule JsonSchema = JsonSchemamodule Options = OptionsAnalyses
Analyses activatable under MCP.
Value
Analyses related to values of program variables.
module Base : sig ... endNon-relational value analysis aka base analysis (base).
module VarEq : sig ... endSymbolic expression equalities analysis (var_eq).
module CondVars : sig ... endSymbolic variable - logical expression equalities analysis (condvars).
module TmpSpecial : sig ... endAnalysis that tracks which variables hold the results of calls to math library functions (tmpSpecial).
Heap
Analyses related to the heap.
module Region : sig ... endAnalysis of disjoint heap regions for dynamically allocated memory (region).
module MallocFresh : sig ... endAnalysis of unescaped (i.e. thread-local) heap locations (mallocFresh).
module Malloc_null : sig ... endPath-sensitive analysis of failed dynamic memory allocations (malloc_null).
module MemLeak : sig ... endAn analysis for the detection of memory leaks (memLeak).
module UseAfterFree : sig ... endAn analysis for the detection of use-after-free vulnerabilities (useAfterFree).
module MemOutOfBounds : sig ... endAn analysis for the detection of out-of-bounds memory accesses (memOutOfBounds).
Concurrency
Analyses related to concurrency.
Locks
Analyses related to locking.
module MutexEventsAnalysis : sig ... endMutex locking and unlocking analysis (mutexEvents).
module LocksetAnalysis : sig ... endBasic lockset analyses.
module MutexTypeAnalysis : sig ... endAn analysis tracking the type of a mutex (pthreadMutexType).
module MutexAnalysis : sig ... endMust lockset and protecting lockset analysis (mutex).
module MayLocks : sig ... endMay lockset analysis and analysis of double locking (maylocks).
module SymbLocks : sig ... endSymbolic lockset analysis for per-element (field or index) locking patterns (symb_locks).
module Deadlock : sig ... endDeadlock analysis (deadlock).
Threads
Analyses related to threads.
module ThreadFlag : sig ... endMulti-threadedness analysis (threadflag).
module ThreadId : sig ... endCurrent thread ID analysis (threadid).
module ThreadAnalysis : sig ... endCreated threads and their uniqueness analysis (thread).
module ThreadJoins : sig ... endJoined threads analysis (threadJoins).
module MHPAnalysis : sig ... endMay-happen-in-parallel (MHP) analysis for memory accesses (mhp).
module ThreadReturn : sig ... endThread returning analysis which abstracts a thread's call stack by a boolean, indicating whether it is at the topmost call stack frame or not (threadreturn).
Other
module RaceAnalysis : sig ... endData race analysis (race).
module ThreadEscape : sig ... endEscape analysis for thread-local variables (escape).
module PthreadSignals : sig ... endMust received signals analysis for Pthread condition variables (pthreadSignals).
module ExtractPthread : sig ... endPromela extraction analysis for Pthread programs (extract-pthread).
Longjmp
Analyses related to longjmp and setjmp.
module ActiveSetjmp : sig ... endAnalysis of active setjmp buffers (activeSetjmp).
module ModifiedSinceLongjmp : sig ... endAnalysis of variables modified since setjmp (modifiedSinceLongjmp).
module ActiveLongjmp : sig ... endAnalysis of active longjmp targets (activeLongjmp).
module PoisonVariables : sig ... endTaint analysis of variables that were modified between setjmp and longjmp and not yet overwritten. (poisonVariables).
module Vla : sig ... endAnalysis of variable-length arrays (VLAs) in scope (vla).
Tutorial
Analyses for didactic purposes.
module Constants : sig ... endSimple intraprocedural integer constants analysis example (constants).
module Signs : sig ... endSimple intraprocedural integer signs analysis template (signs).
module Taint : sig ... endSimple interprocedural taint analysis template (taint).
module UnitAnalysis : sig ... endSimplest possible analysis with unit domain (unit).
Other
module Assert : sig ... endAnalysis of assert results (assert).
module FileUse : sig ... endAnalysis of correct file handle usage (file).
module LoopTermination : sig ... endTermination analysis for loops and goto statements (termination).
module Uninit : sig ... endAnalysis of initialized local variables (uninit).
module Expsplit : sig ... endPath-sensitive analysis according to values of arbitrary given expressions (expsplit).
module StackTrace : sig ... endCall stack analyses (stack_trace, stack_trace_set, stack_loc).
module Spec : sig ... endAnalysis using finite automaton specification file (spec).
Helper
Analyses which only support other analyses.
module AccessAnalysis : sig ... endAnalysis of memory accesses (access).
module WrapperFunctionAnalysis : sig ... endFamily of analyses which provide symbolic locations for special library functions. Provides symbolic heap locations for dynamic memory allocations and symbolic thread identifiers for thread creation (mallocWrapper, threadCreateWrapper).
module TaintPartialContexts : sig ... endTaint analysis of variables modified in a function (taintPartialContexts).
module UnassumeAnalysis : sig ... endUnassume analysis (unassume).
module ExpRelation : sig ... endStateless symbolic comparison expression analysis (expRelation).
module AbortUnless : sig ... endAnalysis of assume_abort_if_not-style functions (abortUnless).
Domains
Domains used by analysis specifications and constraint systems are lattices.
Besides lattice operations, their elements can also be compared and output (in various formats). Those operations are specified by Printable.S.
module Printable = Printablemodule Lattice = LatticeGeneral
Standard general-purpose domains and domain functors.
module BoolDomain : sig ... endBoolean domains.
module SetDomain : sig ... endSet domains.
module MapDomain : sig ... endMap domains.
module TrieDomain : sig ... endTrie domains.
module DisjointDomain : sig ... endAbstract domains for collections of elements from disjoint unions of domains. Formally, the elements form a cofibered domain from a discrete category.
module HoareDomain : sig ... endAbstract domains with Hoare ordering.
module PartitionDomain : sig ... endPartitioning domains.
module FlagHelper : sig ... endDomain alternatives chosen by a runtime flag.
Analysis-specific
Domains for specific analyses.
Value
Non-relational
Domains for Base analysis.
Numeric
module IntDomain : sig ... endAbstract domains for C integers.
module FloatDomain : sig ... endAbstract domains for C floating-point numbers.
Addresses
Memory locations are identified by mvalues, which consist of a variable and an offset. Mvalues are used throughout Goblint, not just the Base analysis.
Addresses extend mvalues with NULL, unknown pointers and string literals.
module Mval : sig ... endDomains for mvalues: simplified lvalues, which start with a GoblintCil.varinfo. Mvalues are the result of resolving pointer dereferences in lvalues.
module Offset : sig ... endDomains for variable offsets, i.e. array indices and struct fields.
module AddressDomain : sig ... endDomains for addresses/pointers.
Complex
module StructDomain : sig ... endAbstract domains for C structs.
module UnionDomain : sig ... endAbstract domains for C unions.
module ArrayDomain : sig ... endAbstract domains for C arrays.
module JmpBufDomain : sig ... endDomains for setjmp and longjmp analyses, and setjmp buffers.
Combined
These combine the above domains together for Base analysis.
module BaseDomain : sig ... endFull domain of Base analysis.
module ValueDomain : sig ... endDomain for a single Base analysis value.
module ValueDomainQueries : sig ... endQueries within ValueDomain.
Relational
Domains for RelationAnalysis.
Concurrency
module MutexAttrDomain : sig ... endMutex attribute type domain.
module LockDomain : sig ... endLockset domains.
module SymbLocksDomain : sig ... endSymbolic lockset domain.
module DeadlockDomain : sig ... endDeadlock domain.
module ThreadFlagDomain : sig ... endMulti-threadedness flag domains.
module ThreadIdDomain : sig ... endThread ID domains.
module ConcDomain : sig ... endDomains for thread sets and their uniqueness.
module MHP : sig ... endMay-happen-in-parallel (MHP) domain.
module EscapeDomain : sig ... endDomain for escaped thread-local variables.
module PthreadDomain : sig ... endDomains for extraction of Pthread programs.
Other
module Basetype = Basetypemodule Lval : sig ... endDomains for GoblintCil.lval.
module Access : sig ... endMemory accesses and their manipulation.
module AccessDomain : sig ... endDomain for memory accesses.
module MusteqDomain : sig ... endSymbolic lvalue equalities domain.
module RegionDomain : sig ... endDomains for disjoint heap regions.
module FileDomain : sig ... endDomains for file handles.
module StackDomain : sig ... endCall stack domains.
module MvalMapDomain : sig ... endDomains for mvalue maps.
module SpecDomain : sig ... endDomains for finite automaton specification file analysis.
Testing
Modules related to (property-based) testing of domains.
module DomainProperties : sig ... endQCheck properties for lattice properties.
module AbstractionDomainProperties : sig ... endQCheck properties for abstract operations.
module IntDomainProperties : sig ... endQCheck properties for IntDomain.
Incremental
Incremental analysis is for analyzing multiple versions of the same program and reusing as many results as possible.
module CompareCIL : sig ... endComparison of CIL files.
module CompareAST : sig ... endComparison of CIL ASTs.
module CompareCFG : sig ... endComparison of CFGs.
module UpdateCil : sig ... endCombination of CIL files using comparison results.
module MaxIdUtil : sig ... endTracking of maximum CIL IDs in use.
module Serialize : sig ... endSerialization/deserialization of incremental analysis data.
module CilMaps : sig ... endSpecial maps used for incremental comparison.
Solvers
Generic solvers are used to solve (side-effecting) constraint systems.
Top-down
The top-down solver family.
module Td3 : sig ... endIncremental/interactive terminating top-down solver, which supports space-efficiency and caching (td3).
module TopDown : sig ... endWarrowing top-down solver (topdown). Simpler version of Td3 without terminating, space-efficiency and incremental.
module TopDown_term : sig ... endTerminating top-down solver (topdown_term). Simpler version of Td3 without space-efficiency and incremental.
module TopDown_space_cache_term : sig ... endTerminating top-down solver, which supports space-efficiency and caching (topdown_space_cache_term). Simpler version of Td3 without incremental.
module TopDown_deprecated : sig ... endDeprecated top-down solver (topdown_deprecated).
SLR
The SLR solver family.
module SLRphased : sig ... endTwo-phased terminating SLR3 solver (slr3tp).
module SLRterm : sig ... endTerminating SLR3 solver (slr3t). Simpler version of SLRphased without phases.
module SLR : sig ... endVarious SLR solvers.
Other
module EffectWConEq : sig ... end(effectWConEq).
module Worklist : sig ... endWorklist solver (WL).
module Generic : sig ... endVarious simple/old solvers and solver utilities.
module Selector : sig ... endSolver, which delegates at runtime to the configured solver.
module PostSolver : sig ... endExtra constraint system evaluation pass for warning generation, verification, pruning, etc.
module LocalFixpoint : sig ... endFixpoint iteration solvers local to a single transfer function (don't use a constraint system).
module SolverStats : sig ... endStatistics for solvers.
module SolverBox : sig ... endBox operator for warrowing solvers.
I/O
Various input/output interfaces and formats.
module Messages = Messagesmodule Tracing = TracingFront-end
The following modules handle program input.
module Preprocessor : sig ... endDetection of suitable C preprocessor.
module CompilationDatabase : sig ... endInput program from a real-world project using a compilation database.
module MakefileUtil : sig ... endInput program from a real-world project using a Makefile.
module TerminationPreprocessing : sig ... endWitnesses
Witnesses are an exchangeable format for analysis results.
module Svcomp : sig ... endSV-COMP tasks and results.
module SvcompSpec : sig ... endSV-COMP specification strings and files.
module Invariant : sig ... endInvariants for witnesses.
module InvariantCil : sig ... endInvariant manipulation related to CIL transformations.
module WitnessUtil : sig ... endUtilities for witness generation and witness invariants.
GraphML
Automaton-based GraphML witnesses used in SV-COMP.
module MyARG : sig ... endAbstract reachability graph.
module WitnessConstraints : sig ... endAnalysis specification transformation for ARG construction.
module Witness : sig ... endOutput of ARG as GraphML.
module Graphml : sig ... endStreaming GraphML output.
YAML
Entry-based YAML witnesses to be used in SV-COMP.
module YamlWitness : sig ... endYAML witness generation and validation.
module YamlWitnessType : sig ... endYAML witness format types.
module WideningTokens : sig ... endWidening tokens are a generic and dynamic mechanism for delaying widening.
Violation
Experimental generation of violation witness automata or refinement with observer automata.
module Violation : sig ... endViolation checking in an ARG.
ARG path feasibility checking using weakest precondition and Z3 (not installed!).
module ObserverAutomaton : sig ... endFinite automaton for matching an infeasible ARG path.
module ObserverAnalysis : sig ... endPath-sensitive analysis using an ObserverAutomaton.
module Refinement : sig ... endExperimental analysis refinement.
SARIF
module SarifType : sig ... endSARIF format types.
module SarifRules : sig ... endSARIF rule definitions for Goblint.
Transformations
Transformations can be activated to transform the program using analysis results.
module Transform : sig ... endSignatures and registry for transformations.
module DeadCode : sig ... endDead code elimination transformation (remove_dead_code).
module EvalAssert : sig ... endTransformation for instrumenting the program with computed invariants as assertions (assert).
module ExpressionEvaluation : sig ... endTransformation for evaluating expressions on the analysis results (expeval). Hack for Gobview.
Utilities
module Timing = Timingmodule GoblintDir : sig ... endIntermediate data directory.
General
module IntOps : sig ... endUnified interface for integer types.
module FloatOps : sig ... endUnified interface for floating-point types.
module LazyEval = LazyEvalmodule ResettableLazy = ResettableLazymodule ProcessPool : sig ... endProcess pool for running processes in parallel.
module Timeout : sig ... endTimeout utilities.
module TimeUtil : sig ... endDate and time utilities.
module MessageUtil = MessageUtilmodule XmlUtil = XmlUtilCIL
module CilType = CilTypemodule Cilfacade = Cilfacademodule RichVarinfo = RichVarinfomodule CilCfg : sig ... endCreation of CIL CFGs.
module LoopUnrolling : sig ... endSyntactic loop unrolling.
Library specification
For more precise analysis of C standard library, etc functions, whose definitions are not available, custom specifications can be added.
module AccessKind : sig ... endKinds of memory accesses.
module LibraryDesc : sig ... endLibrary function descriptor (specification).
module LibraryDsl : sig ... endLibrary function descriptor DSL.
module LibraryFunctions : sig ... endHard-coded database of library function specifications.
Analysis-specific
module BaseUtil : sig ... endBasic analysis utilities.
module PrecisionUtil : sig ... endInteger and floating-point option and attribute handling.
module ContextUtil : sig ... endGoblint-specific C attribute handling.
module BaseInvariant : sig ... endAnalyses.Spec.branch refinement for Base analysis.
module CommonPriv : sig ... endThread-modular value analysis utilities for BasePriv and RelationPriv.
module WideningThresholds : sig ... endWidening threshold utilities.
module VectorMatrix : sig ... endOCaml implementations of vectors and matrices.
Precision comparison
module PrecCompare : sig ... endPrecison comparison.
module PrecCompareUtil : sig ... endSignatures for precision comparison.
module PrivPrecCompareUtil : sig ... endBasePriv precison comparison.
Library extensions
OCaml library extensions which are completely independent of Goblint.
See Goblint_std.
Standard library
OCaml standard library extensions which are not provided by Batteries.
module GobFormat = GobFormatOther libraries
External library extensions.
module MyCheck = MyCheck