4.4 Validating

The IDE checks a project at two depths. While you type, it reads every file and checks it within its context. A validation checks the whole project on top of that, across the files of each context, which takes longer and therefore only happens when you ask for it or start a run.

4.4.1 Checks while you type#

Once the text has not changed for 300 ms, the editor reports what the readers of the languages find: syntax errors, and the checks of each file against the files it depends on, such as a model against its metamodel or the types and events a state machine names. The editor also checks the environment descriptors and the contexts of the folder, see 4.1 Projects. These problems are underlined in the text and listed in the group Local of the Problems tool window, see 4.2.6 Problems.

4.4.2 What a validation adds#

A validation reads the project again and runs the verifier of the language tools over every context. The verifier checks the state machines against the domain metamodel, the event metamodel and the model: whether the paths in actions and conditions exist on the type the state machine is attached to, whether an operation and a value fit what the path leads to, whether the $(...) references in EVAL code resolve, whether the macro calls fit their macros, whether an event and its fields are known in the domain where they are used, and whether every state can be reached. It gets every state machine of a context, the attached ones and the attachable ones, and checks the names of attachable state machines across the files: that no two have the same name, and that the names after behaves after, ATTACH and in EXCHANGE exist and fit the type at that place, see 2.4.6.4 Attachment. A finding about a behaves after lies in the metamodel. While a state machine of the context cannot be read, no name is reported as unknown. Its codes start with project., as in project.unknown-path or project.unreachable-state. 2.4 Checks lists every check with its code and severity.

The verifier also gets every fragment of a context and checks each composition of a state machine with the fragments its container states use, directly or through other fragments, see 2.3.12 Pages and 2.4.6.5 Pages. A fragment that the context does not hold is project.unknown-fragment at the name after USE, a name that is no fragment is project.not-a-fragment, and fragments that use each other are project.fragment-cycle. The other codes of compositions are project.qualified-name-clash, project.conflicting-macros, project.unknown-macro and the warning project.macro-from-other-file. A finding lies in the file whose text it concerns: a path in a state of a fragment that does not exist is reported in the fragment, also when the verifier found it through the state machine that uses it. The rules of container states, final states and DONE within one file are reported while you type, as kstates.container-use or kstates.misplaced-done.

4.4.3 Starting a validation#

ToDo this
Validate the project in the windowClick Validate in the bar below the editor, or choose Run > Validate Project. While it runs, the button reads Validating….
Validate from a terminalRun karpfen-ide validate <folder>, see 4.8 Command line.

4.4.4 The dialog#

The answer is the dialog Validate Project. At the top it gives a summary, such as 2 errors and 1 warning, No problems found. or No errors or warnings. when only infos are left. Below it lists every finding of the project, the problems of the editor and those only the validation found, one row per finding as <file>:<line> <message>, in the colour of its severity. Errors come first, then warnings, then the rest, each sorted by file and line. The rows do not lead to their places. Close is the only button.

4.4.5 The group Global#

After the dialog is closed, what only the validation found stays in the group Global of the Problems tool window. Before the first validation the group reads Global (not validated yet). Validate, Run > Validate Project and every run fill it anew. It keeps its findings while you edit, until the next validation. These findings are not underlined in the text. A double-click on one leads to its place.

4.4.6 Validation before a run#

Every run saves all open files and validates the project first. An error anywhere in the project blocks the run, also in a file that the descriptor does not name, such as a state machine that belongs to no context. The dialog then opens with the title Run Blocked: the Project Has Errors. Warnings and infos do not block a run and open no dialog.

After the validation, the run prepares the deployment and checks what only matters for a run, such as a state machine attached to a key that no object of the model has. Such a problem blocks the run too. The run is then blocked, and the Log pane lists the problem under Findings that block the run, see 4.5.6 A failed run.

Source: this page on GitHub at commit 3b6029f, refreshed 16 November 2026. The whole reference as a PDF.