mirror of
https://github.com/allaunthefox/BioSight.git
synced 2026-07-31 03:05:22 +00:00
Added fixtures.json and test_verified_units.py. Verifies character classification classes, consistency rule maps under syntax errors, and Q16_16 parabola conjugate slopes exact outputs (large: 158217, small: -27147) and tolerance bounds matching Lean witnesses. Build: 0 failures (python3 equation_dna_encoder.py --verify)
60 lines
1.3 KiB
JSON
60 lines
1.3 KiB
JSON
{
|
|
"character_classification": [
|
|
{"char": "θ", "class": 9},
|
|
{"char": "π", "class": 9},
|
|
{"char": "λ", "class": 9},
|
|
{"char": "Δ", "class": 10},
|
|
{"char": "→", "class": 10},
|
|
{"char": "+", "class": 3},
|
|
{"char": "*", "class": 3},
|
|
{"char": "/", "class": 3},
|
|
{"char": "x", "class": 1},
|
|
{"char": "1", "class": 0}
|
|
],
|
|
"consistency_checks": [
|
|
{
|
|
"expr": "(x + 1",
|
|
"expected_dna": "TGGGTG",
|
|
"fail_rule": "balanced_parens"
|
|
},
|
|
{
|
|
"expr": "x ++ 1",
|
|
"expected_dna": "GTGGGG",
|
|
"fail_rule": "valid_operator_order"
|
|
},
|
|
{
|
|
"expr": "1x + 1",
|
|
"expected_dna": "GGGGTG",
|
|
"fail_rule": "valid_variable_name"
|
|
},
|
|
{
|
|
"expr": " ",
|
|
"expected_dna": "GGGTTG",
|
|
"fail_rule": "no_empty_expression"
|
|
},
|
|
{
|
|
"expr": "x = 1; y = 2",
|
|
"expected_dna": "GGGGTG",
|
|
"fail_rule": "single_expression"
|
|
},
|
|
{
|
|
"expr": "longvarname + 1",
|
|
"expected_dna": "GGGGGT",
|
|
"fail_rule": "defined_reference"
|
|
}
|
|
],
|
|
"fixed_point_slopes": {
|
|
"m_1_0": {
|
|
"input_scale": 65536,
|
|
"expected_slope_large": 158217,
|
|
"expected_slope_small": -27147,
|
|
"tolerance_lsb": 4
|
|
},
|
|
"m_0_0": {
|
|
"input_scale": 0,
|
|
"expected_slope_large": 65536,
|
|
"expected_slope_small": -65536,
|
|
"tolerance_lsb": 0
|
|
}
|
|
}
|
|
}
|