Skip to content

Latest commit

 

History

History
106 lines (72 loc) · 1.48 KB

File metadata and controls

106 lines (72 loc) · 1.48 KB

Contributing to Stainless

Stainless cheat sheet

Debug Stainless (JVM)


sbt -jvm-debug <port>

VS Code / Metals Debug Attach

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "scala",
      "request": "attach",
      "name": "Scala-attach-5005",
      "buildTarget": "root",
      "hostName": "localhost",
      "port": 5005
    }
  ]
}

Print Scala Compiler Trees

scala -Vprint:posttyper File.scala

Run Stainless from sbt (Development)

sbt
stainless-dotty / run /absolute/path/to/file.scala

Run Integration Tests single suite

Example for stainless.DottyExtractionSuite

sbt -batch \
  -Dtestsuite-parallelism=3 \
  -Dtestcase-parallelism=5 \
  "stainless-dotty / IntegrationTest / testOnly stainless.DottyExtractionSuite"

Run Main of a Stainless project with sbt plugin

This command is used to run the main class of a project verified with stainless when using the stainless sbt plugin.

runMain your.package.Main

Build Stainless sbt Plugin

Run this script to build the sbt plugin

./bin/package-sbt-plugin.sh

Scala → JVM Bytecode Inspection

scalac File.scala
javap -c -l -private *.class

Print Dotty Trees that stainless receives

scalac -Xprint:typer File.scala

Run Stainless with Explicit JVM Options

sbt -J-Xmx8G stainless-dotty / run /absolute/path/to/file.scala