Lab 1(a): Setting up Spoofax

Project Set-up
September 07, 2021

For the course project and for some of the homework assignments we will use the Spoofax Language Workbench version Spoofax 3.

Installing Spoofax

Follow the tutorial on installing Spoofax3.

Language Projects

In Spoofax you develop a programming language in a ‘language project’.

Follow the tutorial on Creating a language project to create a project with syntax and syntax tests.

ChocoPy Project

Create a Spoofax project for the ChocoPy language. Configure your project to use the Chocopy name and cpy identifier, and place it in the root of your repository. See the image below for an example.

Your project can be located in either student-<yournetid>/chocopy.syntax or student-<yournetid>/chocopy. If you place your project in a nested folder, or in a differently named folder, the grader will automatically reject your submission.

Updating Spoofax

During the course of the project, bugfixes and new features may be added to Spoofax 3. The grader will always test your project using the most recent version of Spoofax 3 that is backwards compatible with the initial project version (0.11.6).

To update your local installation to the newest version of Spoofax 3, launch Eclipse and select Help from the top menu, followed by Install new software.

In the dialog that opens, enter the release URL of the latest Spoofax 3 release in the Work with: field. This URL starts with https://artifacts.metaborg.org and can be found on the Spoofax 3 releases page. After entering the URL, hit enter to load all available packages for that release, then select the Spoofax package.

Finally, hit next, accept the license if needed, and confirm the install. During installation, Eclipse may prompt that the package is unsigned. When this happens, select Install anyway.

Then, restart Eclipse. After Eclipse has restarted, clean your ChocoPy language project by selecting it in the Package Explorer, choosing Project -> Clean from the main menu, and by pressing Clean. After the project is cleaned, build it once and continue.

References