How-to index

Common tasks and how to accomplish them.

How do I minimise a Boolean expression?

  1. Type your expression in the editor, e.g. (A & B) | (A & !B) | (!A & B).
  2. The Simplify panel (left column, below Inputs) will auto-run and show the minimal SOP result.
  3. Click Apply or press ⌘↵ to paste the result back into the editor.
  4. 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?

  1. Type your expression. The Solver section runs automatically.
  2. If the expression is satisfiable, the solver shows a satisfying assignment under "Inputs".
  3. To add constraints (e.g. "what if logged_in = true?"), set logged_in to 1 in the Inputs panel. The solver will update.
  4. 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?

  1. Write the policy as a predicate expression:
    can_purchase = logged_in & email_verified & (age >= 18) & (region in {CA, US, UK}) & !banned;
  2. The left panel shows Bindings, Inputs (boolean variables), and Predicate Variables (typed constraints).
  3. Fix specific variables in the Inputs panel to test a particular user scenario (e.g. set banned = 0, logged_in = 1).
  4. The truth table shows all remaining combinations. The solver shows the minimum required inputs.
  5. Use the Simplify panel to see if the policy can be expressed more simply.
  6. 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?

  1. Click Share in the intro cover footer (or press ⌘K and search "Share").
  2. The modal shows a URL encoding the current expression. Click Copy.
  3. 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?

  1. Write comparisons directly in the expression:
    (age >= 18) & (tier in {gold, platinum})
  2. Logic Studio parses each comparison as a predicate atom and shows it in the Predicate Variables section.
  3. Click the + button next to a variable to specify its type (number, enum, string) and value range. This enables better truth table bucket generation.
  4. Use not-in for exclusion: (country not-in {IR, KP}).
  5. To solve semantics-aware constraints (e.g. "is age < 18 AND age >= 18 always false?"), wait for Z3 to load.

See the Predicates page for operator reference and limitations.

How do I read the Show-all DAG?

  1. Write a multi-binding program:
    authenticated = token_valid & !expired;
    authorized = authenticated & (role in {admin, editor});
    can_write = authorized & !read_only;
  2. In the Graph tab, click Show all in the target bar above the canvas.
  3. All three bindings appear in a single DAG. Each binding's root is labelled. Shared atoms are shared nodes.
  4. 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:

  1. Click the Export tab (right column tab 6).
  2. Select a language (JavaScript, Python, C, SQL, GitHub Actions, Lisp).
  3. 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:

  1. In the Import/Export section, select the source language.
  2. Paste your code into the import textarea.
  3. 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?

  1. Write your expression in the editor.
  2. Click the Coverage tab (right column tab 4).
  3. Select a coverage strategy from the dropdown (Branch, MC/DC, Pairwise, or Prime Implicant).
  4. Click Generate.
  5. The table shows the minimum test vectors for that criterion.
  6. Select a language tab and click Copy to get the test vectors as code.

See the Coverage page for strategy definitions and limitations.