# utwente-fmt/ltsmin architecture

> Architecture diagram of the GitHub repository utwente-fmt/ltsmin, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/utwente-fmt/ltsmin
- Repository: https://github.com/utwente-fmt/ltsmin

## Overview

##### Main Components Structure

a) Language Front-ends (Top Layer):
- Them to the PINS interface below

b) PINS Interface (Middle Layer):
- Sub-components for:
- State Vector Management
- Dependency Matrix
- Next-State Functions
- Type System

c) PINS2PINS Wrappers (Middle Layer):
- Horizontally after PINS interface
- Transition Caching
- Matrix Regrouping
- Partial Order Reduction
- LTL Layer

d) Algorithmic Backends (Bottom Layer):
Create four main sections for:
- Symbolic Model Checking (BDD/MDD-based)
- Multi-core LTL Checking
- Sequential LTL Checking
- Distributed LTS Operations

##### Supporting Libraries

- Sylvan (parallel BDD package)
- CZMQ (for ProB)
- MPI (for distributed operations)
- BuDDy/BDDX
- SDD

##### Key Features to Highlight

Create callouts or annotations for:
- State vector compression
- Parallel operations
- Distributed processing capabilities
- Cache mechanisms
- Verification algorithms

##### Detailed Elements

Specific technical details:
- State space representation
- Vector set operations
- Transition caching
- Matrix operations
- Verification algorithms

##### Implementation Details

Implementation aspects:
- Thread management
- Memory handling
- I/O operations
- Inter-process communication

##### Optimization Layers

Optimization mechanisms:
- Caching strategies
- Parallel processing
- Memory management
- State compression

- Language independence through PINS
- Reusable algorithms across different input languages
- Scalable verification through various backends
- Flexible optimization through PINS2PINS wrappers

## Diagram (Mermaid)

```mermaid
graph TB
    %% Language Front-ends Layer
    subgraph Frontend
        mCRL2["mCRL2"]
        PNML["PNML"]
        ProB["ProB"]
        SPIN["SPIN/Promela"]
        DVE["DiVinE/DVE"]
        ETF["ETF"]
    end

    %% PINS Interface Layer
    subgraph PINS
        PINSCore["PINS Core Interface"]:::core
        StateVector["State Vector Management"]
        DepMatrix["Dependency Matrix"]
        NextState["Next-State Functions"]
        TypeSystem["Type System"]
    end

    %% PINS2PINS Wrappers Layer
    subgraph Wrappers
        Cache["Transition Caching"]
        Group["Matrix Regrouping"]
        Guards["Guards"]
        LTLLayer["LTL Layer"]
        POR["Partial Order Reduction"]
    end

    %% Algorithmic Backends Layer
    subgraph Backends
        direction TB
        SymbolicMC["Symbolic Model Checking"]
        MultiCoreLTL["Multi-core LTL Checking"]
        SeqLTL["Sequential LTL Checking"]
        DistLTS["Distributed LTS Operations"]
    end

    %% Core Algorithms
    subgraph Algorithms
        BFS["BFS Algorithm"]
        Reach["Reachability"]
        NDFS["Nested DFS"]
        CNDFS["Concurrent NDFS"]
        Tarjan["Tarjan SCC"]
    end

    %% Supporting Libraries
    subgraph Libraries
        VectorSets["Vector Sets"]
        BitSets["Bit Sets"]
        HashFuncs["Hash Functions"]
    end

    %% Connections
    mCRL2 & PNML & ProB & SPIN & DVE & ETF --> PINSCore
    PINSCore --> StateVector & DepMatrix & NextState & TypeSystem
    PINSCore --> Cache & Group & Guards & LTLLayer & POR
    Cache & Group & Guards & LTLLayer & POR --> SymbolicMC & MultiCoreLTL & SeqLTL & DistLTS
    SymbolicMC & MultiCoreLTL & SeqLTL & DistLTS --> BFS & Reach & NDFS & CNDFS & Tarjan
    VectorSets & BitSets & HashFuncs -.-> PINSCore

    %% Click Events
    click mCRL2 "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/mcrl2-pins.cpp"
    click PNML "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/pnml-pins.c"
    click ProB "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/prob-pins.c"
    click SPIN "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/prom-pins.c"
    click DVE "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/dve-pins.c"
    click ETF "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/modules/etf-pins.c"
    click PINSCore "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/pins.c"
    click Cache "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/pins2pins-cache.c"
    click Group "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/pins2pins-group.c"
    click Guards "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/pins2pins-guards.c"
    click LTLLayer "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/pins2pins-ltl.c"
    click POR "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins-lib/por/pins2pins-por.c"
    click SymbolicMC "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-sym/pins2lts-sym.c"
    click MultiCoreLTL "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-mc/pins2lts-mc.c"
    click SeqLTL "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-seq/pins2lts-seq.c"
    click DistLTS "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-dist/pins2lts-dist.c"
    click BFS "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-sym/alg/bfs.c"
    click Reach "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-sym/alg/reach.c"
    click NDFS "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-mc/algorithm/ndfs.c"
    click CNDFS "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-mc/algorithm/cndfs.c"
    click Tarjan "https://github.com/utwente-fmt/ltsmin/blob/master/src/pins2lts-mc/algorithm/tarjan-scc.c"
    click VectorSets "https://github.com/utwente-fmt/ltsmin/blob/master/src/vset-lib/vector_set.c"
    click BitSets "https://github.com/utwente-fmt/ltsmin/blob/master/src/util-lib/bitset.c"
    click HashFuncs "https://github.com/utwente-fmt/ltsmin/blob/master/src/util-lib/fast_hash.c"

    %% Styles
    classDef core fill:#f9f,stroke:#333,stroke-width:2px
    classDef default fill:#fff,stroke:#333,stroke-width:1px

    %% Legend
    subgraph Legend
        L1[Frontend Languages]
        L2[Core Components]:::core
        L3[Supporting Libraries]
        L4["--> Direct Connection"]
        L5["-.-> Optional Connection"]
    end
```
