clair

C Language Analysis in Rascal

https://github.com/usethesource/clair

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 11 committers (9.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

C Language Analysis in Rascal

Basic Info
  • Host: GitHub
  • Owner: usethesource
  • License: bsd-2-clause
  • Language: Java
  • Default Branch: main
  • Size: 1.14 MB
Statistics
  • Stars: 26
  • Watchers: 9
  • Forks: 13
  • Open Issues: 29
  • Releases: 6
Created over 9 years ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.md

ClaiR - C Language Analysis in Rascal

ClaiR provides a mapping from the Eclipse CDT open C and C++ front-end to a Rascal M3 model for further processing. It can work with and without working from inside the Eclipse IDE.

DOI

Required software

You need Rascal, and either Eclipse or VScode or the standalone Rascal jar: * Eclipse 2019-06 or higher with or without the CDT tools (see here). With the CDT tools you have some more tools to access information from CPP projects (like include paths), but otherwise Clair functions the same. * In Eclipse, install the Rascal plugin from the update site: https://update.rascal-mpl.org/stable/ * Or: VScode with the Rascal extension * Use the extension view in VScode to install Rascal * Or: the Rascal commandline (see here)

How to use ClaiR once you have Rascal installed:

  • Create an empty project "myproject" in a folder named "myproject" using the newRascalProject function from util::Reflective.
  • In pom.xml add: <dependency> <groupId>org.rascalmpl</groupId> <artifactId>clair</artifactId> <version>0.6.2</version> </dependency>
  • In META-INF/RASCAL.MF add: Require-libraries: |lib://clair|
  • And (optionally) add in pom.xml this to be able to run mvn rascal:console and the Rascal compiler: ``` org.rascalmpl rascal-maven-plugin 0.7.3 ${project.build.outputDirectory} ${project.basedir}/src rascal-compile compile compile rascal-package pre-package package

`` * note to skip running the Rascal compiler:mvn compile -Drascal.compile.skip`

How to run

  • On the commandline, in your own project, run mvn rascal:console, or
  • In Eclipse's Project Explorer, right click a project's folder and select Rascal Console. The console should open inside Eclipse's terminal window with the title "Rascal [project: , mode: debug]". If, instead, it shows "project: none", make sure you clicked the project and the project is actually open.
  • Or in VScode start a Rascal terminal from the command pallette while having an editor for a Rascal module of your project open, or from the "Import in new Rascal terminal" action in a Rascal editor.
  • Import ClaiR into the console by running import lang::cpp::AST;.
  • To parse a string containing source code, call the parseString function, e.g., parseString("int foo() { return 0; }").
  • To parse source files on disk, call the parseCpp function with a source location, e.g., parseCpp(|file:///tmp/example.cpp|), parseCpp(|project://clair/src/test/test.cpp|), parseCpp(|home://myFile.cpp|), or parseCpp(|file://C:/My%20Dir/main.cpp|).

Owner

  • Name: Use The Source
  • Login: usethesource
  • Kind: organization
  • Email: jurgen.vinju@cwi.nl

Open Source Projects around Meta Programming

Citation (CITATION.md)

See https://zenodo.org/badge/latestdoi/67205774

Rodin Aarssen. (2017, September 14). cwi-swat/clair: v0.1.0. 
Zenodo. http://doi.org/10.5281/zenodo.891122

```bibtex
@article{rodin_aarssen_2017, 
  title={cwi-swat/clair: v0.1.0}, 
  DOI={10.5281/zenodo.891122}, 
  abstractNote={First release of clair: C Language Analysis in Rascal},
  publisher={Zenodo}, 
  author={Rodin Aarssen}, 
  year={2017}, 
  month={Sep}
}
```

GitHub Events

Total
  • Release event: 1
  • Watch event: 2
  • Delete event: 2
  • Push event: 10
  • Pull request event: 7
  • Fork event: 2
  • Create event: 9
Last Year
  • Release event: 1
  • Watch event: 2
  • Delete event: 2
  • Push event: 10
  • Pull request event: 7
  • Fork event: 2
  • Create event: 9

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 1,038
  • Total Committers: 11
  • Avg Commits per committer: 94.364
  • Development Distribution Score (DDS): 0.295
Past Year
  • Commits: 20
  • Committers: 3
  • Avg Commits per committer: 6.667
  • Development Distribution Score (DDS): 0.6
Top Committers
Name Email Commits
Rodin Aarssen r****n@c****l 732
Jurgen J. Vinju J****u@c****l 280
Davy Landman d****n@s****g 9
Linus Wagner l****r@m****e 7
Jouke Stoel j****l@g****m 2
Ruichen Hu r****2@s****l 2
new account a****n@k****l 2
Lucas n****a@g****m 1
Omar Duhaiby 3****z@g****m 1
koenvanwijk k****k 1
Aarssen r****n@p****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 131
  • Total pull requests: 44
  • Average time to close issues: 2 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 14
  • Total pull request authors: 9
  • Average comments per issue: 2.53
  • Average comments per pull request: 0.61
  • Merged pull requests: 39
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 16 minutes
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jurgenvinju (27)
  • linuswagner (11)
  • rodinaarssen (9)
  • bsddemon (7)
  • matteasu (3)
  • grmbl99 (2)
  • ersitan (1)
  • MarieNyst (1)
  • zborowa (1)
  • nunezmarco (1)
  • NemuruYama (1)
  • pvstralen (1)
  • jmerle (1)
Pull Request Authors
  • DavyLandman (6)
  • jurgenvinju (6)
  • linuswagner (4)
  • rodinaarssen (4)
  • ruichen-ing (2)
  • koenvanwijk (2)
  • NemuruYama (2)
  • t-liu93 (1)
  • omarzd (1)
Top Labels
Issue Labels
bug (6) enhancement (2) help wanted (1)
Pull Request Labels

Dependencies

.github/workflows/build.yaml actions
  • SWAT-engineering/maven-full-artifacts-action v1 composite
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-java v1 composite
  • softprops/action-gh-release v1 composite
  • usethesource/releases-maven-action v1 composite
pom.xml maven
  • org.rascalmpl:rascal 0.27.2 compile
  • org.rascalmpl:rascal-cdt-repackaged 0.2.0 compile