Skip to main content

Micro-SVM

A simple and very basic symbolic virtual machine.

[!IMPORTANT] This is a major piece for an ongoing research project. We are currently working hard on preparing our results for a publication.

Overview

Micro-SVM is a standalone symbolic execution engine designed to:

  • Explore program execution paths.
  • Analyze control flow and state transitions.
  • Validate program specifications against expected behaviors.
  • Detect potential defects (e.g., unhandled exceptions, infinite loops).

This package provides the core symbolic execution engine used in research projects for defect discovery and path validation. It is not a full programming language implementation but rather a tool for analyzing executable specifications.

Supported features

  • A range of primitive types: boolean, int8/16/32/64, integer, real, char, string.
  • Symbolic primitive values.
  • Built-in containers for primitives: array<T>, set<T>, map<K,V>, transform<K,V> (same as map, more limited but sometimes faster).
  • Functions and/or static methods.
  • Java/C#-like reference values (ref<T> for references of known type, plain ref for "opaque" cases).
  • Structures and "classes" (i.e., structures with methods) with multiple inheritance.
  • Handling of abstract methods and virtual calls.
  • Intrinsics for specific operations.
  • Basic library/program specification serialization (JSON).
  • Ability to discover and validate both normal and failing execution paths (see examples).
  • Basic class-based user-defined exception handling (i.e. the usual try-catch-finally triplet and throw).
  • Basic decoding of complex structures (containers and structures/classes) as Python objects (i.e. as a list, a list of pairs or a dictionary).

Installation

pip install micro-svm

Known limitations

  • No function/method overload.
  • No type checks. It is expected for a specification to be validated and type-checked by external tools.
  • Little to no type conversion. The implementation relies heavily on Z3 in that aspect.
  • No support for IEEE floats.
  • Eager function/method execution. For every discovered program path, the machine checks if the whole path can be executed or not. For example, when processing x = parse_bool(input) or panic() or similar expression the panic() call would always be visited unless modelled otherwise in the user specification.
  • Very crude fault handling for certain language- and runtime-specific edge-cases. It is only possible to:
    • not allowing any fault to occur during a path's execution (default),
    • check if they might have happened (i.e., using CompilerContext.get_fault_status/clear_fault_status),
    • ignore faulty operations.
  • Exceptions regarding null-dereferencing, invalid array indexing and alike cannot be raised and caught automatically. It is advised to use CompilerContext.get_fault_status and throw to raise a suitable exception object. Note that get_fault_status is unhelpful unless SymbolicStateMachine.fault_mode is set to STORE.
  • No tools for managing dynamic reflection operations (field access by symbolic name strings, method creation, etc.).

Cite

@software{microsvm2026,
  title={Micro-SVM: A simple symbolic VM in Python and Z3},
  author={Mikhail Onischuck},
  year={2026},
  url={https://github.com/dog-m/micro-svm-engine}
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for micro-svm 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for micro-svm 1.0.8
File Size Uploaded
micro_svm-1.0.8.tar.gz 60.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for micro-svm 1.0.8
File Interpreter ABI Platform
micro_svm-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 120.1 kB

Release files / micro_svm-1.0.8.tar.gz

Download URL micro_svm-1.0.8.tar.gz
Size 60.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d1891c4036be6f441bea0b8383f30b74d3a46859de25d6275499dad71a30e287
BLAKE2b-256 checksum
How to use checksums
e12922eb2fa9b589af02f6010c26fa6563cc2058b76a5023ee703feea5a98b36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / micro_svm-1.0.8-py3-none-any.whl

Download URL micro_svm-1.0.8-py3-none-any.whl
Size 59.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cc46a5b117293f16b159c36cefb0fc64fe4ce90aa14240983b20ec25c4bdcac
BLAKE2b-256 checksum
How to use checksums
f38fbf9b66bac0290119e9a70acd57cbef88e4103e758742ee503b442bb6f27b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page