gactar-vscode is a plugin for VS Code for working with gactar's amod files.
It implements syntax highlighting, provides snippets to quickly create an amod file or add productions, and allows you to run gactar directly through VS Code.
In order to run amod files, gactar needs to be installed and you will need to add the path to the installation in your VS Code gactar settings (see "Installation Folder" in the Configuration section below).
Provides syntax highlighting for .amod files.
Provides snippets when editing amod files:
-
Typing amod will show a snippet to Insert basic amod template (full file). This will fill in a complete, empty amod file.
-
Type prod will show a snippet to Insert blank amod Production. This will add an empty production like this:
<cursor here> { description: '' match { goal [] } do { } }
Prefix | Name |
---|---|
amod | Insert basic amod template (full file) |
~~m | Insert amod model section |
~~c | Insert amod config section |
~~i | Insert amod init section |
~~p | Insert amod productions section |
prod | Insert blank amod Production |
If you have gactar installed, you can point VS Code at your installation and run your amod files through gactar from VS Code. You can access the command through VS Code's Command Palette:
If an example is selected in the editor, it will be used as the initial goal.
The results will show up in VSCode's Output Panel.
If you need to restart the gactar server, you can run the command gactar: Restart Server
.
After running amod files, any errors will be reported in the Problems Panel and they will be highlighted in the code.
You can set your configuration using the VS Code Settings window:
Or you can set them directly in your settings.json
file:
"gactar.installationFolder"
(required to run gactar) - Path to your gactar installation (folder containing the gactar executable)."gactar.framework"
- Which framework to run. Allowed:ccm
,pyactr
,vanilla
, orall
."gactar.intermediateFolder"
- Path to store intermediate files (the generated code for each framework) when running models. If empty, it will create a folder called 'gactar-temp' in your gactar installation.
I wrote up a technical note about gactar which includes more information about the amod format. It may be found on ResearchGate.
Title: gactar: A Tool For Exploring ACT-R Modelling