A short offline guide · optional desktop editor and compiler
Every tab edits a section of the same .ting source. Save writes that one file. Compile creates a separate .tingir program beside it.
Knowledge and Decisions are optional. Leave them empty until you need them. Each editing box omits its outer section heading and removes the outer two-space indentation. The IDE restores both when it saves.
| Control | What to enter |
|---|---|
| Module name | A stable name such as my_program or equipment.inspection. Use ASCII letters, digits and underscores; identifiers cannot start with a digit. |
| Version | Three numbers, such as 1.0.0. This is your module’s version. |
| Build as | Program for a complete reasoning plan; Library for reusable exported declarations; Tests only for a module that can be checked and tested but cannot be compiled for deployment. |
| Libraries | Map imported module names to source files and edit imports or exports. Most single-file programs do not need this. |
The summary counts the document’s declarations. It is not a validation result. Use Full source to add documentation: paragraphs, comments or explicit language features.
Choose Fact types, Output types or Classifications in the drop-down. Define each type once. Every field is required and its value must have the declared type.
Example for the Fact types box:
schema Item: name: text required ready: boolean required
Example for the Output types box:
conclusion ReadyItem: name: text required
Supported scalar names are text, integer, float, boolean, bytes and null. A union can be written text | null required. Array syntax requires requires feature arrays in Full source; consult the bundled language manual.
Classifications are optional. For an existing Item fact type, class Ready applies_to Item declares a classification. Membership must be established explicitly; an Item is not automatically Ready. The IDE enables the classifications feature when this box gains a declaration.
Use this tab for fixed facts, such as reference thresholds. These are immutable seeds: editing them requires recompiling and starting a new engine.
seed example_item: Item: name: "fixed example" ready: true
The fact type must exist in Data or be imported. Every field must be supplied. The IDE adds the seed-facts feature when needed. Tests use this knowledge only when they explicitly include given seed.
Each rule has a unique name, a when block and a then block. A binding captures a field value; use refers to that binding later.
rule recognize_ready_item:
when:
match Item:
name: bind name
ready: true
then:
conclude ReadyItem:
name: use name
This rule reports each ready Item by name. Use derive FactType: to produce another fact for further reasoning, or conclude OutputType: to report a typed result. All output fields must be present.
Insert example inserts editable syntax and gives its declaration a distinct name. It does not infer your data model. Adjust the referenced types and fields. Use Check to find incorrect references before running tests.
This tab is optional. It stores a decision request with a goal, candidate list, requirements and an evidence conclusion. Ordinary rules produce the supporting or opposing evidence.
decision ChooseItem: goal: "choose_item" candidates: ["first", "second"] requirements: ["ready"] evidence: Evidence closed: true policy: "unique-feasible-v1"
The corresponding Output type must be:
conclusion Evidence: goal: text required candidate: text required requirement: text required satisfied: boolean required reason: text required
Write rules that conclude Evidence for the named goal, candidate and requirement. satisfied supplies supporting or opposing evidence; reason records a reason code. Set closed: true only when the candidate domain is intentionally complete. Missing evidence does not prove a requirement is satisfied.
The IDE enables the decisions feature when needed. The compiled request is retrieved and assessed through Ting’s runtime API; Compile does not by itself choose a winner. See the separate offline language manual for complete decision examples and the meaning of selected, tied, missing, conflicting and incomplete outcomes.
Each test starts in a fresh session. Supply facts under given and expected conclusions under expect. The expected collection must match exactly. firings is an optional exact rule-firing count.
test ready_item_is_reported:
given:
fact Item:
name: "example"
ready: true
expect:
conclusion ReadyItem:
name: "example"
firings: 1
For a negative case, use ready: false, an empty expect: block and firings: 0. Add a standalone given seed before given: when the test should include fixed Knowledge. Test fixtures are not deployed as live input facts.
Test runs the root file’s tests. Compile runs them before publication. Imported providers’ tests are not automatically run; open and test those libraries separately. Zero tests is reported explicitly and is not a claim of behavioral coverage.
role library. Its module name and path are filled in.from shared.types version "1.0.0": schema SharedFact
A provider exposes names through its Exports box, for example schema SharedFact. Add mappings for transitive imported modules as well. Merely placing a file in the same directory does not resolve an import. Module identities and exact versions must match.
Path mappings are remembered in local application settings for this source path. To move a project to another computer, bring its source libraries and reattach the mappings there. No hidden sidecar is needed for a self-contained source file. A fully linked program’s .tingir contains its selected definitions; a reusable compiled library may still require other providers during linking.
The custom Open dialog shows folders and .ting files on the left and a structure preview on the right. Select a file to see its module, role, size and declarations. Preview is bounded to 500 declaration names and does not run or semantically validate rules. A file with syntax errors can still be opened for repair.
Save writes the current source atomically. Save as chooses another path. The IDE checks whether an opened source has changed on disk and preserves your editing buffer if it detects a conflict. Use Save as to keep those edits or reopen the external version.
The last successfully opened or saved source reopens automatically on launch, along with its locally remembered library mappings. A missing or moved file produces a message in Build feedback and leaves a new starter available. Unsaved edits are protected by Save/Discard/Cancel prompts when switching files or closing.
The IDE reopens the saved file; it does not promise crash recovery of unsaved text. Save regularly. Use ting-ide --fresh to bypass automatic reopening, or ting-ide path/to/program.ting to open a particular file.
| Toolbar action | Effect |
|---|---|
| Check | Checks source, bindings, types and imported modules without publishing output. |
| Test | Checks the source and runs its embedded tests, using the current editor contents. |
| Compile | Saves source when needed, checks it, runs tests, compiles and verifies staged output, then atomically publishes program.tingir beside program.ting. |
| Stop | Terminates the active build process. Cancelled and failed builds do not replace the previous output. |
File reads and previews, validation, tests and compilation use background processes. The progress strip names the real stage currently running. It is an activity indicator, not an estimated percentage. The startup splash reports artwork, help, workspace construction and source restoration.
You can continue editing during a build. The result belongs to the snapshot submitted at the start. If newer edits exist, the IDE marks the result as belonging to an earlier snapshot; compile again to update it. Located diagnostics navigate only while their snapshot still matches.
The editor accepts UTF-8 source up to 8 MiB and 250,000 lines, with bounded source-graph and compiler limits. Files open in a worker; editing boxes are populated only when visited. Syntax coloring is omitted for boxes larger than 256,000 characters. Compiler and test execution budgets still apply. This keeps oversized work from silently becoming unbounded.
A .tingir program requires a compatible Ting Reasoner runtime. It is not a native executable. The IDE’s Test action exercises example sessions; an application supplies live facts and invokes the runtime API.
Full source shows the complete file, including comments, features, imports and documentation. Apply refreshes the section tabs. If a file has duplicate or unsupported top-level section headings, the section editors become read-only until Full source repairs it. The IDE preserves unedited regions and does not silently discard unsupported text.
Right-click editing boxes for custom Undo, Redo, Cut, Copy, Paste, Select all and indentation actions. Right-click trees to copy or expand their contents. Hover over controls for concise explanations.
| Shortcut | Action |
|---|---|
| Ctrl+N / Ctrl+O / Ctrl+S | New / Open / Save |
| Ctrl+Shift+S | Save as |
| F5 / F6 / F7 | Compile / Check / Test |
| Shift+F5 | Stop build |
| Ctrl+Shift+E | Full source |
| Ctrl+F | Find in current section |
| Tab / Shift+Tab | Indent / remove two-space indentation |
| F1 | Offline IDE guide |
Drag the custom title bar to move a window, double-click it to maximize or restore, or drag any edge/corner to resize. Menus, controls and icons use the same light Ting palette throughout.