Editor

The editor is the main input for Logic Studio. Type a boolean or predicate expression and all analysis panels update live.

Overview

The editor is a syntax-highlighted textarea on the left side of the screen. It accepts a multi-line logic program: either a single unnamed expression or a set of named bindings separated by semicolons.

Logic Studio editor with a feature-flag predicate expression loaded, showing the bindings panel, inputs panel, and graph on the right.
The editor (top-left) with the feature-flag example. Bindings, inputs, and predicate variables appear below. The graph is on the right.

Parsing happens on every keystroke. A red border and error message below the editor indicates a parse error.

Syntax

The expression language is a superset of standard propositional logic:

# Unnamed expression
(A & B) | !C

# Named bindings (end each with ;)
F = A & B;
G = F | !C;

# Predicate expression
can_purchase = logged_in & (age >= 18) & (region in {CA, US, UK});

Atoms & operators

Variables

Any identifier that is not a keyword is a boolean variable: A, user_active, x1. Variable names are case-sensitive.

Literals

Boolean constants: true, 1 (always true), false, 0 (always false).

Boolean operators

SyntaxMeaning
! or NOTLogical NOT (prefix)
& or ANDLogical AND
| or ORLogical OR
^ or XORExclusive OR
-> or IMPLIESMaterial implication (A→B ≡ ¬A∨B)
<-> or IFFBiconditional (A↔B)

Operator precedence (highest to lowest): !, &, ^, |, ->, <->. Use parentheses to override.

Binding syntax

When your program has more than one expression, name them:

F = A & B;
G = F | !C;
H = G -> D;

Each binding name is defined exactly once and can be referenced in later bindings. Cyclic references are not supported. See Bindings for how to work with multi-binding programs.

Inputs panel

The Inputs section appears below the Bindings panel. It lists every free boolean variable in the expression. For each variable you can set a constraint:

Constraints are visible as coloured pills next to each variable name. Display names can be edited by clicking the text field next to the variable identifier.

Don't-cares

A don't-care variable is one where you don't care about the output for certain input combinations. Mark a variable as a don't-care in the Inputs panel (dc) or in the expression itself using the ? suffix:

F = A & B?;

This tells the simplifier it may treat B as either 0 or 1 in any row, allowing a potentially smaller result. Don't-cares appear in the truth table as italicised rows. The simplifier won't produce an output that's incorrect for the non-don't-care rows.

Note
Don't-cares affect simplification only. The truth table still shows all rows and marks don't-care rows with a "?" in the output column.

⌘K command palette

Press ⌘K (or Ctrl+K) from anywhere to open the command palette. Type to search commands, navigate with ↑↓, and press Enter to run the selected command.

The palette includes:

Press ? (outside a text input) to open the keyboard shortcut help sheet.

Keyboard shortcuts

ActionShortcut
Open command palette⌘K
Apply simplified result⌘↵
Toggle theme⌘/
Focus editorg then e
Switch to Editorg then r
Switch to Notebookg then n
Graph tab1
Truth Table tab2
Decision Table tab3
Coverage tab4
Equiv Diff tab5
Export tab6
Shortcut help?
Close menu / dismissEsc
Tip
The g sequence (g-e, g-r, g-n) only fires outside text inputs. Press g and wait up to 1.5 seconds for the second key.

Examples

The intro cover (shown on first visit, or via About → "Show intro again") has six example chips. Clicking a chip loads the corresponding source into the editor. There is also a "More examples →" button that opens a drawer with the full example library organised by category.

Examples cover: simple gates, De Morgan, XOR, named bindings, implication chains, predicates, feature flags, and multi-binding pipelines.