The hours and the minutes of the current time, %subdt(%time: *hours) and *minutes, stay refused until their probe is captured #809
Loading…
Reference in a new issue
No description provided.
Delete branch "lsubdt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The hours and the minutes of the current time,
%subdt(%time: *hours)and*minutes, stay refused until their probe is capturedMinutes = %subdt(%time: *minutes)andHours = %subdt(%time: *hours)fail inruntimeSummary:typedReadsskips a time buffer (
width != 8), so the read of two zoned digits that follows_QRNX_TIME_DTZhas no rule.An earlier build of this branch added the rule (
0 -> *HOURS,3 -> *MINUTES) from a development program, withno public probe. A review refused that: a rule needs a red test on a public probe written for its family, and a
wrong emit is worse than a refusal. This change keeps the refusal and pins it.
Status: the family probe is not captured
pub400.com has not answered since about 09:30Z on 2026-11-15 (
nc -z -G 5 pub400.com 449fails withNetwork is unreachablefrom the Mac, while1.1.1.1:443andgithub.com:443answer;host-probe.shprintshost: no answer (NetworkUnreachable)). The batteryrequests/lsubdt/subdt(41 cases) is written and notcaptured, and no committed twin has a
%subdt(%time: ...)statement (h-now2has%subdt(%timestamp(): ...),lr3-subdt-time-secsandlr3y-time-inz-subdtread a time field). So no fact about the 8 bytes of a time restson a capture, and
rpg_source_stmt.zigis unchanged.What changed
src/rpg_source_stmt_time_test.zig: two tests, each red against the earlier rule and green on trunk.lr2-time-now, has no rule (the summary is null, so the statement keeps its failure line).+ %HOURS(1)step, a- %MINUTES(1)step or a blank padhas no rule. The earlier rule emitted all four (
%SUBDT(%TIME(): *HOURS) * 100 + %SUBDT(...), the twosteps, and
%CHAR(%SUBDT(%TIME(): *HOURS))for the pad): the loop over the reads accepted any number of themand
runtimeSummaryaccepts a step or a pad beside a time call, and no capture shows that those recompile tothe one
_QRNX_TIME_DTZcall they were taken from.src/core/rpg_source_stmt.zigequals trunk.Capture request (for the lane that finds the host up)
Capture only the two cases the rule needs, not the 41-case battery (about 41 minutes):
Then adopt
tn-handtn-m(%subdt(%time(): *hours)and*minutesintopacked(9:0)), commit the capturesunder
src/testdata/savf/SC-ILE/EXPERIMENTS/, and write the rule from the statement text that the recovery emitsfor them: one read of the two digits at the offsets that the captures show, a test that asserts the emitted line
of each twin, and the refusals above kept for a second read, a step and a pad until a capture shows them. The
cases
tn-s,tn-m-i,tnf-*,tf-*,df-*and thec-*controls decide the facts that stay refused(seconds, a time field, a
*USA,*EURor*JISbuffer, a date field in another format).Refused (unchanged)
%subdt(t: *hours)and*minutesof a time field undertimfmt(*hms:). The program converts the fieldto an *ISO work area with
_QRNX_DT_CVTand reads the digits from%CHAR(field: *ISO).runtimeSummaryrefuses a
%CHAR(of a conversion whose source is not *ISO (s19). Relaxing that site is not enough:Emitter.charReadandsubdtRead(rpg_source.zig) take a value that is exactly one digit read, and aprogram may read two in one expression (
%subdt(t: *hours) * 100 + %subdt(t: *minutes)).subdtReadisalso where the field gets its time type (
addNew). The fix is inrpg_source.zig, outside this change.*USA,*EURor*JIStime field, the digits of a date field in anon-ISO format and every
%CHAR(date: fmt)of such a field keep their failure line.Measured
Development program dev5 p2 (a fit measure, not a test), base v0.1.522 against this build (host Debug build of
this branch): failure lines 44 to 44 (222 lines of emitted source on both sides), and the emitted source is byte for byte the same. No
statement changes, because the code is the code of trunk.
Gate
90a5422adato742b9dd234