• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ponder-lab / Hybridize-Functions-Refactoring / #2376
81%
main: 83%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/setup-python-7
DEFAULT BRANCH: main
Ran 08 Jul 2026 01:18AM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jul 2026 01:14AM UTC coverage: 80.661% (+0.5%) from 80.202%
#2376

push

github

web-flow
Add a safety precondition for numpy applied to parameter-flowing values (#743)

* Add a parameter-flow numpy safety precondition

A function whose body (transitively) applies a numpy/scipy API to a value flowing from its parameters crashes on first call under `@tf.function` tracing, once the parameters become symbolic tensors. The gate is an SSA def-use taint slice rather than a points-to intersection: a points-to-keyed gate silently passes a crasher under any modeling gap that empties a points-to set, and this precondition exists precisely to hold while upstream modeling is in motion (wala/ML#696's generator fix re-types `compute_loss`'s parameters; this precondition is what makes that safe to absorb).

Taint policy per the design on #740: sources are the parameter value numbers (the receiver excluded for instance methods); propagation is worklist-based over def-use chains; property reads of `shape`/`dtype` launder taint (probe-verified trace-time available on TensorFlow 2.9.3, admitting the `PositionEncoding.call` idiom); sinks are invocations whose callee chain roots at the numpy/scipy module (points-to preferred, import-alias fallback over `numpy`/`np`/`scipy`/`sp` globals—whose over-recognition here over-blocks, the inverse of the TensorFlow chain walk's trade); tainted positional arguments cross into user callees and tainted returns flow back, memoized with a cycle guard.

The failure (`HAS_NUMPY_CALLS_ON_PARAMETERS`, code 16) joins the safety family after `HAS_EAGER_ONLY_CALLS` and before the barren benefit signal. `alwaysCheckNumpyCalls` mirrors the sibling knobs end-to-end (`EvaluationOption`, evaluator handler, `run-headless-evaluator.sh` `CHECK_NUMPY_CALLS`, "numpy calls on parameters"/"numpy calls" CSV columns).

`testNumpyCallsOnParametersBlockHybridization` pins the direct sink, argument-flow into a callee, and the return-flow chain, with clean-callee and no-numpy P1 controls; `testNumpyCallsSanitizedByShape` pins the trace-time carve-ou... (continued)

101 of 112 new or added lines in 4 files covered. (90.18%)

1927 of 2389 relevant lines covered (80.66%)

0.81 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
89.33
2.07% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
4
93.62
-0.29% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
2
70.28
-0.18% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
Jobs
ID Job ID Ran Files Coverage
1 #2376.1 08 Jul 2026 01:18AM UTC 32
80.66
Source Files on build #2376
  • Tree
  • List 32
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 47933651 on github
  • Prev Build on gh-readonly-queue/main/pr-741-7e7dae2a2d163d9b79ecb0382ee0bd2d4365a8f0
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc