ValeLang/Vale
58.9
Adequate · 27 September 2026
61.6k
lines of production code
Scala
with C++, C
4
measurements over time
What this system is
This system is the Vale compiler, a multi-stage toolchain that translates source code into executable binaries. It comprises a Scala-based frontend for lexing, parsing, and type-checking, a C++ backend that generates LLVM IR, and a coordinator that orchestrates the build pipeline. The compiler supports advanced language features including generics, memory management with weak references, and deterministic execution recording and replay.
Features
Added Frontend/Utils library with core compiler infrastructure
The Frontend/Utils package introduces foundational utilities for the compiler, including an interning system (Interner, StrI) for efficient string and symbol handling, a keyword registry (Keywords) defining language tokens and built-in types, and data structures for tracking code locations and file hierarchies (CodeHierarchy, Range). It also provides general-purpose collection helpers (Accumulator, Collector, Utils), result handling (Result), and debugging/assertion tools (vassert, Profiler, Timer) to support the parsing and type-checking phases.
Frontend/Utils · high confidence
Added Vale compiler help and example files
Added documentation and example files for the Vale compiler, including a README, a 'Hello World' example program, and help text for the 'build' and general help commands. These files provide users with usage instructions, command-line options, and a starting point for compiling Vale source files.
scripts/all · high confidence
Added Windows build and installation scripts
New batch scripts have been added to the Windows toolchain to automate the compiler build and setup process. The \install-compiler-prereqs.bat\ script downloads the required LLVM 16 binaries and the Vale 0.2.0.27 bootstrapping compiler. The \build-compiler.bat\ script orchestrates the full build pipeline, compiling the Backend (via CMake/LLVM), Frontend (via SBT), and Coordinator, then packages the resulting artifacts (including \valec.exe\, \backend.exe\, and standard library files) into a release zip and runs the integrated tester suite.
scripts/windows · high confidence
Added build and test infrastructure for the Tester component
The Tester location now includes build scripts (build.sh for Linux/macOS and build.bat for Windows) and a .gitignore file to manage build artifacts. The shell script requires a bootstrapping valec directory as input to compile the tester source, while the batch script provides a simpler build path. An example invocation file is also added to demonstrate how to run the compiled tester against the frontend, backend, and standard library.
Tester · high confidence
Added build scripts for the Coordinator component
Introduced build automation for the Coordinator module by adding a .gitignore file to exclude build artifacts, a Windows batch script (build.bat), and a Linux/macOS shell script (build.sh). These scripts invoke the valec compiler to build the coordinator source against the Utils library, allowing users to generate the coordinator binary on their respective platforms.
Coordinator · high confidence
Added deterministic recording and replay infrastructure
The backend now includes a new determinism module that enables recording and replaying of program execution. This feature allows users to capture execution traces via the \--vale\_record\ flag and replay them deterministically using \--vale\_replay\. The implementation handles mapping recorded references to replayed ones, recording function calls, and managing file I/O for the trace data, ensuring consistent behavior across runs.
Backend/src/determinism · high confidence
Added standard library resource definitions for core types and operations
The \Frontend/Builtins/src/dev/vale/resources\ directory now contains the source definitions for the Vale standard library, providing the implementation for fundamental language features. This includes arithmetic and logic operations (\arith.vale\, \logic.vale\), string manipulation and comparison (\str.vale\, \streq.vale\), and memory management primitives like \drop\ and \clone\. It also introduces support for generic data structures such as \Opt\ (Option), \Result\, and dynamic/static arrays (\arrays.vale\), along with tuple types (\tup0.vale\–\tupN.vale\) and weak references (\weak.vale\). These files define the built-in functions and types that users rely on for basic programming tasks.
Frontend/Builtins/src/dev/vale/resources · high confidence
Initial implementation of the Vale compiler backend
The Backend/src directory now contains the core implementation of the Vale compiler, replacing the previous Midas codebase. This includes the LLVM-based code generation engine (globalstate, externs), runtime support libraries for memory management (census, weak references), and standard library builtins for strings, math, and I/O. The backend also integrates the nlohmann/json library (v3.9.1) for configuration and data handling.
Backend/src · high confidence
Initial project structure and IDE configuration for the Frontend module
The Frontend module has been initialized with a complete set of IntelliJ IDEA configuration files, including project modules, library dependencies (such as Scala 2.12, Lift JSON, and Google Cloud Functions Framework), and code style settings. This setup establishes the build environment for the compiler's internal passes (Lexing, Parsing, Typing, etc.) and introduces the \Builtins\ module, which provides the standard library implementation for the Vale language, including support for arrays, strings, and basic control flow.
Frontend · high confidence
Initial release of ValeRuster Rust binding generator
ValeRuster is a new command-line tool that generates Rust bindings for arbitrary Rust libraries by parsing rustdoc JSON data. It introduces a multi-module architecture including an indexer for crate genealogy, a resolver for handling imports and type aliases, and a main entry point that accepts arguments for the target crate, output directory, and Cargo configuration. The tool supports resolving complex type paths, handling generic arguments, and managing primitive types, laying the groundwork for FFI binding generation.
ValeRuster · high confidence
Introduce Instantiating Pass for Type Instantiation and Region Collapsing
The compiler now includes a new Instantiating Pass that transforms the typed AST into an instantiated form. This pass resolves generic placeholders by substituting them with concrete IDs, manages region tracking through counting and collapsing mechanisms (both consistent and individual strategies), and produces instantiated definitions for functions, structs, interfaces, and exports. It also provides utilities for humanizing these instantiated types and names for debugging or display purposes.
Frontend/InstantiatingPass · high confidence
Introduce Metal backend AST, instruction, and caching infrastructure
The backend now includes a new intermediate representation layer in the \Backend/src/metal\ directory, establishing the core data structures for the compiler's internal processing. This change adds the Abstract Syntax Tree (AST) definitions in \ast.h\ and \ast.cpp\, including the \Package\ class for managing exports and symbols, and defines the instruction set in \instructions.h\ with support for stack management operations like \Stackify\, \Restackify\, and \Unstackify\. A new \MetalCache\ class in \metalcache.h\ provides an interned memory model for types and names, while \readjson.cpp\ and \readjson.h\ implement the deserialization logic to load these structures from JSON. This infrastructure forms the foundation for the backend's code generation and type-checking phases.
Backend/src/metal · high confidence
Introduces shared backend utilities for expression code generation
The \Backend/src/function/expressions/shared\ directory now contains a new set of core helper files that standardize how the backend generates LLVM code for expressions. These additions include \afl.h\ for consistent source-location tracking, \ref.h\ and \ref.cpp\ for managing reference types and wrapper pointers, and \shared.h\/\shared.cpp\ for common operations like printing, assertions, and reference counting adjustments. Furthermore, \elements.h\/\elements.cpp\ provide utilities for array bounds checking and element initialization, \members.h\/\members.cpp\ handle struct member access, and \string.h\/\string.cpp\ manage string wrapper operations. Together, these files consolidate and centralize the logic previously scattered across the expression handling code.
Backend/src/function/expressions/shared · high confidence
Introduction of VSTL collections and backend hash map infrastructure
The Backend now includes a new standard library (VSTL) providing generic \List\, \HashMap\, and \HashSet\ data structures for the Vale language, along with the underlying C++ and LLVM infrastructure (\CppSimpleHashMap\, \LlvmSimpleHashMap\) required to compile and execute these collections efficiently. This change adds the necessary build configuration (CMakeLists.txt) and source files to support these new language features, enabling users to utilize dynamic arrays and hash-based collections in their programs.
Backend · high confidence
Introduction of new standard library modules
The stdlib now includes several new modules: arrays (with iteration support), cast utilities for type conversions, collections (HashMap, HashSet, List with iterators and operations), command execution (subprocess handling), date utilities, error handling interfaces, and command-line argument parsing (flagger). These additions expand the available functionality for common programming tasks.
stdlib · high confidence
Introduction of post-parsing rule translation and rule definitions
The post-parsing stage now includes a new rule translation system that converts parsed rule expressions into a structured intermediate representation. This change introduces \RuleScout\ and \TemplexScout\ to handle the translation of rulexes and type expressions, and defines a new set of rule structures (such as \EqualsSR\, \CoordComponentsSR\, and \IsInterfaceSR\) in \rules.scala\ to represent the logical constraints and type relationships identified during parsing.
Frontend/PostParsingPass/src/dev/vale/postparsing/rules · high confidence
Introduction of the Post-Parsing Pass for Type and Rule Resolution
The compiler now includes a new post-parsing stage that processes the abstract syntax tree to resolve types, enforce rules, and manage variable scoping. This pass introduces dedicated components for scouting expressions and functions, solving identifiability constraints for generic parameters, and handling loop constructs like \foreach\. It also defines the core type system structures (such as \ITemplataType\) and error reporting mechanisms required to validate code semantics before further compilation steps.
Frontend/PostParsingPass/src/dev/vale/postparsing · high confidence
Introduction of the TypingPass compiler infrastructure
The Frontend/TypingPass module now contains the core Scala implementation for the language's type-checking and compilation phase. This includes the main Compiler and Compilation orchestration classes, an ArrayCompiler for handling static and runtime-sized array logic, a ConvertHelper for type conversions, and a comprehensive error reporting system (CompilerErrorHumanizer and CompilerErrorReporter) that provides detailed, human-readable diagnostics for type errors, resolution failures, and structural constraints.
Frontend/TypingPass · high confidence
New SimplifyingPass implementation for translating intermediate AST to final AST
The frontend now includes a new 'SimplifyingPass' (previously known as 'Hammer') located in Frontend/SimplifyingPass. This pass implements the translation from the intermediate AST (Instantiating AST) to the final AST (Final AST). The implementation introduces a suite of specialized 'hammer' components—BlockHammer, ExpressionHammer, FunctionHammer, LetHammer, LoadHammer, and MutateHammer—to handle the translation of blocks, expressions, functions, variable bindings, loads, and mutations respectively. It also includes Conversions for mapping mutability, ownership, and location types, and HammerCompilation to orchestrate the process using cached results. This change represents a structural reorganization and implementation of the final AST generation phase.
Frontend/SimplifyingPass · high confidence
New Ubuntu build and prerequisite installation scripts
The scripts/ubuntu directory now includes build-compiler.sh, install-compiler-prereqs.sh, and a README. The prerequisite script allows users to selectively install build tools, Java (Temurin 20), SBT, a bootstrap Vale compiler (v0.2.0.27), and LLVM 16.0.0 on Ubuntu 18.04. The build script automates compiling the Vale compiler frontend, backend, and coordinator, packages the result into a release zip, and optionally runs a full test suite using a tester component.
scripts/ubuntu · high confidence
New backend function translation and FFI boundary handling
The backend now includes a new function translation layer in \Backend/src/function\ that compiles Vale functions to LLVM IR. This introduces a dedicated boundary module (\boundary.cpp/h\) to manage data movement and encryption between Vale's internal regions and the host environment, specifically handling the reception of host objects into Vale and the sending of Vale objects back to the host. The \function.cpp\ implementation generates export thunks that correctly alias incoming parameters and dealias return values, while \expression.cpp\ provides the core logic for translating Vale expressions, including constants, control flow, and memory ownership operations like stackification and restackification.
Backend/src/function · high confidence
New backend translation logic for function expressions
The \Backend/src/function/expressions\ directory now contains the implementation for translating source-level expressions into LLVM IR. This includes handling control flow (\if\, \while\, \block\), data manipulation (\construct\, \destructure\, \localload\, \discard\), and memory management (\newarrayfromvalues\, \newimmruntimesizearray\, \newmutruntimesizearray\). It also introduces support for calling conventions, including standard calls, interface calls, and extern calls with specific support for 'fearless FFI' side-calling and deterministic replay capabilities.
Backend/src/function/expressions · high confidence
New backend utility library for LLVM code generation
The Backend/src/utils directory now contains a new set of helper modules to support the compiler's LLVM code generation. These additions include branch control flow utilities (branch.cpp/h) for generating if/else/while structures, call handling (call.cpp/h), and function definition scaffolding (definefunction.cpp/h). The update also introduces counter management (counters.cpp/h) for atomic and non-atomic adjustments, command-line flag processing (flags.cpp/h), and low-level LLVM operations (llvm.cpp/h) for pointer arithmetic and null checks. Additionally, it adds struct type management (structlt.cpp/h) for compressing and decompressing struct members, random generation helpers (randomgeneration.cpp/h), and a new entry point for branch logic (branch.cpp).
Backend/src/utils · high confidence
New build and benchmarking scripts for Vale compiler
The repository now includes a new \scripts/VERSION\ file to manage the compiler version (set to 0.2.1.0) and a new \scripts/build-compiler.script.vale\ script that automates the build process for the Vale compiler, including frontend compilation via SBT, backend generation via CMake, and coordinator building. Additionally, a \scripts/smoke\_benchmark.sh\ script has been added to facilitate performance comparisons between different compiler builds by running repeated timing tests.
scripts · high confidence
New common region infrastructure for memory management and type layouts
The backend introduces a new \common\ region module that provides shared infrastructure for memory management and type layouts. This includes a \ControlBlock\ class to manage object metadata (such as reference counts, generation tracking, and census fields) and a \KindStructs\ system to define and route LLVM type layouts for structs, interfaces, and arrays (including weak references). The module also implements \HybridGenerationalMemory\ for generational garbage collection logic and \FatWeaks\ for handling weak pointer operations, forming the foundational memory management layer for the region system.
Backend/src/region · high confidence
New macOS build and prerequisite installation scripts
Added \scripts/mac/build-compiler.sh\ and \scripts/mac/install-compiler-prereqs.sh\ to automate the Vale compiler build process on macOS. The installation script sets up required dependencies including Xcode, Java 11, Homebrew, CMake, SBT, and LLVM 16, and downloads a bootstrapping Vale compiler binary. The build script compiles the Frontend, Backend, and Coordinator components, packages the resulting artifacts (including the \valec\ executable, standard library, and builtins) into a release zip, and optionally runs a comprehensive test suite against the newly built compiler.
scripts/mac · high confidence
New subprocess utility for launching and interacting with external commands
A new \command2\ module has been added to the Utils library, providing a builder-based API for launching external processes. Users can now construct and execute subprocesses with configurable working directories and arguments, while reading standard output and error streams in real-time via consumer callbacks. This capability is backed by a new C implementation (\subprocess.c\) that wraps the \subprocess.h\ library for cross-platform process management, along with corresponding Vale bindings and unit tests.
Utils/src · high confidence
New syntax highlighter for Vale code
A new syntax highlighter has been introduced to the Vale frontend, replacing the previous implementation. This change adds support for highlighting specific language constructs such as where clauses, ranges, and destructuring patterns, ensuring that code editors can now accurately colorize these elements for better readability.
Frontend/Highlighter · high confidence
Tester tool now supports parallel test execution and configurable build paths
The Tester tool in Tester/src has been updated to allow running tests concurrently via the new --concurrent flag (defaulting to 10 parallel jobs) and to accept explicit paths for the frontend, backend, builtins, and stdlib directories. This enables faster test feedback and flexible configuration of the test environment without relying on hardcoded relative paths.
Tester/src · high confidence
Behavioural changes
Explicit coercion and improved error reporting in the higher typing pass
The higher typing pass now performs explicit coercion for type lookups and calls, replacing previous implicit behavior to ensure type safety and clarity. This change is accompanied by a new error reporting system that provides specific, human-readable messages for issues such as missing types, unsolvable generic rules, incorrect template argument counts, and circular module dependencies.
Frontend/HigherTypingPass · high confidence
Introduction of the Vale Coordinator build system
The build process is now managed by a new 'Coordinator' component (replacing the previous 'Driver'), which orchestrates the compilation pipeline by invoking the Java-based Frontend, the C++ Backend, and the Clang linker. This change introduces support for position-independent code (PIC) and position-independent executables (PIE) via new build flags, enables deterministic recording and replaying of program execution, and adds diagnostic capabilities such as memory overhead reporting and AddressSanitizer (ASan) integration.
Coordinator/src · high confidence
New Vale parsing engine implementation
The parsing pass has been replaced with a new Scala-based implementation, introducing a complete rewrite of the lexer-to-AST pipeline. This change adds new core components including \ExpressionParser\, \PatternParser\, and \TemplexParser\ to handle syntax analysis, while \ParseAndExplore\ orchestrates the parsing of top-level denizens (functions, structs, interfaces, impls, imports, and exports). The system now supports serialization and deserialization of parsed ASTs via \ParserVonifier\ and \ParsedLoader\ using a JSON-based format, and includes a \ParseErrorHumanizer\ to provide user-friendly error messages. Additionally, a new \Formatter\ component is introduced for source code formatting, and \StringParserTests\ along with \TestParseUtils\ provide the test infrastructure for the new parser.
Frontend/ParsingPass/src/dev/vale/parsing · high confidence
New lexing and parsing infrastructure for the Vale frontend
The Frontend/LexingPass module has been replaced with a new implementation that introduces a pre-parsing stage and a dedicated \LexAndExplore\ orchestrator to handle package resolution and file iteration. This change brings a significant performance improvement, with the parser itself running approximately 50-60% faster, partly due to the introduction of \StrI\ (an interned string with small-string optimization). The new architecture also supports regions, isolates, and generics, while refining the handling of attributes such as \\#!DeriveStructDrop\ and \linear\.
Frontend/LexingPass · high confidence
String parsing logic commented out in StringParser.scala
The implementation for parsing string literals and interpolations in \StringParser.scala\ has been commented out. This removes the active logic for handling string parts, escape sequences, and expression interpolation within the parser, effectively disabling this specific parsing capability in the current build.
Frontend/ParsingPass/src/dev/vale/parsing/expressions · high confidence
Test coverage
Added test infrastructure and regression tests; Added test script and gitignore for Utils; Added test utility for loading Vale package resources.
Dependencies
Initial build configuration for Frontend and ValeRuster components
The project now includes build manifests for the Scala-based Frontend and the Rust-based ValeRuster tool. The Frontend is configured to use Scala 2.12.19 and aggregates source directories for various compiler passes (such as ParsingPass, LexingPass, and SimplifyingPass) into a single assembly. The ValeRuster component is defined with Rust edition 2021 and depends on libraries including clap, anyhow, regex, and serde\_json.
(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
Score
- CAI 49 → 59 (+9.5)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 82 (-18.3)
- Architecture 69 → 99 (+30.4)
- Maturity 62 → 59 (-3.4)
- Readiness 25 → 46 (+21.2)
- Security 94 → 78 (-16.1)
Resolved (10)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- High IaC: DS-0029 (scripts/docker/Dockerfile)
- High IaC: DS-0029 (scripts/docker/Dockerfile)
- High IaC: DS-0029 (scripts/docker/Dockerfile)
- Low IaC: DS-0026 (scripts/docker/Dockerfile)
- No exposed public API
- No tests found
- Test reliability not included
- The 'Learning Vale' link points to a Vale.dev guide that is not present in the visible portion of the document (the body ends before it), and there is no link to the actual Vale.dev site from within the README. (README.md)
New (426)
- AnonymousInterfaceMacro.mapRunes (cyclomatic 28) (Frontend/TypingPass/src/dev/vale/typing/macros/AnonymousInterfaceMacro.scala)
- ArrayCompiler.evaluateRuntimeSizedArrayFromCallable (cognitive 20) (Frontend/TypingPass/src/dev/vale/typing/ArrayCompiler.scala)
- ArrayCompiler.evaluateRuntimeSizedArrayFromCallable (cyclomatic 23) (Frontend/TypingPass/src/dev/vale/typing/ArrayCompiler.scala)
- BodyCompiler.declareAndEvaluateFunctionBody (cognitive 17) (Frontend/TypingPass/src/dev/vale/typing/function/FunctionBodyCompiler.scala)
- BodyCompiler.evaluateFunctionBody (cognitive 18) (Frontend/TypingPass/src/dev/vale/typing/function/FunctionBodyCompiler.scala)
- Change coupling: ExpressionParser.scala ↔ ParserVonifier.scala (Frontend/ParsingPass/src/dev/vale/parsing/ExpressionParser.scala)
- Change coupling: ParsedLoader.scala ↔ ParserVonifier.scala (Frontend/ParsingPass/src/dev/vale/parsing/ParsedLoader.scala)
- ClassTooLong: ArrayCompiler (Frontend/TypingPass/src/dev/vale/typing/ArrayCompiler.scala)
- ClassTooLong: CompilerRuleSolver (Frontend/TypingPass/src/dev/vale/typing/infer/CompilerSolver.scala)
- ClassTooLong: ExpressionCompiler (Frontend/TypingPass/src/dev/vale/typing/expression/ExpressionCompiler.scala)
- ClassTooLong: ExpressionHammer (Frontend/SimplifyingPass/src/dev/vale/simplifying/ExpressionHammer.scala)
- ClassTooLong: FunctionCompilerSolvingLayer (Frontend/TypingPass/src/dev/vale/typing/function/FunctionCompilerSolvingLayer.scala)
- ClassTooLong: FunctionScout (Frontend/PostParsingPass/src/dev/vale/postparsing/FunctionScout.scala)
- ClassTooLong: ParsedLoader (Frontend/ParsingPass/src/dev/vale/parsing/ParsedLoader.scala)
- ClassTooLong: PatternCompiler (Frontend/TypingPass/src/dev/vale/typing/expression/PatternCompiler.scala)
- ClassTooLong: TemplexParser (Frontend/ParsingPass/src/dev/vale/parsing/templex/TemplexParser.scala)
- ClassTooLong: VonHammer (Frontend/SimplifyingPass/src/dev/vale/simplifying/VonHammer.scala)
- Compiler.ensureDeepExports (cognitive 19) (Frontend/TypingPass/src/dev/vale/typing/Compiler.scala)
- Compiler.ensureDeepExports (cyclomatic 20) (Frontend/TypingPass/src/dev/vale/typing/Compiler.scala)
- Compiler.evaluate (cognitive 85) (Frontend/TypingPass/src/dev/vale/typing/Compiler.scala)
- …and 406 more
Changes since last survey
- 3 commits — 3 feature/other, 0 fixes
By area
- (root) — 3 commits
Notable commits
- change: Update README.md
- change: Update README.md
- change: Update README.md
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ValeLang/Vale 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 27 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 3e985c624074fdce1b59c971b339cc83db67825d — 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-d00c643c3f66.