WIP on agent-generated ctime specs#46
Conversation
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 64a8e0d |
| fmdeps/BRiCk/ | main | 9ebe298 |
| fmdeps/auto/ | main | e77b825 |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | 6c1999f |
| fmdeps/ci/ | main | 41c7609 |
| vendored/elpi/ | skylabs-master | aa4475f |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123482.6 | 123482.6 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100845.8 | 100845.8 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123482.6 | 123482.6 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100845.8 | 100845.8 | +0.0 | └ proofs and tests |
gmalecha-at-skylabs
left a comment
There was a problem hiding this comment.
Looks nice!
| @@ -0,0 +1,44 @@ | |||
| (* | |||
| * Copyright (c) 2025 SkyLabs AI, Inc. | |||
There was a problem hiding this comment.
| * Copyright (c) 2025 SkyLabs AI, Inc. | |
| * Copyright (c) 2026 SkyLabs AI, Inc. |
| @@ -0,0 +1,49 @@ | |||
| (* | |||
| * Copyright (c) 2025 SkyLabs AI, Inc. | |||
There was a problem hiding this comment.
| * Copyright (c) 2025 SkyLabs AI, Inc. | |
| * Copyright (c) 2026 SkyLabs AI, Inc. |
| Definition clock_t_model := Z. | ||
| Definition time_t_model := Z. | ||
|
|
||
| Parameter clock_result : clock_t_model -> Prop. |
There was a problem hiding this comment.
Maybe prefer naming this clock_t_wf or something like that?
| \post{t}[Vint t] | ||
| [| current_time_result t |] ** | ||
| if bool_decide (timer_p = nullptr) then emp | ||
| else timer_p |-> primR Tlong 1$m (Vint t)). |
There was a problem hiding this comment.
Would it make sense to have a notation for time_tR?
| Parameter tmR_hidden : | ||
| cQp.t -> tm_model -> Z -> cstring.t -> Rep. | ||
| #[only(type_ptr="tm", cfracsplittable)] derive tmR_hidden. |
There was a problem hiding this comment.
Most of these are "obvious", but I don't really understand this one. It doesn't seem like the Z and cstring.t are relevant.
There was a problem hiding this comment.
grep finds the answer in design.md:
tmRhides non-standardtm_gmtoffandtm_zonefields behindtmR_hidden, whiletimespecRtracks onlytv_secandtv_nsec.
See the source code:
/* ISO C `broken-down time' structure. */
struct tm
{
int tm_sec; /* Seconds. [0-60] (1 leap second) */
int tm_min; /* Minutes. [0-59] */
int tm_hour; /* Hours. [0-23] */
int tm_mday; /* Day. [1-31] */
int tm_mon; /* Month. [0-11] */
int tm_year; /* Year - 1900. */
int tm_wday; /* Day of week. [0-6] */
int tm_yday; /* Days in year.[0-365] */
int tm_isdst; /* DST. [-1/0/1]*/
# ifdef __USE_MISC
long int tm_gmtoff; /* Seconds east of UTC. */
const char *tm_zone; /* Timezone abbreviation. */
# else
long int __tm_gmtoff; /* Seconds east of UTC. */
const char *__tm_zone; /* Timezone abbreviation. */
# endif
};However, this is "malicious genie" compliance: the agent executed the plan, and since the plan forgets other fields, so did the agent.
Definition tmR (q : cQp.t) (tm : tm_model) : Rep :=
Exists gmtoff zone,
tmR_hidden q tm gmtoff zone.
But the fix was easy
Please review again tmR, against both the plan and its job.
The agent even realized that, since tmR_hidden exposes a cstring.t model, it must owns the actual string, which is questionable. The agent correctly suggested exposing a ptr. I suggested exposing nothing to defer the whole question — it turns out this field points to static storage so the discipline requires more care.
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 64a8e0d |
| fmdeps/BRiCk/ | main | 9ebe298 |
| fmdeps/auto/ | main | e77b825 |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | 6c1999f |
| fmdeps/ci/ | main | 41c7609 |
| vendored/elpi/ | skylabs-master | aa4475f |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123482.6 | 123482.6 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100845.8 | 100845.8 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123482.6 | 123482.6 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100845.8 | 100845.8 | +0.0 | └ proofs and tests |
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 64a8e0d |
| fmdeps/BRiCk/ | main | 594f065 |
| fmdeps/auto/ | main | e77b825 |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | 6c1999f |
| fmdeps/ci/ | main | 41c7609 |
| vendored/elpi/ | skylabs-master | aa4475f |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123490.4 | 123490.4 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123490.4 | 123490.4 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
| \prepost{q tm_in} tm_p |-> tmR q tm_in | ||
| \post{t}[Vint t] | ||
| Exists tm_out, | ||
| [| mktime_result tm_in tm_out t |] ** | ||
| tm_p |-> tmR q tm_out). |
There was a problem hiding this comment.
Buggy! I only noticed because tmR_learnable broke some client proof.
| if bool_decide (res = nullptr) then emp | ||
| else Exists out, | ||
| [| asctime_text_of tm out |] ** | ||
| [| cstring.size out = 25 |] ** |
| [| utc_time_to_tm t tm |] ** | ||
| res |-> tmR (cQp.const qret) tm ** | ||
| □ (Forall (qret' : Qp), | ||
| res |-> tmR (cQp.const qret') tm ={⊤}=∗ emp)). |
There was a problem hiding this comment.
String-like borrowing 👀
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 64a8e0d |
| fmdeps/BRiCk/ | main | 594f065 |
| fmdeps/auto/ | main | e77b825 |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | 6c1999f |
| fmdeps/ci/ | main | 41c7609 |
| vendored/elpi/ | skylabs-master | aa4475f |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123490.4 | 123490.4 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| +0.00% | 123490.4 | 123490.4 | +0.0 | total |
| +0.00% | 22636.8 | 22636.8 | +0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 64a8e0d |
| fmdeps/BRiCk/ | main | 594f065 |
| fmdeps/auto/ | main | e77b825 |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | 6c1999f |
| fmdeps/ci/ | main | 41c7609 |
| vendored/elpi/ | skylabs-master | aa4475f |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123490.4 | 123490.4 | -0.0 | total |
| -0.00% | 22636.8 | 22636.8 | -0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123490.4 | 123490.4 | -0.0 | total |
| -0.00% | 22636.8 | 22636.8 | -0.0 | ├ translation units |
| +0.00% | 100853.6 | 100853.6 | +0.0 | └ proofs and tests |
> To fix the fatal failure, switch from `verify[module]` to `verify?[module]`, like you did before.
9ce6863 to
ce49386
Compare
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | 6d9572d |
| fmdeps/BRiCk/ | main | ceb6c7b |
| fmdeps/auto/ | main | d39dc2d |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | e1da62f |
| fmdeps/ci/ | main | f2d3e2d |
| vendored/elpi/ | skylabs-master | aa4475f |
| vendored/flocq/ | skylabs-master | cf9cc84 |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | 451fcaa |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | f283f23 |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 61c9d23 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 7c3aae7 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123301.6 | 123301.6 | -0.0 | total |
| -0.00% | 22636.8 | 22636.8 | -0.0 | ├ translation units |
| +0.00% | 100664.8 | 100664.8 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123301.6 | 123301.6 | -0.0 | total |
| -0.00% | 22636.8 | 22636.8 | -0.0 | ├ translation units |
| +0.00% | 100664.8 | 100664.8 | +0.0 | └ proofs and tests |
CI summary (Details)Active Repos
|
| Repo | Job Branch | Job Commit |
|---|---|---|
| ./ | main | e8e81bb |
| fmdeps/BRiCk/ | main | e219b6b |
| fmdeps/auto/ | main | 26885ed |
| fmdeps/auto-docs/ | main | 9f57097 |
| bluerock/NOVA/ | skylabs-proof | e9a69cc |
| bluerock/bhv/ | skylabs-main | e1da62f |
| fmdeps/ci/ | main | 749706e |
| vendored/elpi/ | skylabs-master | aa4475f |
| vendored/flocq/ | skylabs-master | cf9cc84 |
| fmdeps/fm-ci/ | main | 262fb04 |
| fmdeps/fm-tools/ | main | e17f6db |
| psi/protos/ | main | 8fe3e7c |
| psi/backend/ | main | a5fa400 |
| psi/ide/ | main | 6b596cf |
| psi/data/ | main | 76acc2f |
| vendored/rocq/ | skylabs-master | 2ede3c9 |
| fmdeps/rocq-agent-toolkit/ | main | 3bed8c2 |
| vendored/rocq-elpi/ | skylabs-master | 103a742 |
| vendored/rocq-equations/ | skylabs-main | a8c4832 |
| vendored/rocq-ext-lib/ | skylabs-master | 94a6630 |
| vendored/rocq-iris/ | skylabs-master | 3ad4ddd |
| vendored/rocq-lsp/ | skylabs-main | a8b7272 |
| vendored/rocq-stdlib/ | skylabs-master | bc07423 |
| vendored/rocq-stdpp/ | skylabs-master | e01d802 |
| fmdeps/skylabs-fm/ | main | 62d34c3 |
| vendored/vsrocq/ | skylabs-main | 5b4527e |
Performance
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123356.6 | 123356.6 | -0.0 | total |
| -0.00% | 22637.5 | 22637.5 | -0.0 | ├ translation units |
| +0.00% | 100719.1 | 100719.1 | +0.0 | └ proofs and tests |
Full Results
| Relative | Master | MR | Change | Filename |
|---|---|---|---|---|
| -0.00% | 123356.6 | 123356.6 | -0.0 | total |
| -0.00% | 22637.5 | 22637.5 | -0.0 | ├ translation units |
| +0.00% | 100719.1 | 100719.1 | +0.0 | └ proofs and tests |
Relevant to https://github.com/SkyLabsAI/agent-foundation/issues/37.