SML Buddy is a VSCode extension that helps students to receive instant feedback on their assignments written in Standard ML (SML) by providing counterexamples to their solutions.
It is designed to be used with the SML/NJ compiler.
- Clone the repository.
- Run
npm install
to install the dependencies. - Install the Visual Studio Code Extension Manager by running
npm install -g @vscode/vsce
. - Run
vsce package
to create the.vsix
file.
- Clone the repository.
- Run
npm install
to install the dependencies. - Run
compile-benchmark
to compile the algorithm. - Run
benchmark
to launch a benchmark. - Choose one of the available benchmarks and a submission.
- Download
.vsix
file from repository's artifacts or build it yourself. - Open Visual Studio Code.
- Go to Extensions.
- Click on the three dots in the top right corner.
- Select "Install from VSIX...".
- Choose the
.vsix
file. - Install File Downloader Extension.
- Click on the SML Buddy icon in the Activity Bar.
- Load the assignment file by opening it locally or by providing a URL. All available functions for verification will appear in the sidebar.
- Write your solution in the editor. Verifiable functions will be highlighted using gutter decorations. These decorations reflect status of the verification.
- Click on the run icon next to function name to verify it.
- If counterexample found, the new document will appear that contains verbose explanation about the case. Otherwise, you will be notified that the function is verified.
- The extension tries to find a counterexample in 60-second timeframe. If it fails to do so, it's assumed that your solution is OK, but it is still possible that some complex counterexample exists.
- The extension doesn't support usage of the common library and you have to implement any function that you are using.
- Modules capabilities, expressions sequencing, records, vectors and type aliasing is not supported.
- The extension aims to search for logical errors and not syntax/semantics errors. Verify that your code compiles before searching for counterexamples.