A representer creates a general representation of a submission, in order to automatically give feedback on similar code.
This repository contains the F# representer, which implements the representer interface. It uses F# Compiler Services to parse the submission's source code into syntax trees, which are then normalized and output as a representation.
To create a representation of a solution, follow these steps:
- Open a command prompt in the root directory.
- Run
./bin/run.sh <exercise> <input-directory> <output-directory>
. This script will generate a representation for the solution found in<input-directory>
. - Once the script has completed, the representation will be written to
<output-directory>/representation.txt
.
To generate a representation for a solution using a Docker container, follow these steps:
- Open a command prompt in the root directory.
- Run
./bin/run-in-docker.sh <exercise> <input-directory> <output-directory>
. This script will:- Build the representer Docker image (if necessary).
- Run the representer Docker image (as a container), passing the specified
exercise
,input-directory
andoutput-directory
arguments.
- Once the script has completed, the representation can be found at
<output-directory>/representation.txt
.