Code Monkey home page Code Monkey logo

sd-visualiser

String diagram visualiser for programs with semantics in closed monoidal categories.

Visualising string diagrams

sd-visualiser is an interactive tool to visualise string diagrams, based on idea that string diagrams encoded as hierarchical hypergraphs, representing terms in a closed monoidal category, provide a foundation for building programming languages, building on the work of 1 2.

A toy language, sd language, is defined in a similar vein to the spartan language 3, and is used to define programs which can be represented as string diagrams. sd-visualiser provides a playground to experiment with the sd language, and to visualise and interact with the corresponding string diagram.

sd-visualiser also supports LLVM MLIR 4, and can be used to visualise MLIR programs as string diagrams.

Screenshots

factorial in sd lang sd-visualiser running in the web browser at https://sd-visualiser.github.io/sd-visualiser/

MLIR simple example MLIR simple example

Using the precompiled binaries

Web

Please go to https://sd-visualiser.github.io/sd-visualiser/ to use the web version of the visualiser. Minor features such as SVG export and fast layout are not available in the web version.

Linux (Ubuntu)

sudo apt install coinor-libcbc3 libgtk-3-dev

References

1 D. R. Ghica, K. Muroya, and T. W. Ambridge, ‘A robust graph-based approach to observational equivalence’. arXiv, Sep. 23, 2021. doi: 10.48550/arXiv.1907.01257.

2 D. Ghica and F. Zanasi, ‘String Diagrams for $\lambda$-calculi and Functional Computation’. arXiv, Oct. 19, 2023. doi: 10.48550/arXiv.2305.18945.

3 T. W. Ambridge, ‘Sᴘᴀʀᴛᴀɴ Visualiser’, Spartan Visualiser. https://tnttodda.github.io/Spartan-Visualiser/.

4 C. Lattner et al., ‘MLIR: Scaling Compiler Infrastructure for Domain Specific Computation’, in 2021 IEEE/ACM International Symposium on Code Generation and Optimization (CGO), Feb. 2021, pp. 2–14. doi: 10.1109/CGO51591.2021.9370308.

sd-visualiser's Projects

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.