Skip to content
CAI
Software that uses CAICheck a score

DualBrain/bsharp

70.8

Strong · 20 September 2026

12.7k

lines of production code

VB.NET

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

B\# is a .NET-based system designed to recreate the classic GW-BASIC and QBasic experience on modern platforms. It provides a compiler that translates BASIC source code into multiple target formats, including MSIL, VB.NET, and JavaScript, alongside an interpreter with a syntax-highlighting REPL. The system includes core language features such as control flow, variable management, and file operations, supported by a comprehensive test suite and sample programs.

Features

BASIC compiler binding layer and statement model introduced

The BSharp BASIC compiler now includes a binding phase that constructs a bound abstract syntax tree (AST) and a comprehensive model of bound statements and expressions. This change introduces support for classic BASIC control flow, including GOTO and GOSUB/RETURN with numeric line-number targets, as well as IF/THEN/ELSE, FOR/NEXT, and DO WHILE/UNTIL loops. The binding logic also adds support for variable assignment, binary arithmetic and logical operators with type inference, and a range of BASIC statements such as PRINT, INPUT, DEF FN, MID$, and file/directory management commands (CHDIR, CLS, CLEAR, MKDIR, KILL, etc.).

bsharp · high confidence

Compiler now supports multi-target platform output via -p flag

The bsc compiler has been updated to support generating output for multiple target platforms. Users can now specify the desired output type using the -p command-line argument, with support for Microsoft Intermediate Language (MSIL/IL/CIL), Microsoft Visual Basic, and JavaScript. The compiler automatically selects the appropriate file extension (.exe, .vb, or .html) based on the chosen platform if an output path is not explicitly provided.

bsc · high confidence

Introduction of syntax highlighting and full-screen editor in the REPL

The BSI interactive shell now features a full-screen editor mode and syntax highlighting for code entry. Users can toggle the full-screen editor (via the 'edit' command) to view and edit scripts with line/column indicators and insert/overwrite mode status. The REPL also highlights keywords, identifiers, numbers, strings, and comments with distinct colors during line-by-line rendering, improving readability when writing or reviewing BASIC code.

bsi · high confidence

New sample programs and multi-target output templates added

The samples directory now includes a collection of new BASIC programs demonstrating language features such as GOTO, GOSUB, INPUT, and arithmetic operations (e.g., acey.bas, gosub.bs, goto.bs, input.bs). Additionally, new files have been added to demonstrate the compiler's multi-target platform output capabilities, including a JavaScript console implementation (hello.html), a converted VB.NET module (hello.vb), and a basic HTML/JS runner template.

samples · high confidence

Behavioural changes

Project renamed to B\# with initial solution structure and documentation

The project has been renamed from 'b2x' to 'B\#' (bsharp.net) and restructured into a Visual Studio solution containing the main interpreter/compiler project (bsharp), a test suite (bsharp.tests), and supporting tools (bsc, bsi). The README has been updated to reflect the new name, the .NET Desktop build badge, and the project's goal of recreating the classic GW-BASIC/QBasic experience on modern .NET, including plans for an interpreter, compiler, and code converter.

(repo-wide) · high confidence

Test coverage

Added unit tests for B\#sharp lexer, parser, and code analysis utilities

Added a new test suite in the bsharp.tests project to verify the correctness of the language's syntax analysis components. This includes tests for the lexer (covering tokenization, separators, and identifier rules), the parser (validating binary and unary operator precedence), and utility classes like AnnotatedText and AssertingEnumerator used to support the test infrastructure.

bsharp.tests · high confidence

Dependencies

Project structure reorganized and upgraded to .NET 7.0

The project has been refactored and renamed to 'bsharp', with the solution split into distinct components: the core library (bsharp), the compiler (bsc), the interpreter (bsi), and the test suite (bsharp.tests). All projects now target .NET 7.0. The core library adds dependencies on Mono.Cecil and System.Collections.Immutable, while the compiler uses Mono.Options. The test suite is configured with xUnit, Microsoft.NET.Test.Sdk, and coverlet.collector.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 71.

Lenses

  • Code Health 81
  • Architecture 97
  • Maturity 58
  • Readiness 84
  • Security 80

Changes since last survey

  • 114 commits — 98 feature/other, 16 fixes

By area

  • BASIC/CodeAnalysis — 40 commits
  • bsharp/CodeAnalysis — 32 commits
  • (root) — 12 commits
  • .github/workflows — 7 commits
  • BASIC.Tests/CodeAnalysis — 4 commits
  • bi/BasicRepl.vb — 4 commits
  • bsi/BsharpRepl.vb — 4 commits
  • bsharp.tests/CodeAnalysis — 2 commits
  • bsi/bsi.vbproj — 2 commits
  • (repo) — 1 commit
  • bi/Program.vb — 1 commit
  • bsc/My Project — 1 commit
  • bsc/bsc.vbproj — 1 commit
  • bsi/bsharp.ico — 1 commit
  • bsi2/Authoring — 1 commit
  • samples/hello.bas — 1 commit

Notable commits

  • fix: Added a few more tests... found an issue with Xor - fixed it.
  • fix: Charging full speed ahead, merged old code into new project - currently have an issue with major rendering in the repl that needs to be debugged/fixed.
  • fix: Fix: Integer division for the "single" type crashes.
  • fix: Fixed (removed) case sensitivity.
  • fix: Fixed bug with ^ in constant folding and modified for apostrophe as a comment symbol instead of //.
  • fix: Fixed issue with loop lowering.
  • fix: Fixed issue with lowering of FOR regarding the upper bound being an expression being evaluated during the for loop instead of "once" at the start of the loop.
  • fix: Fixed issue with parsing paramter list and added a few more tests.
  • fix: Fixed issues related to new types reflected by current unit tests.
  • fix: Fixed lexer tests (to include many new keywords) and (for the moment) removed the "return" (GOSUB) functionality.
  • fix: Fixed print statement (Spc/Tab) caused (in part) by type inference and function parameter "overloads".
  • fix: Fixed type on NOP statement causing tests to fail.
  • fix: Improved/fixed repl UI related to "last line" issues.
  • fix: Modified RND to match documentation. Variables are now automatically initialized if they haven't been declared. END is now included in the boundtreewriter. Fixed parsing issue with single line IF where it was including the following line(s) but shouldn't. Work in progress on the inferred GOTO in a single line IF statement.
  • fix: Refactored a lot of the parsing related code to better handle parsing error conditions as well as verifying support for statements (plural) thanks to better "block" detection. Fixed several errors along the way and all existing tests currently pass.
  • fix: Updated compiler... 10 print "hello"; " "; "world" now compiles and executes. Working on 20 goto 10 (with generated label). Thinking that generated labels needs to move to the rewriter/lowerer. The bsi2 project created to work around what might be a WSL related wierdness (bug?) in Visual Studio. With that said, the Evaluator (and BSharp project) reworked the PRINT statement so that it is broken down into component (separate) "simple" calls to make it straight forward to compile/interpret.
  • change: Add "line number trivia" for parsing line numbers; still have to decide how these will be handled.
  • change: Added RETURN statement (functions).
  • change: Added a comment and sample code to the evaluator to remind about the need to check for types and possibly merge some operators.
  • change: Added ability to output bound tree.
  • …and 94 more

Architecture

  • 2 containers · 0 bounded contexts · 0 dependency edges (baseline)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

DualBrain/bsharp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 77caa74c1eecb57922f4f195106400babfa001b4 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.