amos 8b7616bfd8 Batch 22 (20261027-C-hwe-hard-22): add 63 calibrated HWE hard-design tasks
From the 101 lk/man/pth code-gen sources: 63 tasks (C11 36, C++17 27,
11 canonical families), 38 skipped for scope or duplication. Each task
has at least one independent contract-edge defect, boundary types
rotate, and public docs state trap clauses as plain contract prose.
Claude reviewed 63/63 USABLE against current digests. Difficulty is
unmeasured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 16:14:57 +08:00

32 lines
731 B
C

#ifndef ARRAY_SIMULATOR_H
#define ARRAY_SIMULATOR_H
#include "array.h"
#define SIM_EVENTS 64
struct sim_pin {
int owner;
int direction;
int raw;
};
struct sim_event {
char operation;
int pin;
int raw;
int result;
};
struct simulator {
struct sim_pin pins[LB_PIN_COUNT];
struct sim_event events[SIM_EVENTS];
int event_count;
int fail_request;
int fail_direction;
int fail_write;
int request_count;
int direction_count;
int write_count;
};
void sim_init(struct simulator *sim);
void sim_frame(struct simulator *sim, int request, int direction, int write);
void sim_external(struct simulator *sim, int pin, int raw);
struct lb_bus sim_bus(struct simulator *sim);
#endif