128 stored block det column reused in block

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

r0 1 -2.5 -22.5 -13.5
r1 1 -2.5 -19.5 -11.5
r2 2 -4.5 -37.5 -22.5
r3 -1 2 17 10
det 2

Expected output

✓ Zig✓ C#
r0 1 -2.5 -22.5 -13.5
r1 1 -2.5 -19.5 -11.5
r2 2 -4.5 -37.5 -22.5
r3 -1 2 17 10
det 2
Emitted Zig source
// Access compiler flags via the per-user compiler_env module
const CompilerEnv = @import("compiler_env").CompilerEnv;

pub const panic = if (@import("builtin").mode == .Debug)
    @import("std").debug.FullPanic(@import("std").debug.defaultPanic)
else
    @import("std").debug.simple_panic;


const __koru_bare = struct {
    extern fn posix_memalign(memptr: *?*anyopaque, alignment: usize, size: usize) c_int;
    extern fn free(ptr: ?*anyopaque) void;
    fn bareAlloc(_: *anyopaque, len: usize, alignment: @import("std").mem.Alignment, _: usize) ?[*]u8 {
        var p: ?*anyopaque = null;
        const a = @max(alignment.toByteUnits(), @sizeOf(usize));
        if (posix_memalign(&p, a, len) != 0) return null;
        return @ptrCast(p);
    }
    fn bareResize(_: *anyopaque, _: []u8, _: @import("std").mem.Alignment, _: usize, _: usize) bool { return false; }
    fn bareRemap(_: *anyopaque, _: []u8, _: @import("std").mem.Alignment, _: usize, _: usize) ?[*]u8 { return null; }
    fn bareFree(_: *anyopaque, memory: []u8, _: @import("std").mem.Alignment, _: usize) void { free(@ptrCast(memory.ptr)); }
    const vtable = @import("std").mem.Allocator.VTable{ .alloc = bareAlloc, .resize = bareResize, .remap = bareRemap, .free = bareFree };
    const allocator = @import("std").mem.Allocator{ .ptr = undefined, .vtable = &vtable };
};
const __koru_backing = if (@import("builtin").link_libc) @import("std").heap.c_allocator else if (@import("builtin").os.tag == .freestanding) __koru_bare.allocator else @import("std").heap.page_allocator;
var __koru_leak_count: usize = 0;
fn __koru_alloc(ctx: *anyopaque, len: usize, alignment: @import("std").mem.Alignment, ret_addr: usize) ?[*]u8 {
    _ = ctx;
    const r = __koru_backing.rawAlloc(len, alignment, ret_addr);
    if (comptime @import("builtin").mode == .Debug) {
        if (r != null) __koru_leak_count += 1;
    }
    return r;
}
fn __koru_resize(ctx: *anyopaque, memory: []u8, alignment: @import("std").mem.Alignment, new_len: usize, ret_addr: usize) bool {
    _ = ctx;
    return __koru_backing.rawResize(memory, alignment, new_len, ret_addr);
}
fn __koru_remap(ctx: *anyopaque, memory: []u8, alignment: @import("std").mem.Alignment, new_len: usize, ret_addr: usize) ?[*]u8 {
    _ = ctx;
    return __koru_backing.rawRemap(memory, alignment, new_len, ret_addr);
}
fn __koru_free(ctx: *anyopaque, memory: []u8, alignment: @import("std").mem.Alignment, ret_addr: usize) void {
    _ = ctx;
    __koru_backing.rawFree(memory, alignment, ret_addr);
    if (comptime @import("builtin").mode == .Debug) {
        __koru_leak_count -= 1;
    }
}
const __koru_vtable = @import("std").mem.Allocator.VTable{ .alloc = __koru_alloc, .resize = __koru_resize, .remap = __koru_remap, .free = __koru_free };
pub fn koru_allocator() @import("std").mem.Allocator {
    return .{ .ptr = undefined, .vtable = &__koru_vtable };
}

pub inline fn __koru_intcast(comptime T: type, x: anytype) T {
    if (comptime (@import("builtin").mode == .Debug or @import("builtin").mode == .ReleaseSafe))
        return @as(T, @intCast(x));
    const dst = @typeInfo(T);
    const src = @typeInfo(@TypeOf(x));
    if (comptime (dst == .int and src == .int and dst.int.bits == src.int.bits and dst.int.signedness != src.int.signedness))
        return @as(T, @bitCast(x));
    return @as(T, @intCast(x));
}

pub fn koru_leak_check() void {
    if (comptime @import("builtin").mode != .Debug) return;
    if (__koru_leak_count == 0) return;
    if (comptime @import("builtin").target.os.tag == .freestanding) {
        if (comptime @import("builtin").cpu.arch == .wasm32 or @import("builtin").cpu.arch == .wasm64) {
            @panic("KORU LEAK CHECK FAILED: the produced program leaked");
        } else {
            const __klc = struct { extern var stdout: ?*anyopaque; extern fn fputs(__s: [*:0]const u8, __st: ?*anyopaque) c_int; };
            var __lb: [128]u8 = undefined;
            const __lm = "KORU LEAK CHECK FAILED: allocations still outstanding at end of run: ";
            @memcpy(__lb[0..__lm.len], __lm);
            var __ln: usize = __lm.len;
            var __lv = __koru_leak_count;
            var __ld: [20]u8 = undefined;
            var __lk: usize = 0;
            while (__lv > 0) : (__lk += 1) { __ld[__lk] = @intCast('0' + __lv % 10); __lv /= 10; }
            for (0..__lk) |__li| { __lb[__ln] = __ld[__lk - 1 - __li]; __ln += 1; }
            __lb[__ln] = '\n'; __ln += 1; __lb[__ln] = 0;
            _ = __klc.fputs(@as([*:0]const u8, @ptrCast(&__lb)), __klc.stdout);
            @trap();
        }
    } else {
        @import("std").debug.print("KORU LEAK CHECK FAILED: the produced program leaked (trace above)\n", .{});
        @import("std").process.exit(1);
    }
}

