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

wegamekinglc / Derivatives-Algorithms-Lib / 28287308979

27 Jun 2026 11:03AM UTC coverage: 80.804% (+0.1%) from 80.658%
28287308979

Pull #150

github

wegamekinglc
De-duplicate script visitor and simulation paths

Three byte-identical refactorings under dal-cpp/dal/script/, no behavior change:

- debugger.hpp: extract DebugComp(CompNode_, const char*) private helper; the
  NodeEqual_/NodeSup_/NodeSupEqual_ visitors become one-line delegations. The
  only intra-branch difference was the label string ("EQUALZERO"/"GTZERO"/
  "GTEQUALZERO"); everything else (isDiscrete_/eps_/lb_/rb_ formatting) was
  identical.

- domainproc.hpp: introduce VisitBinary(Node_&, OP_) template mirroring the
  existing pattern in constprocessor.hpp and evaluator.hpp; the four
  Visit(NodeAdd_/NodeSub_/NodeMulti_/NodeDiv_) bodies collapse to one-line
  delegations. NodePow/NodeMax/NodeMin and unaries left untouched (genuinely
  distinct stack semantics).

- simulation.hpp (MCSimulation<AAD::Number_>): the per-path recording loop was
  duplicated in the compiled/else branches, differing only by evaluator type
  (EvalState_ vs FuzzyEvaluator_) and the product call (EvaluateCompiled vs
  Evaluate). Factor the loop into a runPaths(evaluator, evaluate) generic
  lambda; the verbatim params risk-accumulation loop is hoisted out of the
  branch (it has no evaluator dependency); the const-vars risk loop is hoisted
  into an accumulateConstVarRisks(constVarVals) lambda called per branch with
  the branch-local evaluator. AAD recording order (RewindToMark per path,
  PropagateToMark per path, PropagateMarkToStart before reading adjoints) is
  preserved exactly.

Verified: dal_cpp_tests built and run on adept and xad backends.
Pull Request #150: chore: de-duplicate script visitors and AAD simulation path

19 of 36 new or added lines in 3 files covered. (52.78%)

116 existing lines in 7 files now uncovered.

6293 of 7788 relevant lines covered (80.8%)

3235545.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

56.9
/dal-cpp/dal/storage/globals.cpp


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc