Skip to content
This repository was archived by the owner on Sep 22, 2026. It is now read-only.

Repository files navigation

Logic Lab

CI CodeQL

Logic Lab is a digital-logic workbench for teaching and experimentation. Build circuits on a Canvas schematic, simulate deterministic four-state 0/1/X/Z behavior, and inspect values and waveforms in the integrated logic analyzer.

Project status: V1 core modules, Workbench conformance, component evidence, and the local qualification corpus are implemented and verified. Production calibration and environment qualification remain open; Delivery records the evidence and remaining work. No Azure environment is represented as production-qualified.

What you can do

  • Place components, route wires, and navigate hierarchical circuits.
  • Simulate combinational, sequential, clocked, register, counter, ROM, and RAM circuits.
  • Apply inputs, Step or Run a Session, and observe Nets through Probes and waveforms.
  • Save projects to your account and exchange .logiclab packages.
  • Start with an inverter, a multiplexer, or a carry-lookahead or bit-serial 4-bit adder.
  • Use the workbench in English or Simplified Chinese.

Boolean explanation, Truth Tables, Karnaugh Maps, and automated simplification are deliberately outside V1. Their design is retained as a non-normative future proposal.

Get started

The anonymous Sandbox works without PostgreSQL. From the repository root, run:

dotnet run --project src/LogicLab.Web/LogicLab.Web.csproj --launch-profile https

Open https://localhost:7148 and choose a starter circuit, or begin from an empty Sandbox. The same launch profile also serves http://localhost:5151.

For accounts and saved projects, create a local PostgreSQL database, then run both migration sets before starting Web with the same connection:

export ConnectionStrings__LogicLab='Host=localhost;Database=logiclab;Username=postgres;Password=postgres'
dotnet run --project src/LogicLab.DatabaseMigrator -- local
dotnet run --project src/LogicLab.Web --launch-profile https

local accepts only a loopback host. Production migration and principal bootstrap use managed identity through the release runbook.

Try the inverter:

  1. Open Inverter basics on the Workbench start page.
  2. Choose Start simulation. The output appears in the logic analyzer.
  3. Enter 1 in the Inspector's input field and choose Apply inputs. On narrow screens, open Inspect selection to show the input controls.
  4. Choose Step. The output becomes 0; apply 0 and step again to see 1.

Examples open compiled. After editing a circuit, choose Compile. For an existing Simulation Session, choose Apply changes to retain compatible state or Restart simulation to reset it. Project options contains import, export, and the action for saving a Sandbox to your account.

The in-app /help/getting-started page covers the editor controls. The production runbook covers Azure setup and releases.

Verify a checkout

dotnet build logic-lab.slnx --nologo
dotnet test --solution logic-lab.slnx
dotnet format logic-lab.slnx --verify-no-changes
git diff --check

The full test suite expects an administrative PostgreSQL connection in LOGICLAB_TEST_POSTGRES_CONNECTION_STRING; tests create isolated temporary databases. CI runs the same repository graph on ubuntu-26.04-arm with PostgreSQL 18. For the complete Release gate, follow the component evidence procedure, which also verifies the qualification corpus and preserves the fresh test reports.

Repository map

The .NET 10 modular monolith uses Blazor Static SSR for conventional pages and Interactive Server for the editor. JavaScript adapters handle Canvas painting and pointer interaction; PostgreSQL stores projects and Identity. Architecture defines module ownership and dependencies.

Path Responsibility
src/LogicLab.Domain/ authored circuit model, component contracts, and Project Editor
src/LogicLab.Engine/ Compiler, Simulation Runtime, and four-state kernels
src/LogicLab.Application/ Editor Workspace, use cases, and bounded work coordination
src/LogicLab.Presentation/ declarative TeachingMixed geometry and schematic projection
src/LogicLab.ProjectFormat/ strict .logiclab package reader and writer
src/LogicLab.Infrastructure/ PostgreSQL persistence and Identity adapters
src/LogicLab.DatabaseMigrator/ local and production EF Core migrations; production principal bootstrap
src/LogicLab.Web/ Blazor host, UI, HTTP endpoints, and browser adapters
tests/ semantic, application, infrastructure, component, and browser evidence
infra/ Azure Container Apps, PostgreSQL, storage, identity, and monitoring Bicep

Documentation and contributing

The Documentation Map links product behavior, domain terminology, specifications, contracts, engineering rules, and research. Delivery records completion; specifications describe the target behavior.

Start with Contributing for development and pull-request guidance. Report reproducible bugs and focused proposals in GitHub Issues.

License

Logic Lab is available under either the MIT License or the Apache License 2.0, at your option (MIT OR Apache-2.0). Third-party notices identify separately licensed bundled material; Contributing states the contribution terms.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages