GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing yashrao10.github.io — dal-c — safety-critical C component library
dal-c library
Safety-critical C · DAL-C style dal-cFifteen reusable C99 components, each held to a Design Assurance Level C process: written requirements, requirements-based tests, 100% MC/DC, saturating arithmetic, zero dynamic memory. /* bounded PID, fixed-point, anti-windup */ sc_pid_config_t cfg = { .kp=3*ONE, .ki=ONE/8, .kd=ONE/2, .d_filter=ONE/3, .out_min=0, .out_max=100*ONE }; if (sc_pid_config_valid(&cfg) != SC_OK) return; sc_pid_init(&pid, /*out*/0, /*meas*/ y); sc_q16_t u = sc_pid_update(&cfg, &pid, setpoint, y); 100% Line cov
100% MC/DC
VERIFY PASS
15 modules 73 HLR / 182 LLR
2479 test checks 0 fail no UB · ASan + UBSan clean fuzz: 200k iters · 0 fail builds: gcc · clang · -m32 §01Components The parts listEach is one header
and one source file, dependent only on
§02Architecture How the parts fitTen components
are leaf primitives; The worked example wires six of them into one loop: a buffered, averaged sensor reading drives a demand lamp and a PID whose command is slew-limited before it reaches the plant. Full architecture — the §03Verification Evidence, not adjectives73 / 182 HLR / LLR 2479 test checks 100% statement cov 100% MC/DC clean ASan + UBSan 0 fuzz failures 3 toolchains make report
$ make report
sc_sat 8 tests 20 checks PASS
sc_fixed 7 tests 37 checks PASS
sc_crc 5 tests 16 checks PASS
sc_hysteresis 11 tests 35 checks PASS
sc_ringbuf 9 tests 74 checks PASS
sc_ratelimit 10 tests 55 checks PASS
sc_lut 6 tests 20 checks PASS
sc_debounce 6 tests 29 checks PASS
sc_sm 7 tests 38 checks PASS
sc_sched 4 tests 24 checks PASS
sc_cobs 6 tests 1081 checks PASS
sc_pid 8 tests 835 checks PASS
sc_median 9 tests 93 checks PASS
sc_vote 9 tests 69 checks PASS
sc_watchdog 9 tests 53 checks PASS
2479 checks, 0 failure(s)
Lines executed:100.00% of 543
Condition outcomes covered:100.00% of 374
Traceability: complete (every HLR has LLRs and tests;
every LLR is implemented and traced).
§04Traceability Requirement to test, both directionsEvery low-level
requirement names its parent and its implementing function; every source block
carries an Architecture — dependency graph, the state-machine framework, the example's signal flow ↗ §05How it's built
§06Use it $ make lib # -> build/libdal_c.a $ make example # builds + runs a composed control loop $ make install PREFIX=/opt/dal-c // then #include <dal_c/dal_c.h> // or one component header
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |