package mopsa

  1. Overview
  2. Docs
MOPSA: A Modular and Open Platform for Static Analysis using Abstract Interpretation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mopsa-analyzer-v1.2.tar.gz
md5=37966e98ffeebcedc09bd6e9b2b81f69
sha512=40d4d826c25f680766c07eccbabdf5e8a4fa023016e8a164e4e4f6b3781c8484dc4df437055721dfd19b9db8fb7fe3b61236c4833186d346fc7204a68d01eaaa

doc/mopsa.mopsa_analyzer/Mopsa_analyzer/Languages/C/Memory/Aggregates/Domain/index.html

Module Aggregates.Domain

Domain header

================

include sig ... end
val id : unit Mopsa_analyzer__Framework__Core__Id.id
val name : string
val debug : ('a, Format.formatter, unit, unit) format4 -> 'a
val dependencies : 'a list
val checks : 'a list

Command-line options

========================

val opt_init_memset_threshold : int ref

Size threshold (in bytes) for using memset to initialize memory blocks instead of a sequence of assignments

Initialization procedure

============================

val init : 'a -> 'b -> 'c -> 'd option

Syntactic simplifications

=============================

ai -> *(a + i)

val mk_lowlevel_field_address : MopsaLib.expr -> int -> MopsaLib.typ -> Mopsa_utils.Core.Location.range -> MopsaLib.expr

𝔼⟦ &(p->f) ⟧ -> ( typeof(p->f)* )(( char* )p + alignof(p->f))

val pp_record_field : Format.formatter -> Lang.Ast.c_record_field -> unit
val pp_record_fields : Format.formatter -> Lang.Ast.c_record_field list -> unit
val locate_bitfield_cell : Lang.Ast.c_record_field -> MopsaLib.typ -> 'a Mopsa_analyzer.MopsaLib.Flow.flow -> int * int * MopsaLib.typ

Transform an access to a bitfield into an access to the container scalar with appropriate bitwise operations

𝔼⟦ p->f ⟧ -> *(( typeof(p->f)* )(( char* )p + alignof(p->f)))

s.f -> *(( typeof(s.f)* )(( char* )(&s) + alignof(s.f)))

Abstract transformers

=========================

val are_all_bitfields_of_same_cell_initialized : 'a option list -> Lang.Ast.c_record_field list -> 'b Mopsa_analyzer.MopsaLib.Flow.flow -> bool

The following functions flatten the initialization expression into a list of scalar initializations

𝕊⟦ type v = init; ⟧

𝕊⟦ lval = rval; ⟧ when lval is a struct

val exec : MopsaLib.stmt -> ('a, 'b) MopsaLib.man -> 'a Core.Flow.flow -> ('a, unit) Core.Cases.cases option

Abstract evaluations

========================

𝔼⟦ s.f ⟧ -> *(( typeof(s.f)* )(( char* )(&s) + alignof(s.f)))

𝔼⟦ p->f ⟧ -> *(( typeof(p->f)* )(( char* )p + alignof(p->f)))

𝔼⟦ &(ai) ⟧ = a + i

val address_of_arrow_access : MopsaLib.expr -> int -> 'a -> MopsaLib.typ -> Mopsa_utils.Core.Location.range -> MopsaLib.expr

𝔼⟦ &(p->f) ⟧ = ( typeof(p->f)* )(( char* )p + alignof(p->f))

val eval : MopsaLib.expr -> ('a, 'b) MopsaLib.man -> 'a Core.Flow.flow -> 'a Framework.Core.Eval.eval option
val ask : 'a -> 'b -> 'c -> 'd option

Pretty printer

******************

val print_expr : 'a -> 'b -> 'c -> 'd -> unit