Code Monkey home page Code Monkey logo

fm-playground's Introduction

FM Playground

FM Playground GitHub Repository size GitHub issues GitHub License

FM Playground

A Formal Method playground for limboole, z3, nuXmv, Alloy, and Spectra. This project is a part of the Formal Methods course at the Bauhaus-Universität Weimar. It is a web application that allows users to run formal methods tools in the browser.

Requirements

  • Python >= 3.9.0
  • Node >= 18.0.0
  • PostgreSQL >= 15.0
  • Docker >= 20.10.0 (optional)
  • Docker Compose >= 1.27.0 (optional)

Getting Started

Installation

Docker

Docker Compose

  • Copy the .env.example file to .env and update the environment variables as needed:
cp .env.example .env
  • Run the following command:
docker-compose up -d
version: '3'
services:
  frontend:
    build: 
      context: ./frontend
      args:
        VITE_FMP_API_URL: http://localhost:8000/api
    container_name: fmp-frontend
    env_file:
      - .env
    ports:
      - "5173:5173"
    networks:
      - my_network
    restart: unless-stopped
  
  backend:
    build: 
      context: ./backend
    container_name: fmp-backend
    env_file:
      - .env
    ports:
      - "8000:8000"
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - my_network
    restart: unless-stopped
  
  postgres:
    image: postgres:15.4
    container_name: fmp-db
    environment:
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_DB: ${DB_NAME}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5
    env_file:
          - .env
    networks:
      - my_network
    restart: unless-stopped
  
  alloy-api:
    build:
      context: ./alloy-api
    container_name: fmp-alloy-api
    ports:
      - "8080:8080"
    networks:
      - my_network
    restart: unless-stopped
  

volumes:
  postgres_data:

networks:
  my_network:
    driver: bridge

Contributing

Contributions are welcome! Please refer to the contributing guidelines for detailed instructions.

License

This project is licensed under the MIT License.

Third-Party Licenses

fm-playground's People

Contributors

soaibsafi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fm-playground's Issues

Alloy's subset singnature indication missing in instances

Alloy usually shows subset signatures in the visualizer as a text right under the signature name. This is missing in the visualization generated by the playground.

Here is an example of the river crossing, where subset signatures are indicating the side that each object is on:
https://play.formal-methods.net/?check=ALS&p=flip-ashes-snide-joyous

This is what the visualizer in Alloy shows (theme applied to highlight different sides):
grafik

This is what the playground shows:
grafik

Note that Alloy shows the current and next step whereas the playground only shows one step, but this is not an issue here.

unexpected behavior on last instance of temporal Alloy models

When iterating through Alloy instances, once reaching the last instance:

  • the last instance remains for inspection
  • the button "Next instance" disappears

This behavior doesn't seem to work with temporal models:

  • the last instance remains, but the buttons to traverse the trace do not work (these should still work - bug)
  • the layout changes because the button "Next instance" disappears (it should remain stable, i.e., the trace navigation should be right aligned)

Example: https://play.formal-methods.net/?check=ALS&p=fervor-cried-whoops-spotty

An alternative to fix the layout issue could be to always (temporal and non-temporal) only disable the "Next instance" button instead of removing it.

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.