pub const main_module = struct {
    // std/store: plural store 'mats' created (SoA cell + insert/query/write/take/stripe units); fields t00: f64, t01: f64, t02: f64, t03: f64, t10: f64, t11: f64, t12: f64, t13: f64, t20: f64, t21: f64, t22: f64, t23: f64, t30: f64, t31: f64, t32: f64, t33: f64, o00: f64, o01: f64, o02: f64, o03: f64, o10: f64, o11: f64, o12: f64, o13: f64, o20: f64, o21: f64, o22: f64, o23: f64, o30: f64, o31: f64, o32: f64, o33: f64, det: f64
    // >>> FLOW: tests/regression/600_STDLIB/690_STORE/690_128_stored_block_det_column_reused_in_block/input.k:30  ~input:__store_insert_mats()
    pub fn flow0() void {
        _ = main_module.__store_insert_mats_event.handler(.{ .t00 = -3.0, .t01 = -3.0, .t02 = 2.0, .t03 = -3.0, .t10 = 2.0, .t11 = -3.0, .t12 = -1.0, .t13 = -3.0, .t20 = -1.0, .t21 = -1.0, .t22 = 2.0, .t23 = 2.0, .t30 = 1.0, .t31 = 2.0, .t32 = -3.0, .t33 = -3.0, .o00 = 0.0, .o01 = 0.0, .o02 = 0.0, .o03 = 0.0, .o10 = 0.0, .o11 = 0.0, .o12 = 0.0, .o13 = 0.0, .o20 = 0.0, .o21 = 0.0, .o22 = 0.0, .o23 = 0.0, .o30 = 0.0, .o31 = 0.0, .o32 = 0.0, .o33 = 0.0, .det = 0.0, .__site_line = 30 });
    }
    // >>> FLOW: tests/regression/600_STDLIB/690_STORE/690_128_stored_block_det_column_reused_in_block/input.k:32  ~input:__store_sweeprun_mats_L33_690_128_stored_block_det_column_reused_in_block_input_888f23()
    pub fn flow1() void {
        _ = main_module.__store_sweeprun_mats_L33_690_128_stored_block_det_column_reused_in_block_input_888f23_event.handler(.{  });
    }
    // >>> FLOW: tests/regression/600_STDLIB/690_STORE/690_128_stored_block_det_column_reused_in_block/input.k:54  ~input:__store_sweeprun_mats_L55_690_128_stored_block_det_column_reused_in_block_input_888f23()
    pub fn flow2() void {
        _ = main_module.__store_sweeprun_mats_L55_690_128_stored_block_det_column_reused_in_block_input_888f23_event.handler(.{  });
    }
    pub fn koru_start_flow() void {
        const result_0 = koru_koru.start_event.handler(.{  });
        const result_0_done = result_0.done;
        _ = &result_0_done;
    }
    pub fn koru_end_flow() void {
        const result_0 = koru_koru.end_event.handler(.{  });
        const result_0_done = result_0.done;
        _ = &result_0_done;
    }
    const __KoruStoreT_mats = struct {
    t00: [2]f64 = undefined,
    t01: [2]f64 = undefined,
    t02: [2]f64 = undefined,
    t03: [2]f64 = undefined,
    t10: [2]f64 = undefined,
    t11: [2]f64 = undefined,
    t12: [2]f64 = undefined,
    t13: [2]f64 = undefined,
    t20: [2]f64 = undefined,
    t21: [2]f64 = undefined,
    t22: [2]f64 = undefined,
    t23: [2]f64 = undefined,
    t30: [2]f64 = undefined,
    t31: [2]f64 = undefined,
    t32: [2]f64 = undefined,
    t33: [2]f64 = undefined,
    o00: [2]f64 = undefined,
    o01: [2]f64 = undefined,
    o02: [2]f64 = undefined,
    o03: [2]f64 = undefined,
    o10: [2]f64 = undefined,
    o11: [2]f64 = undefined,
    o12: [2]f64 = undefined,
    o13: [2]f64 = undefined,
    o20: [2]f64 = undefined,
    o21: [2]f64 = undefined,
    o22: [2]f64 = undefined,
    o23: [2]f64 = undefined,
    o30: [2]f64 = undefined,
    o31: [2]f64 = undefined,
    o32: [2]f64 = undefined,
    o33: [2]f64 = undefined,
    det: [2]f64 = undefined,
    len: usize = 0,
};
var __koru_store_mats: __KoruStoreT_mats = .{};
const __KoruStoreRow_mats = struct { t00: f64, t01: f64, t02: f64, t03: f64, t10: f64, t11: f64, t12: f64, t13: f64, t20: f64, t21: f64, t22: f64, t23: f64, t30: f64, t31: f64, t32: f64, t33: f64, o00: f64, o01: f64, o02: f64, o03: f64, o10: f64, o11: f64, o12: f64, o13: f64, o20: f64, o21: f64, o22: f64, o23: f64, o30: f64, o31: f64, o32: f64, o33: f64, det: f64 };
    pub const __store_insert_mats_event = struct {
        pub const Input = struct {
            t00: f64,
            t01: f64,
            t02: f64,
            t03: f64,
            t10: f64,
            t11: f64,
            t12: f64,
            t13: f64,
            t20: f64,
            t21: f64,
            t22: f64,
            t23: f64,
            t30: f64,
            t31: f64,
            t32: f64,
            t33: f64,
            o00: f64,
            o01: f64,
            o02: f64,
            o03: f64,
            o10: f64,
            o11: f64,
            o12: f64,
            o13: f64,
            o20: f64,
            o21: f64,
            o22: f64,
            o23: f64,
            o30: f64,
            o31: f64,
            o32: f64,
            o33: f64,
            det: f64,
            __site_line: i64,
        };
        pub const Output = void;
        pub inline fn handler(__koru_event_input: @This().Input) @This().Output {
            return __koru_handler_impl(__koru_event_input.t00, __koru_event_input.t01, __koru_event_input.t02, __koru_event_input.t03, __koru_event_input.t10, __koru_event_input.t11, __koru_event_input.t12, __koru_event_input.t13, __koru_event_input.t20, __koru_event_input.t21, __koru_event_input.t22, __koru_event_input.t23, __koru_event_input.t30, __koru_event_input.t31, __koru_event_input.t32, __koru_event_input.t33, __koru_event_input.o00, __koru_event_input.o01, __koru_event_input.o02, __koru_event_input.o03, __koru_event_input.o10, __koru_event_input.o11, __koru_event_input.o12, __koru_event_input.o13, __koru_event_input.o20, __koru_event_input.o21, __koru_event_input.o22, __koru_event_input.o23, __koru_event_input.o30, __koru_event_input.o31, __koru_event_input.o32, __koru_event_input.o33, __koru_event_input.det, __koru_event_input.__site_line);
        }
        fn __koru_handler_impl(__koru_p_0: f64, __koru_p_1: f64, __koru_p_2: f64, __koru_p_3: f64, __koru_p_4: f64, __koru_p_5: f64, __koru_p_6: f64, __koru_p_7: f64, __koru_p_8: f64, __koru_p_9: f64, __koru_p_10: f64, __koru_p_11: f64, __koru_p_12: f64, __koru_p_13: f64, __koru_p_14: f64, __koru_p_15: f64, __koru_p_16: f64, __koru_p_17: f64, __koru_p_18: f64, __koru_p_19: f64, __koru_p_20: f64, __koru_p_21: f64, __koru_p_22: f64, __koru_p_23: f64, __koru_p_24: f64, __koru_p_25: f64, __koru_p_26: f64, __koru_p_27: f64, __koru_p_28: f64, __koru_p_29: f64, __koru_p_30: f64, __koru_p_31: f64, __koru_p_32: f64, __koru_p_33: i64) @This().Output {
            const __koru_event_input: @This().Input = .{ .t00 = __koru_p_0, .t01 = __koru_p_1, .t02 = __koru_p_2, .t03 = __koru_p_3, .t10 = __koru_p_4, .t11 = __koru_p_5, .t12 = __koru_p_6, .t13 = __koru_p_7, .t20 = __koru_p_8, .t21 = __koru_p_9, .t22 = __koru_p_10, .t23 = __koru_p_11, .t30 = __koru_p_12, .t31 = __koru_p_13, .t32 = __koru_p_14, .t33 = __koru_p_15, .o00 = __koru_p_16, .o01 = __koru_p_17, .o02 = __koru_p_18, .o03 = __koru_p_19, .o10 = __koru_p_20, .o11 = __koru_p_21, .o12 = __koru_p_22, .o13 = __koru_p_23, .o20 = __koru_p_24, .o21 = __koru_p_25, .o22 = __koru_p_26, .o23 = __koru_p_27, .o30 = __koru_p_28, .o31 = __koru_p_29, .o32 = __koru_p_30, .o33 = __koru_p_31, .det = __koru_p_32, .__site_line = __koru_p_33 };
            // >>> PROC: __store_insert_mats  [tests/regression/600_STDLIB/690_STORE/690_128_stored_block_det_column_reused_in_block/input.k:28]
            const t00 = __koru_event_input.t00;
            const t01 = __koru_event_input.t01;
            const t02 = __koru_event_input.t02;
            const t03 = __koru_event_input.t03;
            const t10 = __koru_event_input.t10;
            const t11 = __koru_event_input.t11;
            const t12 = __koru_event_input.t12;
            const t13 = __koru_event_input.t13;
            const t20 = __koru_event_input.t20;
            const t21 = __koru_event_input.t21;
            const t22 = __koru_event_input.t22;
            const t23 = __koru_event_input.t23;
            const t30 = __koru_event_input.t30;
            const t31 = __koru_event_input.t31;
            const t32 = __koru_event_input.t32;
            const t33 = __koru_event_input.t33;
            const o00 = __koru_event_input.o00;
            const o01 = __koru_event_input.o01;
            const o02 = __koru_event_input.o02;
            const o03 = __koru_event_input.o03;
            const o10 = __koru_event_input.o10;
            const o11 = __koru_event_input.o11;
            const o12 = __koru_event_input.o12;
            const o13 = __koru_event_input.o13;
            const o20 = __koru_event_input.o20;
            const o21 = __koru_event_input.o21;
            const o22 = __koru_event_input.o22;
            const o23 = __koru_event_input.o23;
            const o30 = __koru_event_input.o30;
            const o31 = __koru_event_input.o31;
            const o32 = __koru_event_input.o32;
            const o33 = __koru_event_input.o33;
            const det = __koru_event_input.det;
            const __site_line = __koru_event_input.__site_line;
            _ = &t00;
            _ = &t01;
            _ = &t02;
            _ = &t03;
            _ = &t10;
            _ = &t11;
            _ = &t12;
            _ = &t13;
            _ = &t20;
            _ = &t21;
            _ = &t22;
            _ = &t23;
            _ = &t30;
            _ = &t31;
            _ = &t32;
            _ = &t33;
            _ = &o00;
            _ = &o01;
            _ = &o02;
            _ = &o03;
            _ = &o10;
            _ = &o11;
            _ = &o12;
            _ = &o13;
            _ = &o20;
            _ = &o21;
            _ = &o22;
            _ = &o23;
            _ = &o30;
            _ = &o31;
            _ = &o32;
            _ = &o33;
            _ = &det;
            _ = &__site_line;
            _ = &__koru_event_input;
            if (__koru_store_mats.len >= 2) @panic("std/store: store 'mats' is full (capacity 2) - declared capacity and the `| full` branch are pinned at 690_011");
            const __koru_new_row = __koru_store_mats.len;
            __koru_store_mats.t00[__koru_new_row] = t00;
            __koru_store_mats.t01[__koru_new_row] = t01;
            __koru_store_mats.t02[__koru_new_row] = t02;
            __koru_store_mats.t03[__koru_new_row] = t03;
            __koru_store_mats.t10[__koru_new_row] = t10;
            __koru_store_mats.t11[__koru_new_row] = t11;
            __koru_store_mats.t12[__koru_new_row] = t12;
            __koru_store_mats.t13[__koru_new_row] = t13;
            __koru_store_mats.t20[__koru_new_row] = t20;
            __koru_store_mats.t21[__koru_new_row] = t21;
            __koru_store_mats.t22[__koru_new_row] = t22;
            __koru_store_mats.t23[__koru_new_row] = t23;
            __koru_store_mats.t30[__koru_new_row] = t30;
            __koru_store_mats.t31[__koru_new_row] = t31;
            __koru_store_mats.t32[__koru_new_row] = t32;
            __koru_store_mats.t33[__koru_new_row] = t33;
            __koru_store_mats.o00[__koru_new_row] = o00;
            __koru_store_mats.o01[__koru_new_row] = o01;
            __koru_store_mats.o02[__koru_new_row] = o02;
            __koru_store_mats.o03[__koru_new_row] = o03;
            __koru_store_mats.o10[__koru_new_row] = o10;
            __koru_store_mats.o11[__koru_new_row] = o11;
            __koru_store_mats.o12[__koru_new_row] = o12;
            __koru_store_mats.o13[__koru_new_row] = o13;
            __koru_store_mats.o20[__koru_new_row] = o20;
            __koru_store_mats.o21[__koru_new_row] = o21;
            __koru_store_mats.o22[__koru_new_row] = o22;
            __koru_store_mats.o23[__koru_new_row] = o23;
            __koru_store_mats.o30[__koru_new_row] = o30;
            __koru_store_mats.o31[__koru_new_row] = o31;
            __koru_store_mats.o32[__koru_new_row] = o32;
            __koru_store_mats.o33[__koru_new_row] = o33;
            __koru_store_mats.det[__koru_new_row] = det;
            __koru_store_mats.len += 1;
            return;

        }
    };
    pub const __store_apply_mats_event = struct {
        pub const Input = struct {
            row: usize,
            field: i64,
            value_0: f64,
            value_1: f64,
            value_2: f64,
            value_3: f64,
            value_4: f64,
            value_5: f64,
            value_6: f64,
            value_7: f64,
            value_8: f64,
            value_9: f64,
            value_10: f64,
            value_11: f64,
            value_12: f64,
            value_13: f64,
            value_14: f64,
            value_15: f64,
            value_16: f64,
            value_17: f64,
            value_18: f64,
            value_19: f64,
            value_20: f64,
            value_21: f64,
            value_22: f64,
            value_23: f64,
            value_24: f64,
            value_25: f64,
            value_26: f64,
            value_27: f64,
            value_28: f64,
            value_29: f64,
            value_30: f64,
            value_31: f64,
            value_32: f64,
        };
        pub const Output = union(enum(u8)) {
            t00: f64,
            t01: f64,
            t02: f64,
            t03: f64,
            t10: f64,
            t11: f64,
            t12: f64,
            t13: f64,
            t20: f64,
            t21: f64,
            t22: f64,
            t23: f64,
            t30: f64,
            t31: f64,
            t32: f64,
            t33: f64,
            o00: f64,
            o01: f64,
            o02: f64,
            o03: f64,
            o10: f64,
            o11: f64,
            o12: f64,
            o13: f64,
            o20: f64,
            o21: f64,
            o22: f64,
            o23: f64,
            o30: f64,
            o31: f64,
            o32: f64,
            o33: f64,
            det: f64,
        };
        pub inline fn handler(__koru_event_input: @This().Input) @This().Output {
            return __koru_handler_impl(__koru_event_input.row, __koru_event_input.field, __koru_event_input.value_0, __koru_event_input.value_1, __koru_event_input.value_2, __koru_event_input.value_3, __koru_event_input.value_4, __koru_event_input.value_5, __koru_event_input.value_6, __koru_event_input.value_7, __koru_event_input.value_8, __koru_event_input.value_9, __koru_event_input.value_10, __koru_event_input.value_11, __koru_event_input.value_12, __koru_event_input.value_13, __koru_event_input.value_14, __koru_event_input.value_15, __koru_event_input.value_16, __koru_event_input.value_17, __koru_event_input.value_18, __koru_event_input.value_19, __koru_event_input.value_20, __koru_event_input.value_21, __koru_event_input.value_22, __koru_event_input.value_23, __koru_event_input.value_24, __koru_event_input.value_25, __koru_event_input.value_26, __koru_event_input.value_27, __koru_event_input.value_28, __koru_event_input.value_29, __koru_event_input.value_30, __koru_event_input.value_31, __koru_event_input.value_32);
        }
        fn __koru_handler_impl(__koru_p_0: usize, __koru_p_1: i64, __koru_p_2: f64, __koru_p_3: f64, __koru_p_4: f64, __koru_p_5: f64, __koru_p_6: f64, __koru_p_7: f64, __koru_p_8: f64, __koru_p_9: f64, __koru_p_10: f64, __koru_p_11: f64, __koru_p_12: f64, __koru_p_13: f64, __koru_p_14: f64, __koru_p_15: f64, __koru_p_16: f64, __koru_p_17: f64, __koru_p_18: f64, __koru_p_19: f64, __koru_p_20: f64, __koru_p_21: f64, __koru_p_22: f64, __koru_p_23: f64, __koru_p_24: f64, __koru_p_25: f64, __koru_p_26: f64, __koru_p_27: f64, __koru_p_28: f64, __koru_p_29: f64, __koru_p_30: f64, __koru_p_31: f64, __koru_p_32: f64, __koru_p_33: f64, __koru_p_34: f64) 

... [truncated - 76KB total]
Emitted C# source
static class main_module {
  public static void __koru_stdout_write(dynamic s) => global::System.Console.Out.Write(s);
  public static void __koru_stderr_write(dynamic s) => global::System.Console.Error.Write(s);
  // The mutable handle carrier — `*String`-style resources are
  // `new __KoruBox { data = … }` because C# anonymous types are
  // read-only: `s.data = …` (std/string append/clear, handle
  // mutation generally) needs a settable member.
  public class __KoruBox { public dynamic data; }
  // Textification for `{{ … }}` operands: C# bool ToStrings as
  // `True` where Koru prints `true`, and the operand's static type
  // is unknown at this boundary — a `(x) is bool` inline test would
  // be a compile error on statically-typed operands instead. Generic
  // on purpose: `dynamic` boxed every value-type operand — measured
  // ~1s/10M elements on 012_threat_scanner — while T specializes to
  // the operand's own ToString() with no box.
  public static string __koru_str<T>(T v) => v is bool b ? (b ? "true" : "false") : v?.ToString();
  // std/store: plural store 'mats' created (SoA cell + insert/query/write/take/stripe units); fields t00: f64, t01: f64, t02: f64, t03: f64, t10: f64, t11: f64, t12: f64, t13: f64, t20: f64, t21: f64, t22: f64, t23: f64, t30: f64, t31: f64, t32: f64, t33: f64, o00: f64, o01: f64, o02: f64, o03: f64, o10: f64, o11: f64, o12: f64, o13: f64, o20: f64, o21: f64, o22: f64, o23: f64, o30: f64, o31: f64, o32: f64, o33: f64, det: f64
  static class __koru_store_mats {
    public static double[] t00 = new double[2];
    public static double[] t01 = new double[2];
    public static double[] t02 = new double[2];
    public static double[] t03 = new double[2];
    public static double[] t10 = new double[2];
    public static double[] t11 = new double[2];
    public static double[] t12 = new double[2];
    public static double[] t13 = new double[2];
    public static double[] t20 = new double[2];
    public static double[] t21 = new double[2];
    public static double[] t22 = new double[2];
    public static double[] t23 = new double[2];
    public static double[] t30 = new double[2];
    public static double[] t31 = new double[2];
    public static double[] t32 = new double[2];
    public static double[] t33 = new double[2];
    public static double[] o00 = new double[2];
    public static double[] o01 = new double[2];
    public static double[] o02 = new double[2];
    public static double[] o03 = new double[2];
    public static double[] o10 = new double[2];
    public static double[] o11 = new double[2];
    public static double[] o12 = new double[2];
    public static double[] o13 = new double[2];
    public static double[] o20 = new double[2];
    public static double[] o21 = new double[2];
    public static double[] o22 = new double[2];
    public static double[] o23 = new double[2];
    public static double[] o30 = new double[2];
    public static double[] o31 = new double[2];
    public static double[] o32 = new double[2];
    public static double[] o33 = new double[2];
    public static double[] det = new double[2];
    public static long len = 0;
    public static long __koru_brand = -1;
}

  public static class __store_insert_mats_event {
    public struct Input {
      public double t00;
      public double t01;
      public double t02;
      public double t03;
      public double t10;
      public double t11;
      public double t12;
      public double t13;
      public double t20;
      public double t21;
      public double t22;
      public double t23;
      public double t30;
      public double t31;
      public double t32;
      public double t33;
      public double o00;
      public double o01;
      public double o02;
      public double o03;
      public double o10;
      public double o11;
      public double o12;
      public double o13;
      public double o20;
      public double o21;
      public double o22;
      public double o23;
      public double o30;
      public double o31;
      public double o32;
      public double o33;
      public double det;
      public long __site_line;
    }
    public static dynamic handler(Input __koru_input) {
      var t00 = __koru_input.t00;
      var t01 = __koru_input.t01;
      var t02 = __koru_input.t02;
      var t03 = __koru_input.t03;
      var t10 = __koru_input.t10;
      var t11 = __koru_input.t11;
      var t12 = __koru_input.t12;
      var t13 = __koru_input.t13;
      var t20 = __koru_input.t20;
      var t21 = __koru_input.t21;
      var t22 = __koru_input.t22;
      var t23 = __koru_input.t23;
      var t30 = __koru_input.t30;
      var t31 = __koru_input.t31;
      var t32 = __koru_input.t32;
      var t33 = __koru_input.t33;
      var o00 = __koru_input.o00;
      var o01 = __koru_input.o01;
      var o02 = __koru_input.o02;
      var o03 = __koru_input.o03;
      var o10 = __koru_input.o10;
      var o11 = __koru_input.o11;
      var o12 = __koru_input.o12;
      var o13 = __koru_input.o13;
      var o20 = __koru_input.o20;
      var o21 = __koru_input.o21;
      var o22 = __koru_input.o22;
      var o23 = __koru_input.o23;
      var o30 = __koru_input.o30;
      var o31 = __koru_input.o31;
      var o32 = __koru_input.o32;
      var o33 = __koru_input.o33;
      var det = __koru_input.det;
      var __site_line = __koru_input.__site_line;
      if (__koru_store_mats.len >= 2) throw new global::System.Exception("std/store: store 'mats' is full (capacity 2) - declared capacity and the `| full` branch are pinned at 690_011");
      long __koru_new_row = __koru_store_mats.len;
      __koru_store_mats.t00[__koru_new_row] = t00;
      __koru_store_mats.t01[__koru_new_row] = t01;
      __koru_store_mats.t02[__koru_new_row] = t02;
      __koru_store_mats.t03[__koru_new_row] = t03;
      __koru_store_mats.t10[__koru_new_row] = t10;
      __koru_store_mats.t11[__koru_new_row] = t11;
      __koru_store_mats.t12[__koru_new_row] = t12;
      __koru_store_mats.t13[__koru_new_row] = t13;
      __koru_store_mats.t20[__koru_new_row] = t20;
      __koru_store_mats.t21[__koru_new_row] = t21;
      __koru_store_mats.t22[__koru_new_row] = t22;
      __koru_store_mats.t23[__koru_new_row] = t23;
      __koru_store_mats.t30[__koru_new_row] = t30;
      __koru_store_mats.t31[__koru_new_row] = t31;
      __koru_store_mats.t32[__koru_new_row] = t32;
      __koru_store_mats.t33[__koru_new_row] = t33;
      __koru_store_mats.o00[__koru_new_row] = o00;
      __koru_store_mats.o01[__koru_new_row] = o01;
      __koru_store_mats.o02[__koru_new_row] = o02;
      __koru_store_mats.o03[__koru_new_row] = o03;
      __koru_store_mats.o10[__koru_new_row] = o10;
      __koru_store_mats.o11[__koru_new_row] = o11;
      __koru_store_mats.o12[__koru_new_row] = o12;
      __koru_store_mats.o13[__koru_new_row] = o13;
      __koru_store_mats.o20[__koru_new_row] = o20;
      __koru_store_mats.o21[__koru_new_row] = o21;
      __koru_store_mats.o22[__koru_new_row] = o22;
      __koru_store_mats.o23[__koru_new_row] = o23;
      __koru_store_mats.o30[__koru_new_row] = o30;
      __koru_store_mats.o31[__koru_new_row] = o31;
      __koru_store_mats.o32[__koru_new_row] = o32;
      __koru_store_mats.o33[__koru_new_row] = o33;
      __koru_store_mats.det[__koru_new_row] = det;
      __koru_store_mats.len += 1;

      return default;

    }
  }
  public static class __store_apply_mats_event {
    public struct Input {
      public long row;
      public long field;
      public double value_0;
      public double value_1;
      public double value_2;
      public double value_3;
      public double value_4;
      public double value_5;
      public double value_6;
      public double value_7;
      public double value_8;
      public double value_9;
      public double value_10;
      public double value_11;
      public double value_12;
      public double value_13;
      public double value_14;
      public double value_15;
      public double value_16;
      public double value_17;
      public double value_18;
      public double value_19;
      public double value_20;
      public double value_21;
      public double value_22;
      public double value_23;
      public double value_24;
      public double value_25;
      public double value_26;
      public double value_27;
      public double value_28;
      public double value_29;
      public double value_30;
      public double value_31;
      public double value_32;
    }
    public struct Output {
      public string tag;
      public double t00;
      public double t01;
      public double t02;
      public double t03;
      public double t10;
      public double t11;
      public double t12;
      public double t13;
      public double t20;
      public double t21;
      public double t22;
      public double t23;
      public double t30;
      public double t31;
      public double t32;
      public double t33;
      public double o00;
      public double o01;
      public double o02;
      public double o03;
      public double o10;
      public double o11;
      public double o12;
      public double o13;
      public double o20;
      public double o21;
      public double o22;
      public double o23;
      public double o30;
      public double o31;
      public double o32;
      public double o33;
      public double det;
    }
    public static Output handler(Input __koru_input) {
      var row = __koru_input.row;
      var field = __koru_input.field;
      var value_0 = __koru_input.value_0;
      var value_1 = __koru_input.value_1;
      var value_2 = __koru_input.value_2;
      var value_3 = __koru_input.value_3;
      var value_4 = __koru_input.value_4;
      var value_5 = __koru_input.value_5;
      var value_6 = __koru_input.value_6;
      var value_7 = __koru_input.value_7;
      var value_8 = __koru_input.value_8;
      var value_9 = __koru_input.value_9;
      var value_10 = __koru_input.value_10;
      var value_11 = __koru_input.value_11;
      var value_12 = __koru_input.value_12;
      var value_13 = __koru_input.value_13;
      var value_14 = __koru_input.value_14;
      var value_15 = __koru_input.value_15;
      var value_16 = __koru_input.value_16;
      var value_17 = __koru_input.value_17;
      var value_18 = __koru_input.value_18;
      var value_19 = __koru_input.value_19;
      var value_20 = __koru_input.value_20;
      var value_21 = __koru_input.value_21;
      var value_22 = __koru_input.value_22;
      var value_23 = __koru_input.value_23;
      var value_24 = __koru_input.value_24;
      var value_25 = __koru_input.value_25;
      var value_26 = __koru_input.value_26;
      var value_27 = __koru_input.value_27;
      var value_28 = __koru_input.value_28;
      var value_29 = __koru_input.value_29;
      var value_30 = __koru_input.value_30;
      var value_31 = __koru_input.value_31;
      var value_32 = __koru_input.value_32;
      var __koru_r = row;
      switch (field) {
      case 0: { __koru_store_mats.t00[__koru_r] = value_0; return new Output { tag = "t00", t00 = value_0 }; }
      case 1: { __koru_store_mats.t01[__koru_r] = value_1; return new Output { tag = "t01", t01 = value_1 }; }
      case 2: { __koru_store_mats.t02[__koru_r] = value_2; return new Output { tag = "t02", t02 = value_2 }; }
      case 3: { __koru_store_mats.t03[__koru_r] = value_3; return new Output { tag = "t03", t03 = value_3 }; }
      case 4: { __koru_store_mats.t10[__koru_r] = value_4; return new Output { tag = "t10", t10 = value_4 }; }
      case 5: { __koru_store_mats.t11[__koru_r] = value_5; return new Output { tag = "t11", t11 = value_5 }; }
      case 6: { __koru_store_mats.t12[__koru_r] = value_6; return new Output { tag = "t12", t12 = value_6 }; }
      case 7: { __koru_store_mats.t13[__koru_r] = value_7; return new Output { tag = "t13", t13 = value_7 }; }
      case 8: { __koru_store_mats.t20[__koru_r] = value_8; return new Output { tag = "t20", t20 = value_8 }; }
      case 9: { __koru_store_mats.t21[__koru_r] = value_9; return new Output { tag = "t21", t21 = value_9 }; }
      case 10: { __koru_store_mats.t22[__koru_r] = value_10; return new Output { tag = "t22", t22 = value_10 }; }
      case 11: { __koru_store_mats.t23[__koru_r] = value_11; return new Output { tag = "t23", t23 = value_11 }; }
      case 12: { __koru_store_mats.t30[__koru_r] = value_12; return new Output { tag = "t30", t30 = value_12 }; }
      case 13: { __koru_store_mats.t31[__koru_r] = value_13; return new Output { tag = "t31", t31 = value_13 }; }
      case 14: { __koru_store_mats.t32[__koru_r] = value_14; return new Output { tag = "t32", t32 = value_14 }; }
      case 15: { __koru_store_mats.t33[__koru_r] = value_15; return new Output { tag = "t33", t33 = value_15 }; }
      case 16: { __koru_store_mats.o00[__koru_r] = value_16; return new Output { tag = "o00", o00 = value_16 }; }
      case 17: { __koru_store_mats.o01[__koru_r] = value_17; return new Output { tag = "o01", o01 = value_17 }; }
      case 18: { __koru_store_mats.o02[__koru_r] = value_18; return new Output { tag = "o02", o02 = value_18 }; }
      case 19: { __koru_store_mats.o03[__koru_r] = value_19; return new Output { tag = "o03", o03 = value_19 }; }
      case 20: { __koru_store_mats.o10[__koru_r] = value_20; return new Output { tag = "o10", o10 = value_20 }; }
      case 21: { __koru_store_mats.o11[__koru_r] = value_21; return new Output { tag = "o11", o11 = value_21 }; }
      case 22: { __koru_store_mats.o12[__koru_r] = value_22; return new Output { tag = "o12", o12 = value_22 }; }
      case 23: { __koru_store_mats.o13[__koru_r] = value_23; return new Output { tag = "o13", o13 = value_23 }; }
      case 24: { __koru_store_mats.o20[__koru_r] = value_24; return new Output { tag = "o20", o20 = value_24 }; }
      case 25: { __koru_store_mats.o21[__koru_r] = value_25; return new Output { tag = "o21", o21 = value_25 }; }
      case 26: { __koru_store_mats.o22[__koru_r] = value_26; return new Output { tag = "o22", o22 = value_26 }; }
      case 27: { __koru_store_mats.o23[__koru_r] = value_27; return new Output { tag = "o23", o23 = value_27 }; }
      case 28: { __koru_store_mats.o30[__koru_r] = value_28; return new Output { tag = "o30", o30 = value_28 }; }
      case 29: { __koru_store_mats.o31[__koru_r] = value_29; return new Output { tag = "o31", o31 = value_29 }; }
      case 30: { __koru_store_mats.o32[__koru_r] = value_30; return new Output { tag = "o32", o32 = value_30 }; }
      case 31: { __koru_store_mats.o33[__koru_r] = value_31; return new Output { tag = "o33", o33 = value_31 }; }
      case 32: { __koru_store_mats.det[__koru_r] = value_32; return new Output { tag = "det", det = value_32 }; }
      }
      throw new global::System.Exception("__store_apply_mats: field index " + field + " is not a column of store 'mats'");

      return default;

    }
  }
  public static class __store_write_mats_event {
    public struct Input {
      public long row;
      public long field;
      public double value_0;
      public double value_1;
      public double value_2;
      public double value_3;
      public double value_4;
      public double value_5;
      public double value_6;
      public double value_7;
      public double value_8;
      public double value_9;
      public double value_10;
      public double value_11;
      public double value_12;
      public double value_13;
      public double value_14;
      public double value_15;
      public double value_16;
      public double value_17;
      public double value_18;
      public double value_19;
      public double value_20;
      public double value_21;
      public double value_22;
      public double value_23;
      public double value_24;
      public double value_25;
      public double value_26;
      public double value_27;
      public double value_28;
      public double value_29;
      public double value_30;
      public double value_31;
      public double value_32;
    }
    public static dynamic handler(Input __koru_input) {
      var row = __koru_input.row;
      var field = __koru_input.field;
      var value_0 = __koru_input.value_0;
      var value_1 = __koru_input.value_1;
      var value_2 = __koru_input.value_2;
      var value_3 = __koru_input.value_3;
      var value_4 = __koru_input.value_4;
      var value_5 = __koru_input.value_5;
      var value_6 = __koru_input.value_6;
      var value_7 = __koru_input.value_7;
      var value_8 = __koru_input.value_8;
      var value_9 = __koru_input.value_9;
      var value_10 = __koru_input.value_10;
      var value_11 = __koru_input.value_11;
      var value_12 = __koru_input.value_12;
      var value_13 = __koru_input.value_13;
      var value_14 = __koru_input.value_14;
      var value_15 = __koru_input.value_15;
      var value_16 = __koru_input.value_16;
      var value_17 = __koru_input.value_17;
      var value_18 = __koru_input.value_18;
      var value_19 = __koru_input.value_19;
      var value_20 = __koru_input.value_20;
      var value_21 = __koru_input.value_21;
      var value_22 = __koru_input.value_22;
      var value_23 = __koru_input.value_23;
      var value_24 = __koru_input.value_24;
      var value_25 = __koru_input.value_25;
      var value_26 = __koru_input.value_26;
      var value_27 = __koru_input.value_27;
      var value_28 = __koru_input.value_28;
      var value_29 = __koru_input.value_29;
      var value_30 = __koru_input.value_30;
      var value_31 = __koru_input.value_31;
      var value_32 = __koru_input.value_32;
      var result_0 = main_module.__store_apply_mats_event.handler(new __store_apply_mats_event.Input { row = (long)(row), field = (long)(field), value_0 = (double)(value_0), value_1 = (double)(value_1), value_2 = (double)(value_2), value_3 = (double)(value_3), value_4 = (double)(value_4), value_5 = (double)(value_5), value_6 = (double)(value_6), value_7 = (double)(value_7), value_8 = (double)(value_8), value_9 = (double)(value_9), value_10 = (double)(value_10), value_11 = (double)(value_11), value_12 = (double)(value_12), value_13 = (double)(value_13), value_14 = (double)(value_14), value_15 = (double)(value_15), value_16 = (double)(value_16), value_17 = (double)(value_17), value_18 = (double)(value_18), value_19 = (double)(value_19), value_20 = (double)(value_20), value_21 = (double)(value_21), value_22 = (double)(value_22), value_23 = (double)(value_23), value_24 = (double)(value_24), value_25 = (double)(value_25), value_26 = (double)(value_26), value_27 = (double)(value_27), value_28 = (double)(value_28), value_29 = (double)(value_29), value_30 = (double)(value_30), value_31 = (double)(value_31), value_32 = (double)(value_32)});
      if (result_0.tag == "t00") {
        var _auto_6 = result_0.t00;
      }
      if (result_0.tag == "t01") {
        var _auto_7 = result_0.t01;
      }
      if (result_0.tag == "t02") {
        var _auto_8 = result_0.t02;
      }
      if (result_0.tag == "t03") {
        var _auto_9 = result_0.t03;
      }
      if (result_0.tag == "t10") {
        var _auto_10 = result_0.t10;
      }
      if (result_0.tag == "t11") {
        var _auto_11 = result_0.t11;
      }
      if (result_0.tag == "t12") {
        var _auto_12 = result_0.t12;
      }
      if (result_0.tag == "t13") {
        var _auto_13 = result_0.t13;
      }
      if (result_0.tag == "t20") {
        var _auto_14 = result_0.t20;
      }
      if (result_0.tag == "t21") {
        var _auto_15 = result_0.t21;
      }
      if (result_0.tag == "t22") {
        var _auto_16 = result_0.t22;
      }
      if (result_0.tag == "t23") {
        var _auto_17 = result_0.t23;
      }
      if (result_0.tag == "t30") {
        var _auto_18 = result_0.t30;
      }
      if (result_0.tag == "t31") {
        var _auto_19 = result_0.t31;
      }
      if (result_0.tag == "t32") {
        var _auto_20 = result_0.t32;
      }
      if (result_0.tag == "t33") {
        var _auto_21 = result_0.t33;
      }
      if (result_0.tag == "o00") {
        var _auto_22 = result_0

... [truncated - 57KB total]

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (mats, capacity: 2, source: t00: f64, t01: f64, t02: f64, t03: f64, t10: f64, t11: f64, t12: f64, t13: f64, t20: f64, t21: f64, t22: f64, t23: f64, t30: f64, t31: f64, t32: f64, t33: f64, o00: f64, o01: f64, o02: f64, o03: f64, o10: f64, o11: f64, o12: f64, o13: f64, o20: f64, o21: f64, o22: f64, o23: f64, o30: f64, o31: f64, o32: f64, o33: f64, det: f64)
flow ~insert click a branch to expand · @labels scroll to their anchor
insert (mats, source: t00: -3.0, t01: -3.0, t02: 2.0, t03: -3.0, t10: 2.0, t11: -3.0, t12: -1.0, t13: -3.0, t20: -1.0, t21: -1.0, t22: 2.0, t23: 2.0, t30: 1.0, t31: 2.0, t32: -3.0, t33: -3.0, o00: 0.0, o01: 0.0, o02: 0.0, o03: 0.0, o10: 0.0, o11: 0.0, o12: 0.0, o13: 0.0, o20: 0.0, o21: 0.0, o22: 0.0, o23: 0.0, o30: 0.0, o31: 0.0, o32: 0.0, o33: 0.0, det: 0.0)
flow ~query click a branch to expand · @labels scroll to their anchor
query (mats)
flow ~query click a branch to expand · @labels scroll to their anchor
query (mats)

Test Configuration

MUST_RUN LANGUAGES: zig cs