Skip to content

Commit bc2caca

Browse files
hyperpolymathclaude
andcommitted
refactor: VCL Step 5 — -ut → -total in VCL dialect identifier
verisim-api/src/vcl.rs referenced the VCL dialect as 'vcl-ut' in VCL-UT level detection code. Renamed to 'vcl-total' matching the vql-ut → vcl-total repo rename (totality interpretation selected per Step 5, as the identifier denotes no-partiality at the type level, not type-soundness). No other -ut suffix uses remain in this repo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 56e877a commit bc2caca

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • rust-core/verisim-api/src

rust-core/verisim-api/src/vcl.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ pub struct VqlExecuteResponse {
5252
/// Optional message (e.g., for ASSERT/RETRACT confirmations).
5353
#[serde(skip_serializing_if = "Option::is_none")]
5454
pub message: Option<String>,
55-
/// VCL-UT safety level achieved (0-9), if TypeLL validation was performed.
55+
/// VCL-total safety level achieved (0-9), if TypeLL validation was performed.
5656
#[serde(skip_serializing_if = "Option::is_none")]
5757
pub safety_level: Option<u8>,
58-
/// VCL-UT query path used: "VCL (Slipstream)", "VCL-DT", or "VCL-UT".
58+
/// VCL-total query path used: "VCL (Slipstream)", "VCL-DT", or "VCL-total".
5959
#[serde(skip_serializing_if = "Option::is_none")]
6060
pub query_path: Option<String>,
6161
/// Proof obligations generated by TypeLL (for ECHIDNA dispatch).
@@ -89,7 +89,7 @@ pub async fn vcl_execute_handler(
8989
));
9090
}
9191

92-
// Pre-flight: validate with TypeLL VCL-UT checker if available.
92+
// Pre-flight: validate with TypeLL VCL-total checker if available.
9393
// This is non-blocking — if TypeLL is unreachable, we proceed without it.
9494
let typell_report = validate_with_typell(query).await;
9595

@@ -128,7 +128,7 @@ pub async fn vcl_execute_handler(
128128

129129
/// Tokenize a VCL query into whitespace-separated tokens, respecting
130130
/// quoted strings (single and double quotes).
131-
/// Validate a VCL query against TypeLL's VCL-UT 10-level type checker.
131+
/// Validate a VCL query against TypeLL's VCL-total 10-level type checker.
132132
///
133133
/// Calls the TypeLL server (default: localhost:7800) to verify the query's
134134
/// type safety level. Returns (safety_level, query_path, proof_obligations)
@@ -143,7 +143,7 @@ async fn validate_with_typell(query: &str) -> Option<(u8, String, Vec<String>)>
143143

144144
let check_body = serde_json::json!({
145145
"expression": query,
146-
"context": "{\"language\":\"vcl\",\"dialect\":\"vcl-ut\",\"features\":[\"dependent\",\"linear\",\"proof-carrying\"]}"
146+
"context": "{\"language\":\"vcl\",\"dialect\":\"vcl-total\",\"features\":[\"dependent\",\"linear\",\"proof-carrying\"]}"
147147
});
148148

149149
let client = reqwest::Client::builder()
@@ -164,14 +164,14 @@ async fn validate_with_typell(query: &str) -> Option<(u8, String, Vec<String>)>
164164

165165
let body: serde_json::Value = resp.json().await.ok()?;
166166

167-
// Extract VCL-UT level from features (e.g., "vcl-ut-l4")
167+
// Extract VCL-total level from features (e.g., "vcl-total-l4")
168168
let level = body
169169
.get("features")
170170
.and_then(|f| f.as_array())
171171
.and_then(|arr| {
172172
arr.iter().find_map(|v| {
173173
let s = v.as_str()?;
174-
if let Some(stripped) = s.strip_prefix("vcl-ut-l") {
174+
if let Some(stripped) = s.strip_prefix("vcl-total-l") {
175175
stripped.parse::<u8>().ok()
176176
} else {
177177
None
@@ -180,7 +180,7 @@ async fn validate_with_typell(query: &str) -> Option<(u8, String, Vec<String>)>
180180
})
181181
.unwrap_or(0);
182182

183-
// Extract query path from features (e.g., "path:VCL-UT")
183+
// Extract query path from features (e.g., "path:VCL-total")
184184
let path = body
185185
.get("features")
186186
.and_then(|f| f.as_array())
@@ -207,7 +207,7 @@ async fn validate_with_typell(query: &str) -> Option<(u8, String, Vec<String>)>
207207
safety_level = level,
208208
query_path = %path,
209209
obligations = obligations.len(),
210-
"TypeLL VCL-UT pre-flight check complete"
210+
"TypeLL VCL-total pre-flight check complete"
211211
);
212212

213213
Some((level, path, obligations))

0 commit comments

Comments
 (0)