{"id":20313600,"url":"https://github.com/moosetechnology/metamodel-examples","last_synced_at":"2026-06-05T08:31:40.082Z","repository":{"id":96745710,"uuid":"491823383","full_name":"moosetechnology/Metamodel-Examples","owner":"moosetechnology","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-08T14:56:55.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-04T08:36:44.843Z","etag":null,"topics":["pharo"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moosetechnology.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-13T08:45:00.000Z","updated_at":"2023-06-20T14:19:25.000Z","dependencies_parsed_at":"2023-04-24T19:01:38.433Z","dependency_job_id":null,"html_url":"https://github.com/moosetechnology/Metamodel-Examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moosetechnology/Metamodel-Examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetechnology%2FMetamodel-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetechnology%2FMetamodel-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetechnology%2FMetamodel-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetechnology%2FMetamodel-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moosetechnology","download_url":"https://codeload.github.com/moosetechnology/Metamodel-Examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetechnology%2FMetamodel-Examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33937661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"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":["pharo"],"created_at":"2024-11-14T18:11:57.883Z","updated_at":"2026-06-05T08:31:40.044Z","avatar_url":"https://github.com/moosetechnology.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metamodel-Examples\n\nExamples of metamodel creation.\n\n### To load in a Moose image: \nExecute this in a playgroung: \n```Smalltalk\n[ Metacello new\n   baseline: 'MetamodelExamples';\n   repository: 'github://moosetechnology/Metamodel-Examples:main/src';\n   onConflictUseIncoming;\n   load ]\n   on: Warning do: [ :warning | warning resume ]\n```\n\n## First example: a simple SVN metamodel.\n\nFor this demo, please checkout the dedicated MooseIDE branch: `DM-demo`.\n\n### Build a model\n\nThis script will:\n- generate the svn metamodel\n- parse the source file provided in this repo to load a model\n- install the model into Moose tools\n- show the 10 more active authors\n\n```Smalltalk\n\"Generate the metamodel:\"\nSVNMetamodelGenerator generate.\n\n\"Import model from file:\"\nimporter := SVNVCSImporter runOnResourceFile: 'logLse-bib.txt'.\n\n\"Install model in Moose:\"\nsvnModel := importer model.\nsvnModel name: 'svn'.\nsvnModel metamodel: SVNModel metamodel. \nsvnModel install.\n\n\"Get first 10 authors\"\nauthors := svnModel entities select: [ :e | e class = SVNAuthor ].\n\nfirstAuthors := (authors sort: [ :a :b | a commits size \u003e b commits size ]) first: 10.\n```\nThe 10 first authors:  \n![SVN 01 - Authors](https://user-images.githubusercontent.com/39184695/172640483-19a8aef8-5b5c-4531-b9dd-9fc6e32bb9ea.png)\n\nOpen Moose Models browser: the model is here:  \n![SVN 02 - Models browser](https://user-images.githubusercontent.com/39184695/172641228-3101b8ed-9b4f-40a4-bdf7-0312c425c344.png)\n\n### Explore the model: build a distribution map\n\nWe will show a distribution map of all files in the model.\nThe child entities will be the commits that modified each file.\nWe will tag the commits by author.\n\n#### Child Query\n\n- Inspect the model in Moose and propagate all model files.  \n![SVN 03 - Inspector](https://user-images.githubusercontent.com/39184695/172643416-42dd75dc-4138-4237-b94c-a6807cde78f3.png)  \n- Open a Queries browser.  \n- Build a relation query on commits. You should get 1250 commits.\n\n#### Queries for intent tags\n\n- From the inspector, propagate all model commits.  \n- In the Queries browser, build the queries as shown in the image below:\n  - 1 relation query on authors (Q2 in the image)\n  - As children of Q2, 10 string queries: name = *Author name*. Where author names are the names of the 10 most active authors.\n\n![SVN 04 - Queries](https://user-images.githubusercontent.com/39184695/172648941-fa9f4849-7619-4cf8-9ce6-4467f8fa5785.png)\n\n#### Intent tags\n\nOpen the tag browser and create 10 intent tags, 1 for each author:\n![SVN 05 - Intent tag](https://user-images.githubusercontent.com/39184695/172645407-007bdf85-0f80-4692-8c50-ffc6976062ba.png)\n\n#### Distribution map\n\n- Open the Distribution map browser. Be sure the last entities you propagated were the model files.  \n- Choose the first query you created as Child query  \n- Add the tags you created  \n- Apply  \n\n![SVN 06 - Distribution map](https://user-images.githubusercontent.com/39184695/172647445-bce90dec-a5f3-4c7d-8907-c0bb0c1cdb86.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoosetechnology%2Fmetamodel-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoosetechnology%2Fmetamodel-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoosetechnology%2Fmetamodel-examples/lists"}