A local bound straight from another module's global (let t = thing_cur), or from such a local, is followed within its function, and a write through its field or element is listed as a warning after the counted writes. A reference from a function's result is not followed. Reseed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
448 B
Text
14 lines
448 B
Text
# tangle.ludic — the program `ludic deps` is tested on: a and b use each other (the largest cycle is
|
|
# 2), both use the leaf c (not counted), and a writes b's global b_count (one cross-module write);
|
|
# a_bump writes b_rec through a local (a warning in ludic deps --writes, not counted).
|
|
#
|
|
# Running it prints: 4
|
|
import "tangle/c"
|
|
import "tangle/a"
|
|
import "tangle/b"
|
|
program Tangle {
|
|
entry {
|
|
a_bump()
|
|
print(a_run() + b_rec.n - 1)
|
|
}
|
|
}
|