{"id":19362646,"url":"https://github.com/imdea-software/mclola","last_synced_at":"2026-05-16T09:04:43.029Z","repository":{"id":41311993,"uuid":"472964888","full_name":"imdea-software/McLola","owner":"imdea-software","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-30T14:50:01.000Z","size":1690,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-24T12:50:28.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imdea-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-22T23:01:34.000Z","updated_at":"2022-03-23T03:09:52.000Z","dependencies_parsed_at":"2022-08-19T02:51:33.419Z","dependency_job_id":null,"html_url":"https://github.com/imdea-software/McLola","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imdea-software/McLola","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2FMcLola","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2FMcLola/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2FMcLola/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2FMcLola/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imdea-software","download_url":"https://codeload.github.com/imdea-software/McLola/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2FMcLola/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285035891,"owners_count":27103933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-18T02:00:05.759Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T07:29:48.737Z","updated_at":"2025-11-18T09:03:08.780Z","avatar_url":"https://github.com/imdea-software.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCLola\n\nMCLola is an EDSL written in Haskell that provides:\n\n* A language, called MCLola, to write high level specifications based on Lola [[1]](#1).\n* A mechanism to compile MCLola specifications to C99 files that implement a monitor for the specification.\n\nThis project was developed within a research internship at IMDEA Institute, Madrid, Spain. \u003cbr /\u003e\nStudent: Aldana Ramirez \u003cbr /\u003e\nAdviser: Cesar Sanchez \u003cbr /\u003e\nCollaborators: Martin Ceresa and Felipe Gorostiaga \u003cbr /\u003e\n\n## Installation\n\nTo use MCLola, you need to install required software as specified below. Alternatively, a Dockerfile is provided to simplify the installation process.\n\n### Requirements\n\n1. Install [GHC](https://www.haskell.org/ghc/).\n\n2. Install the following Haskell libraries:\n\n\t* [language-c99](https://hackage.haskell.org/package/language-c99)\n\t* [language-c99-simple](https://hackage.haskell.org/package/language-c99-simple)\n\t* [pretty](https://hackage.haskell.org/package/pretty)\n\t* [compdata](https://hackage.haskell.org/package/compdata-0.12.1)\n\t* [base](https://hackage.haskell.org/package/base)\n\t* [mtl](https://hackage.haskell.org/package/mtl)\n\t* [containers](https://hackage.haskell.org/package/containers)\n\n\n### Dockerfile\n\n1. Download this repo.\n    ```bash\n    git clone https://github.com/imdea-software/McLola.git\n    ```\n\n2. Build the Docker image for the project.\n    ```bash\n    cd McLola/\n    docker build -t mclola .\n    ```\n\n3. Run a container using the image built above.\n    ```bash\n    docker run -it -v \"$(pwd)\":/MCLola --rm mclola bash\n    ```\n    This command also mounts the **MCLola** directory and opens an interactive shell. The -rm option erases the container when its execution finishes.\n\n\n## Usage\n\n1. Write the MCLola specification. \u003cbr /\u003e\nCreate a new file that defines an element `spec :: Specification` and modify file **src/Compile.hs**:\n\t* Import the new file.\n\t* Define `importedSpec` as `spec`.\n\n2. Generate C99 files for the monitor.   \n    Move to the **MCLola/src** directory and open GHCi:  \n    ```bash\n    ghci\n    ``` \n    Load the **Compile.hs** file and evaluate:\n\t* `codegen` to generate C99 files to implement the monitor for the specification.\n\t* `analyse` to generate a txt file with temporal information from the specification.   \n\n    All generated files are stored in the **src/monitor** directory.\n        \n    ```bash\n    :l Compile.hs\n\n    codegen\n    analyse\n    ```\n\n3. Complete the monitor implementation.  \n    Write a **monitor.c** file that defines a `main` function that implements the monitor. To that end, use the `initialise`, `step` and `finish` functions generated by MCLola. \u003cbr /\u003e\n\n4. Compile C99 files and execute the monitor with a given input.\n        \n    ```bash\n    make \u0026\u0026 ./monitor \u003c input.csv \u003e output.txt\n    ```\n\n\n## Examples\n\nThe **src/Example** directory includes several examples. For each example, four files are provided:\n\n * A **.hs** file with the MCLola specification.\n * A **monitor.c** file with the monitor implementation, which uses the files generated by the tool.\n * An **input.csv** file with an example instance for input values.\n * An **output.txt** file with the output generated by the monitor for the instance given by **input.csv**.\n\n\n## References\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e \nB. D'Angelo, S. Sankaranarayanan, C. Sanchez, W. Robinson, B. Finkbeiner, H. B. Sipma, S. Mehrotra, Z. Manna (2005).\nLOLA: runtime monitoring of synchronous systems.\n12th International Symposium on Temporal Representation and Reasoning (TIME'05), pages 166-174.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdea-software%2Fmclola","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimdea-software%2Fmclola","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdea-software%2Fmclola/lists"}