Skip to content

tmc-langs/tmc-langs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

108 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMC-langs

Build Status

Coverage Status

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.

Build

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

Test the project with mvn test.

Usage

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.

Programmatically

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

CLI

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

Credits

Original draft of the framework structure mpartel.

The project is part of Software Lab project at the University of Helsinki CS Dept..

Developers

Instructor

Leo Leppänen loezi

Clients

About

TMC language support framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%