https://github.com/moosetechnology/carrefour
Binding between Famix and FAST
https://github.com/moosetechnology/carrefour
moose pharo smalltalk
Last synced: 4 months ago
JSON representation
Binding between Famix and FAST
- Host: GitHub
- URL: https://github.com/moosetechnology/carrefour
- Owner: moosetechnology
- License: mit
- Created: 2023-01-31T18:08:43.000Z (over 2 years ago)
- Default Branch: v5
- Last Pushed: 2024-10-24T11:40:56.000Z (7 months ago)
- Last Synced: 2024-10-25T11:00:35.439Z (7 months ago)
- Topics: moose, pharo, smalltalk
- Language: Smalltalk
- Homepage:
- Size: 476 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Carrefour
[](https://github.com/moosetechnology/Moose)
[](https://github.com/moosetechnology/Moose)
[](https://github.com/moosetechnology/Carrefour/actions/workflows/test-moose11.yml)
[](https://github.com/moosetechnology/Carrefour/actions/workflows/test-moose12.yml)
[](https://coveralls.io/github/moosetechnology/Carrefour?branch=v5)Binding between Famix and FAST
## Installation
The last stable version is
```st
Metacello new
githubUser: 'moosetechnology' project: 'Carrefour' commitish: 'v5' path: 'src';
baseline: 'Carrefour';
load
```## Use
Carrefour links entities in a FAST model to entities in a Famix model.
It is composed of 2 parts:
- Carrefour meta-model
- Binder with two main steps involved:
1. Generate the FAST model of a Famix entity (eg. a FamixMethod) with `#getFASTModel`
2. Bind the nodes in the FAST model to entities in the Famix model with `bindFASTModel:`### Carrefour meta-model
Represents relations between Famix entities and FAST entities.
The relations are typically between:
- FamixMethod and FASTBehaviouralEntity
- FamixStructuralEntity and FASTVariableDeclarator, FASTExpression, or FASTAssignement
- FamixInvocation and FASTFunctionCall or FASTMessageSend
Note: *class names are only indicative, they do not really exist in any Famix or FAST meta-model*### Generating the FAST model
Done by a *language dependent* parser.
Each concerned FamixEntity should know how to do it by implementing `#getFASTModel`.
For example in Java, this method is implemented by `FamixJavaMethod` and all the main "structured types" (`FamixJavaClass`, `FamixJavaEnum`, `FamixJavaException`).### Binding
Done by visiting the FAST model (an AST) and looking for corresponding Famix entities to each FAST entity.
It is implemented in `bindFASTModel:`## Developers
### Update tests
To update the tests, you will need to rerun [VerveineJ](https://modularmoose.org/moose-wiki/Developers/Parsers/VerveineJ
) on the testing resources.
This command should produce the .mse file.```sh
cd testing
& 'D:\Path\To\VerveineJ\verveinej.bat' -format json -o testing.json -anchor assoc -autocp './src' './src'
```