Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion StrataMain.lean
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,21 @@ def pyAnalyzeLaurelCommand : Command where
let coreProgram ←
match coreProgramOption with
| none =>
exitPyAnalyzeInternalError s!"Laurel to Core translation failed: {laurelTranslateErrors}"
let msg := s!"Laurel to Core translation failed: {laurelTranslateErrors}"
-- Classify by worst-severity diagnostic: StrataBug (tool bug) outranks
-- UserError (user-actionable) outranks NotYetImplemented (wait-for-support).
-- An empty list or warnings-only failure with `coreProgramOption = none`
-- is itself a tool bug (translation should not silently fail).
if laurelTranslateErrors.isEmpty
∨ laurelTranslateErrors.any (·.type == .StrataBug) then
exitPyAnalyzeInternalError msg
else if laurelTranslateErrors.any (·.type == .UserError) then
exitPyAnalyzeUserError msg
else if laurelTranslateErrors.any (·.type == .NotYetImplemented) then
exitPyAnalyzeKnownLimitation msg
Comment thread
julesmt marked this conversation as resolved.
else
-- Only warnings, but translation failed → unexpected.
exitPyAnalyzeInternalError msg
| some core => pure core

if verbose then
Expand Down
Loading