$ account BosqueLanguage
BosqueCore is a compiler and toolchain for the Bosque programming language, a research-oriented language emphasizing mechanized reasoning, deterministic execution, and safe-by-design programming. The repository implements a full compilation pipeline in TypeScript: a recursive-descent parser and lexer, a semantic type checker with advanced features (invariants, pre/post conditions, validated strings, numeric range types), an IR with monomorphization, and a C++ backend that generates garbage-collected, allocation-aware code. The CLI (`src/cmd/bosque.ts`) compiles `.bsq` files to C++ and produces executables via a Makefile build system. Extensive tests cover parser, typechecker, C++ emission, and runtime execution of sample programs (raytracer, nbody, binary tree). The architecture is cleanly split between frontend (AST, parsing, checking) and backend (IR, monomorphization, C++ emission), with a hand-written recursion-descent parser and a highly detailed type system. However, the codebase is a work in progress: many language features are explicitly unimplemented (tasks, switch, dispatch, multi-return, resource/env handling) with `assert(false, "Not implemented")` stubs, and large monolithic files (e.g., `parser.ts`, `checker.ts`, `flatten.ts`) concentrate complexity. The repository also includes a C++ runtime with a custom GC and allocators, plus a lexer/serializer for the BAPI IR format. As a research project transitioning toward practical use, it offers a unique, safety-focused language design but is not yet production-ready.