package mopsa

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

Install

Dune Dependency

Authors

Maintainers

Sources

mopsa-analyzer-v1.0.tar.gz
md5=9f673f79708b44a7effb3b6bb3618d2c
sha512=cb91cb428e43a22f1abbcb8219710d0c10a5b3756d0da392d4084b3b3a6157350776c596983e63def344f617d39964e91f244f60c07958695ee5c8c809a9f0f4

doc/ast/Ast/Typ/index.html

Module Ast.TypSource

Types

This modules allows extending Mopsa with new types. This is done by extending the type typ with new variants. For example

  type typ += T_int

extends Mopsa types with a new integer type. Registration is performed with

  let () = register_typ {
      compare = (fun next -> next);
      print = (fun next -> function
          | T_int -> Format.pp_print_string fmt "int"
          | t    -> next fmt t
        );
    }

Note that is this simple example where the type doesn't have an inner structure no comparison function is required as Stdlib.compare is sufficient to provide a total order.

Sourcetype typ = ..

Extensible types

Sourceval compare_typ : typ -> typ -> int

Compare two types

Sourceval pp_typ : Stdlib.Format.formatter -> typ -> unit

Pretty-print a type

Registration

Sourceval register_typ : typ Mopsa_utils.TypeExt.info -> unit

Register a new type

Sourceval register_typ_compare : typ Mopsa_utils.TypeExt.compare -> unit

Register a new type comparison

Sourceval register_typ_pp : typ Mopsa_utils.TypeExt.print -> unit

Register a new type pretty-printer

Common types

Sourcetype typ +=
  1. | T_any
    (*

    Generic unknown type

    *)
  2. | T_addr
    (*

    Heap addresses type

    *)
OCaml

Innovation. Community. Security.