How-to index
Common tasks and how to accomplish them.
How do I minimise a Boolean expression?
- Type your expression in the editor, e.g.
(A & B) | (A & !B) | (!A & B). - The Simplify panel (left column, below Inputs) will auto-run and show the minimal SOP result.
- Click Apply or press ⌘↵ to paste the result back into the editor.
- Optionally click Why? to see the Quine–McCluskey steps that produced the result.
See the Simplify page for details on don't-cares and the rewrite transforms.
How do I find inputs that satisfy a constraint?
- Type your expression. The Solver section runs automatically.
- If the expression is satisfiable, the solver shows a satisfying assignment under "Inputs".
- To add constraints (e.g. "what if
logged_in = true?"), setlogged_into 1 in the Inputs panel. The solver will update. - For predicate expressions, wait for Z3 to load (the header pill shows "Solver: SMT ✓").
See the Solver page for backend details and the equivalence diff feature.
How do I debug a feature-flag policy?
- Write the policy as a predicate expression:
can_purchase = logged_in & email_verified & (age >= 18) & (region in {CA, US, UK}) & !banned; - The left panel shows Bindings, Inputs (boolean variables), and Predicate Variables (typed constraints).
- Fix specific variables in the Inputs panel to test a particular user scenario (e.g. set
banned = 0,logged_in = 1). - The truth table shows all remaining combinations. The solver shows the minimum required inputs.
- Use the Simplify panel to see if the policy can be expressed more simply.
- Add more bindings to model a multi-stage policy:
can_purchase = logged_in & email_verified & (age >= 18) & (region in {CA, US, UK}) & !banned; eligible_for_discount = can_purchase & (loyalty_years >= 2) & !pending_return;
How do I share a worksheet?
- Click Share in the intro cover footer (or press ⌘K and search "Share").
- The modal shows a URL encoding the current expression. Click Copy.
- Anyone with the URL can open it and see the same expression loaded in Logic Studio.
The URL is self-contained — no account or server required. See Export & Sharing for what is and isn't included in the URL state.
How do I use predicates with sets and comparisons?
- Write comparisons directly in the expression:
(age >= 18) & (tier in {gold, platinum}) - Logic Studio parses each comparison as a predicate atom and shows it in the Predicate Variables section.
- Click the
+button next to a variable to specify its type (number, enum, string) and value range. This enables better truth table bucket generation. - Use
not-infor exclusion:(country not-in {IR, KP}). - To solve semantics-aware constraints (e.g. "is
age < 18ANDage >= 18always false?"), wait for Z3 to load.
See the Predicates page for operator reference and limitations.
How do I read the Show-all DAG?
- Write a multi-binding program:
authenticated = token_valid & !expired; authorized = authenticated & (role in {admin, editor}); can_write = authorized & !read_only; - In the Graph tab, click Show all in the target bar above the canvas.
- All three bindings appear in a single DAG. Each binding's root is labelled. Shared atoms are shared nodes.
- Use the minimap and pan/zoom to navigate large DAGs.
See the Graph page for details.
How do I import or export to code?
Export:
- Click the Export tab (right column tab 6).
- Select a language (JavaScript, Python, C, SQL, GitHub Actions, Lisp).
- Click Copy to get the code for your expression.
Or expand the Import/Export section in the left panel for a combined import/export view.
Import:
- In the Import/Export section, select the source language.
- Paste your code into the import textarea.
- Click Import. Logic Studio parses the code and loads the expression into the editor.
See Export & Sharing for supported import formats.
How do I generate test cases?
- Write your expression in the editor.
- Click the Coverage tab (right column tab 4).
- Select a coverage strategy from the dropdown (Branch, MC/DC, Pairwise, or Prime Implicant).
- Click Generate.
- The table shows the minimum test vectors for that criterion.
- Select a language tab and click Copy to get the test vectors as code.
See the Coverage page for strategy definitions and limitations.