Skip to main content

A library for easy mapping of mathematical specifications.

Project description

MSML

What is the Mathematical Specification Mapping Library (MSML)?

MSML is a library for standardizing the creation of mathematical specifications as JSON objects as well as aiding in the automation of report and visualization creation from these standardized JSON.

It uses block diagram wirings and spaces to represent the actions in complex systems in line with current BlockScience research on Generalized Dynamical Systems. It also adds some enhancements to the primitive blocks to represent richer sets of behaviors.

One good example is the wiring report for the Root Finding Simulation canonical example.

Installing the library

To install the library, simply pip install by running "pip install math_spec_mapping"

Why MSML?

Writing mathematical specifications can be a difficult process, especially when variable names are changed or new mechanisms are introduced. MSML seeks to streamline the process with automations as well as enhance the abilities of static math specs to deliver deeper insights. Because it is automated, one can write specifications at different levels of details or for different purposes.

What are some of the solutions offered?

  • Automation: Automate writing of a specification
  • Standardization: Ensure standardization across teams working to spec out a system
  • Flexibility: Allow for creating views on the fly and in multiple ways depending on what stakeholders find important
  • Trackability: Keep a repository of a JSON file to track changes to the spec with the same enhancements git provides for projects already

How does MSML work?

graph TD
A[JSON Object \n\n Each spec has a repo for tracking changes \n Must conform to the json specification \n Defines all aspects of the spec including blocks, spaces and actions] -->B[MSML Object \n\n JSON file is parsed, with validations and mappings along the way \n Can show different views on the fly]
    B --> C[Report Outputs \n\n Automatically build reports for the full spec or subviews \n Example: all blocks with an effect on variable XYZ]

MSML in the Engineering Lifecycle

The engineering lifecycle as defined and visualized in "Block by Block: Managing Complexity with Model-Based Systems Engineering" is depicted below.

Systems Engineering Diagram

MSML can aid in all five of these phases in different ways.

Ideation and Conceptualization

During ideation phases, users of MSML can leverage the markdown writing tool to begin organizing different thoughts into components. For example, if one were trying to model a system that has multiple currencies, i.e. USD and the Euro, those could be added in as MSML types as they are discovered. The markdown report writing supports wiki-links for use in Obsidian or a similar tool allowing users to iteratively catalog different components they find in their research and ideation.

Requirements and Design

When moving into requirements and design, MSML provides a suite of reports so that presentations to stakeholders can be insightful but tailored to the different audiences. Feedback can be iteratively incorporated into the spec with reports being re-run.

Implementation, Integration, and Testing

In its basic form, a spec from MSML can be used to guide implementations because blocks can be transformed into actual code/functions and spaces act as the parameterizations of those functions. There is also experimental work being done on meta-programming so that MSML could either template simulation models or even be used to hold and write code where applicable for things such as A/B testing.

Operations and Maintenance

Thanks to some of the more advanced features, MSML can be used as an aid for debugging and system validation. The functionality around seeing what parameters effect which blocks directly or downstream indirectly helps developers quickly identify root causes of issues. The linkages between mechanisms and what pieces of state they update allows for developers to quickly see all possible paths to variable changes there are in case something looks amiss.

Governance and Evolution

The ability to fork the repository of an MSML spec as well as the ability to use it for A/B testing with the policy options makes it well suited for iterating on model evolution.

Technical Details

The documentation on the technical details of using the MSML can be found here

Canonical Examples

Dummy/Starter Repository Root Finding Simulation

Comparison of Canonical Example Features

Feature Dummy Root Finding
Action Transmission Channels X X
Stack Block X X
Parallel Block X
Split Block
Boundary Actions X
Control Actions X X
Entities X
Mechanisms X X
Parameters X X
Policies X X
Spaces X X
State X X
Stateful Metrics
State Update Transmission Channels X X
Reports X X

Other Related Repositories

GDS-MSML-cadCAD Repository

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

math_spec_mapping-0.3.2.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

math_spec_mapping-0.3.2-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file math_spec_mapping-0.3.2.tar.gz.

File metadata

  • Download URL: math_spec_mapping-0.3.2.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for math_spec_mapping-0.3.2.tar.gz
Algorithm Hash digest
SHA256 0388bbfdedb1237840e53cb57fd75337ce74079bb4c790053239f19bcc48a2d1
MD5 c38935fa4f40632ff0dfd0dd6a31a9be
BLAKE2b-256 4e3f74861bd58dd5def06d15be6ccd5b1c77a50ca8434694a2917d9c2871573e

See more details on using hashes here.

File details

Details for the file math_spec_mapping-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for math_spec_mapping-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b37462771e12fb727a8c7d920db26133ee3a06cb335732d0fd087f02de4b518f
MD5 90190a2b78db17a3922e19ab4f5ecb8a
BLAKE2b-256 4815d7ed26b34a2056b0d1f2d3bfe9a468fcce758a73a123693b30a3dd6304d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page