Files
Guoliang ChenandClaude Mythos 5.2 e229ff9668 Round 7: linter hardening — missing-port-direction, nested incomplete-assignment, option/regex safety (#41)
New Error-class rule missing-port-direction (75 rules) closes topo #41.
incomplete-assignment walks every path and accepts an enumerated case only
when the selector width is proven. suspicious-semicolon exempts the
while-drain idiom; mismatched-labels reads statement labels and gains an
Unsafe footer fix. Quote-aware option list splitter; regex nesting cap.
The uvm-macro-semicolon autofix was withdrawn after three QA failures and
the instance-shadowing exemption reverted. Files topo #67 (lucisv.toml
array splitting).

Co-Authored-By: Claude Mythos 5.2 <[email protected]>
2026-11-26 16:32:41 -08:00

99 lines
2.2 KiB
Plaintext

# a packed dimension that counts upwards
#select packed-dimensions-range-ordering
module m;
logic [0:7] up;
//^ 9 packed-dimensions-range-ordering
logic [0:WIDTH-1] also_up;
//^ 9 packed-dimensions-range-ordering
endmodule
====
# the decreasing form, a one-bit range, and an unpacked array
#select packed-dimensions-range-ordering
module m;
logic [7:0] down;
logic [WIDTH-1:0] symbolic;
logic [0:0] one_bit;
logic [LO:HI] unknowable;
logic ascending_array [0:3];
endmodule
====
# a negative constant written into a dimension
#select forbid-negative-array-dim
module m;
logic [-1:0] v;
//^ 10 forbid-negative-array-dim
logic q [-1];
//^ 12 forbid-negative-array-dim
endmodule
====
# a subtraction is not a negative literal
#select forbid-negative-array-dim
module m;
logic [WIDTH-1:0] v;
logic q [DEPTH];
parameter int P = -1;
endmodule
====
# an untyped formal is a one-bit logic
#select explicit-function-task-parameter-type
module m;
function void f(input a);
//^ 19 explicit-function-task-parameter-type
endfunction
endmodule
====
# a continuation formal inherits the type in force
#select explicit-function-task-parameter-type
module m;
function void f(input int a, b);
endfunction
task t(input logic [7:0] c);
endtask
endmodule
====
# a positional connection list of more than one port
#select module-port
module m;
sub u_sub (a, b, c);
//^ 7 module-port
endmodule
====
# named connections, a wildcard, and a single positional one
#select module-port
module m;
sub u1 (.a(x), .b(y));
sub u2 (.*);
sub u3 (a);
sub u4 ();
endmodule
====
# more than one positional parameter override
#select module-parameter
module m;
sub #(8, 4) u_sub ();
//^ 3 module-parameter
endmodule
====
# named overrides, and a single positional one
#select module-parameter
module m;
sub #(.Width(8), .Depth(4)) u1 ();
sub #(8) u2 ();
sub u3 ();
endmodule
====
# a non-ANSI header port whose body declaration was deleted (§2.9 row 41)
#select missing-port-direction
module k (a, b, c);
//^ 11 missing-port-direction
output b;
input logic c;
endmodule
====
# every non-ANSI header port has a body direction
#select missing-port-direction
module k (a, b);
input a;
output logic [3:0] b;
endmodule