Framework for supporting different programming languages in TMC.
TMC-langs provides an Java interface that encapsulates everything needed to support a new language in TMC. The framework provides CLI wrappers so that it's fairly convenient to call from other languages like Ruby.
Note that all the mvn commands should be ran in the projects root directory.
Build the project with mvn clean package. Install the dependency to your local Maven repository with mvn clean install.
Test the project with mvn test.
Add the dependencies to your project’s pom.xml.
<dependency>
<groupId>fi.helsinki.cs.tmc</groupId>
<artifactId>tmc-langs-framework</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fi.helsinki.cs.tmc</groupId>
<artifactId>tmc-langs-util</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>fi.helsinki.cs.tmc</groupId>
<artifactId>tmc-langs-ant</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>TMC-langs can be invoked programmatically or by running the software from the command-line.
Create a TaskExecutorImpl and call the required task of TaskExecutor. TaskExecutor will take care of detecting the provided projects language, if TMC-langs cannot recognize the project as a supported language NoLanguagePluginFound exception will be thrown.
TaskExecutor taskExecutor = new TaskExecutorImpl();
RunResult runResult = taskExecutor.runTests(projectInfo.getProjectDirAsPath());Supported tasks and their return types and parameters can be read from TaskExecutor
Running tasks from the command-line can be accomplished by passing the required task with projects directory path and in some tasks the output file path.
java -cp tmc-langs-util-1.0-SNAPSHOT.jar fi.helsinki.cs.tmc.langs.util.Main run-tests test_projects/arith_funcs results.txt
Original draft of the framework structure mpartel.
The project is part of Software Lab project at the University of Helsinki CS Dept..
- Ville Heikkinen zzats
- Joel Järvinen PunyW
- Aleksi Paavola AlePaa
- Joakim Store Tahantos
- Jasu Viding jviding
Leo Leppänen loezi