Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
6a22a65
Remove junk files
akutuva21 Jun 2, 2026
60f15b1
Merge branch 'RuleWorld:master' into master
akutuva21 Jun 2, 2026
f7cd2c4
🛡️ Sentinel: [CRITICAL] Fix command injection vulnerability in MacroB…
google-labs-jules[bot] Jun 4, 2026
c125d15
Bolt: Optimize string replacement and Python joins
google-labs-jules[bot] Jun 4, 2026
1f29f69
Merge pull request #374 from akutuva21/fix/eval-vulnerability-1821974…
akutuva21 Jun 4, 2026
8a130e7
Merge pull request #375 from akutuva21/bolt-perf-string-ops-738977843…
akutuva21 Jun 4, 2026
81e7358
Delete tmp files
akutuva21 Jun 4, 2026
4050455
⚡ Bolt: Optimizing dictionary creation and XML parsing loops
google-labs-jules[bot] Jun 5, 2026
2325119
Merge pull request #376 from akutuva21/perf-optimizations-16017509040…
akutuva21 Jun 5, 2026
4165473
Fix loop handling in fcanonise
akutuva21 Jun 8, 2026
0096409
fix(nauty): write headers for pickg and fix USERDEF type
akutuva21 Jun 8, 2026
1519c1a
Implement toMathMLString in EnergyPattern.pm
akutuva21 Jun 8, 2026
7932b38
Change USERDEF type from int to long in nauty testg.c
akutuva21 Jun 8, 2026
9743525
⚡ Optimize join calls by removing intermediate list comprehensions
akutuva21 Jun 8, 2026
f9120fa
⚡ Optimize dictionary concatenation in bpgMaps.py
akutuva21 Jun 8, 2026
e2f6b41
⚡ Optimize repeated .get calls in readBNGXML.py
akutuva21 Jun 8, 2026
9c0f063
⚡ Optimize dictionary lookups in graphVizGraph
akutuva21 Jun 8, 2026
a4dbdff
⚡ Optimize redundant division in elementary rate derivatives
akutuva21 Jun 8, 2026
422007a
🧪 BnglWriter test suite
akutuva21 Jun 8, 2026
32e36c7
🧪 Add missing test for SpeciesList with checkIso disabled
akutuva21 Jun 8, 2026
6dc8e18
🧪 Add test for PlaSimulator::checkNegativePopulations
akutuva21 Jun 8, 2026
0cbb3f8
🧪 Add tests for CppExportWriter
akutuva21 Jun 8, 2026
2eb4279
🧪 Add edge case tests for HybridModelGenerator::isIsomorphic
akutuva21 Jun 8, 2026
20893be
🧹 Add Python ctypes usage documentation to CPY file generation
akutuva21 Jun 8, 2026
9f6bd67
🧹 Remove obsolete RxnRule RRefs lookup in Rxn.pm
akutuva21 Jun 8, 2026
5916299
🧹 Remove dead code related to permissive species syntax
akutuva21 Jun 8, 2026
8453899
Add Catch2 test suite for SscWriter
google-labs-jules[bot] Jun 8, 2026
f50c7d5
⚡ Bolt: O(N) String Construction Over In-Place Replacement (#397)
akutuva21 Jun 10, 2026
77a3147
Delete .jules directory
akutuva21 Jun 10, 2026
ea1c54e
Optimize dict iteration and list flattening in bpgMaps.py (#398)
akutuva21 Jun 12, 2026
c21652c
Optimize string find, replace, and append operations (#399)
akutuva21 Jun 13, 2026
bfe26d8
fix: update XML parser to use secure 3-argument open()
akutuva21 Jun 16, 2026
20a25fb
fix: fix file path injection in BNGUtils.pm
akutuva21 Jun 17, 2026
3faa45b
perf(macro-bng-model): replace std::regex_replace with manual collaps…
akutuva21 Jun 18, 2026
71af30b
Fix 2-argument open vulnerability in verify.pl and diff_cdat.pl (#412)
akutuva21 Jun 30, 2026
dcebcad
🛡️ Sentinel: [CRITICAL/HIGH] Fix 2-argument open and unsafe backticks…
akutuva21 Jun 30, 2026
737a6ba
⚡ Bolt: [performance improvement] Replace std::regex with manual stri…
akutuva21 Jun 30, 2026
9ec6404
🛡️ Sentinel: [CRITICAL] Fix command injection in verify.pl file opens…
akutuva21 Jun 30, 2026
99115df
🛡️ Sentinel: [CRITICAL/HIGH] Fix insecure 2-argument open() statement…
akutuva21 Jun 30, 2026
d704374
🛡️ Sentinel: [security improvement] Replace unsafe backticks with lis…
akutuva21 Jun 30, 2026
9b1afe2
perf(macro-bng): replace std::regex with fast std::string operations …
akutuva21 Jun 30, 2026
35634d2
Add tests for parsePrintRules (#418)
akutuva21 Jun 30, 2026
0d89b8a
🧹 [code health] Address ContactMapWriter toDOT discrepancy (#417)
akutuva21 Jun 30, 2026
bf11238
test: add unit tests for PlaSimulator::clampNegatives (#416)
akutuva21 Jun 30, 2026
aa33f3c
🧹 Code Health: Remove stale TODO comment in findMaps (#415)
akutuva21 Jun 30, 2026
fc52422
🧪 Testing Improvement: Add test for isMoleculeNode (#414)
akutuva21 Jun 30, 2026
a593f76
Fix hardcoded IP binding in ContactMap XML-RPC server (#413)
akutuva21 Jun 30, 2026
0207f03
Add missing test cases for parseCheckIso (#419)
akutuva21 Jun 30, 2026
2ba0585
⚡ Bolt: [performance improvement] Replace slow std::regex with manual…
akutuva21 Jun 30, 2026
4d4ae6a
Add missing test for isComponentNode (#432)
akutuva21 Jun 30, 2026
fa65855
Fix potential command injection in bngconsole execution (#431)
akutuva21 Jun 30, 2026
105f7a6
⚡ Bolt: Cache observable pattern parsing in OdeIntegrator (#430)
akutuva21 Jun 30, 2026
404bb43
🧹 [code health improvement] Remove abandoned user tags code and TODO …
akutuva21 Jun 30, 2026
d50eaa4
🧹 [code health] Implement toMatlabString and toMexString in EnergyPat…
akutuva21 Jun 30, 2026
3361cea
🧪 [testing improvement] Add missing test for withinStoichLimits (#427)
akutuva21 Jun 30, 2026
e091284
🧪 [testing improvement] Add missing tests for parseOverwrite and acti…
akutuva21 Jun 30, 2026
982a058
feat(perf): cache parsed observable patterns in PsaSimulator (#422)
akutuva21 Jun 30, 2026
3da1cc0
feat(perf): cache parsed observable patterns in PlaSimulator (#421)
akutuva21 Jun 30, 2026
3d03442
chore: remove .jules artifact
akutuva21 Jun 30, 2026
5bb0315
⚡ Bolt: [performance improvement] Cache PatternGraphs in HybridModelG…
akutuva21 Jun 30, 2026
e152e43
🔒 Sentinel: [HIGH] Fix arbitrary code execution via unvalidated execv…
akutuva21 Jun 30, 2026
c96c86c
Fix command injection via pexpect in XML-RPC server (#435)
akutuva21 Jun 30, 2026
47e8e44
Add test for PlaSimulator::updateObservables (#420)
akutuva21 Jun 30, 2026
c4d70aa
Bolt: optimize regex compilation in MacroBNGModel and PopulationMappi…
akutuva21 Jul 14, 2026
db14ecd
Sentinel: fix 2-argument open() vulnerability in Perl scripts
akutuva21 Jul 14, 2026
6ffce56
⚡ Bolt: [performance improvement] (#445)
akutuva21 Jul 16, 2026
ae27937
🛡️ Sentinel: [CRITICAL] Fix command injection in Perl files (#444)
akutuva21 Jul 16, 2026
ef716a0
⚡ Bolt: [performance improvement] Optimize dictionary lookups in Bipa…
akutuva21 Jul 16, 2026
925e762
⚡ Bolt: [performance improvement] Cache ANTLR parsed patterns and avo…
akutuva21 Jul 21, 2026
9424a59
Add CVODES forward sensitivity integration and fix FD bump default
akutuva21 Jul 22, 2026
33ae8e1
Merge ruleworld/master: C prototype fixes, model bugfixes, MacroBNGMo…
akutuva21 Jul 22, 2026
eb82999
⚡ Bolt: [performance improvement] Replace std::regex with native C++ …
akutuva21 Jul 22, 2026
9cec91c
Remove .jules folder
akutuva21 Jul 22, 2026
166099c
Remove bng_test.cpp
akutuva21 Jul 22, 2026
057e79d
⚡ Bolt: Replace regex with string methods for performance (#449)
akutuva21 Jul 24, 2026
56a3ff0
🛡️ Sentinel: [CRITICAL] Fix Path Injection via 2-Argument Open in Mac…
google-labs-jules[bot] Jul 25, 2026
10c4f9c
fix: revert MacroBNGModel.cpp changes (regex→string micro-optimizatio…
akutuva21 Jul 28, 2026
4e0d88c
🛡️ Sentinel: [HIGH] Fix 2-argument open() vulnerabilities
google-labs-jules[bot] Jul 28, 2026
b322e99
chore: remove .jules, temp scripts, and duplicate MacroBNGModel changes
akutuva21 Jul 28, 2026
37a188a
🛡️ Sentinel: [CRITICAL] Fix Path Injection via 2-Argument Open in Mac…
akutuva21 Jul 28, 2026
f60f6b2
🛡️ Sentinel: [HIGH] Fix 2-argument open() vulnerabilities
akutuva21 Jul 28, 2026
d8ce4a8
⚡ Bolt: Replace std::transform allocations with zero-allocation case-…
akutuva21 Jul 28, 2026
353edca
⚡ Bolt: Replace std::transform allocations with zero-allocation case-…
akutuva21 Jul 28, 2026
448aa1d
⚡ Bolt: [performance improvement] Optimize string case-transformation…
akutuva21 Jul 28, 2026
df6e81d
⚡ Bolt: [performance improvement] Optimize string case-transformation…
akutuva21 Jul 28, 2026
f992a88
⚡ Bolt: [performance improvement] Replace slow regex with manual std:…
akutuva21 Jul 28, 2026
123015f
⚡ Bolt: [performance improvement] Replace slow regex with manual std:…
akutuva21 Jul 28, 2026
189e240
⚡ Bolt: [performance improvement] Pre-compute lowercase function name…
google-labs-jules[bot] Jul 29, 2026
f0b943d
chore: remove .jules/bolt.md metadata file from PR
akutuva21 Jul 30, 2026
31155dc
⚡ Bolt: Pre-compute lowercase function names to avoid O(N*M) conversions
akutuva21 Jul 30, 2026
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,5 @@ bng2/Network3/cmake_install.cmake
statfactor_*.txt
bng2/Network3/run_network
*.o
.jules/
patch_*.py
4 changes: 0 additions & 4 deletions .jules/sentinel.md

This file was deleted.

7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ FetchContent_Declare(
GIT_SUBMODULES "" # Skip submodules (not needed for CVODE build)
)

# Configure SUNDIALS v7 build options - only build CVODE, no tests/examples
# Configure SUNDIALS v7 build options - only build CVODE(S), no tests/examples
set(BUILD_CVODE ON CACHE INTERNAL "Build CVODE solver")
set(BUILD_CVODES OFF CACHE INTERNAL "")
# CVODES is a superset of CVODE (adds forward/adjoint sensitivity analysis,
# CVodeSensInit/CVodeGetSens/CVodeAdjInit/etc.) needed for gradient-based
# parameter estimation. Link against it instead of plain CVODE.
set(BUILD_CVODES ON CACHE INTERNAL "Build CVODES solver (sensitivity analysis)")
set(BUILD_IDA OFF CACHE INTERNAL "")
set(BUILD_IDAS OFF CACHE INTERNAL "")
set(BUILD_KINSOL OFF CACHE INTERNAL "")
Expand Down
2 changes: 1 addition & 1 deletion bng-graph/nauty/nauty24/addedgeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ main(int argc, char *argv[])
#if !MAXN
DYNALLOC2(graph,h,h_sz,n,m,"addedgeg");
#endif
fcanonise(g,m,n,h,NULL,FALSE); /*FIXME (loops)*/
fcanonise(g,m,n,h,NULL,loopcount(g,m,n)>0);
gq = h;
}
if (outcode == SPARSE6) writes6(outfile,gq,m,n);
Expand Down
3 changes: 2 additions & 1 deletion bng-graph/nauty/nauty24/deledgeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/*************************************************************************/

#include "gtools.h"
#include "gutils.h"

/**************************************************************************/

Expand Down Expand Up @@ -159,7 +160,7 @@ main(int argc, char *argv[])
#if !MAXN
DYNALLOC2(graph,h,h_sz,n,m,"deledgeg");
#endif
fcanonise(g,m,n,h,NULL,FALSE); /* FIXME (loops) */
fcanonise(g,m,n,h,NULL,loopcount(g,m,n)>0);
gq = h;
}
if (outcode == SPARSE6) writes6(outfile,gq,m,n);
Expand Down
2 changes: 1 addition & 1 deletion bng-graph/nauty/nauty24/newedgeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ na_newedge(graph *g1, int m1, int n1, boolean dolabel)

if (dolabel)
{
fcanonise(g2,m2,n2,h,NULL,FALSE); /* FIXME (loops) */
fcanonise(g2,m2,n2,h,NULL,loopcount(g2,m2,n2)>0);
gq = h;
}
if (outcode == SPARSE6) writes6(outfile,gq,m2,n2);
Expand Down
6 changes: 3 additions & 3 deletions bng-graph/nauty/nauty24/testg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
both pickg (select by property) and countg (count by property).
Version of Nov 19, 2003. */
/* TODO - write a header if input has one */
/* TODO - USERDEF should be long, not int */


#define USAGE \
"[pickg|countg] [-fp#:#q -V] [--keys] [-constraints -v] [ifile [ofile]]"
Expand Down Expand Up @@ -74,11 +74,11 @@ External user-defined parameters:
case the parameter is selected using the letter 'Q'. The name of the
parameter is "userdef" unless USERDEFNAME is defined. The function
is called with the parameters (graph *g, int m, int n) and must return
an integer value.
a long value.
*/

#ifdef USERDEF
int USERDEF(graph*,int,int);
long USERDEF(graph*,int,int);
#endif
#ifndef USERDEFNAME
#define USERDEFNAME "userdef"
Expand Down
13 changes: 7 additions & 6 deletions bng2/Network3/src/model/rateExpressions/rateElementary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,20 @@ double RateElementary::get_dRate_dX(unsigned int which, vector<double> X){
}
else{
double dX_which = 0.0;
double inv_denom = 1.0;
for (int j=0;j < stoich;j++){
inv_denom /= ((double)j+1.0);
}
for (int k=0;k < stoich;k++){ // # of terms in summation
double prod = 1.0;
for (int j=0;j < stoich;j++){ // # of terms in each product of the summation
if (j == k){
prod *= 1.0/((double)j+1.0);
}
else{
prod *= (X[i]-(double)j)/((double)j+1.0);
if (j != k){
prod *= (X[i]-(double)j);
}
}
dX_which += prod;
}
dRate *= dX_which;
dRate *= (dX_which * inv_denom);
}
}
return dRate;
Expand Down
76 changes: 38 additions & 38 deletions bng2/Network3/src/util/mathutils/linsolve.c
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
#include "mathutils.h"


/*==========================================================================*/
/* Routine to Solve set of linear equations a.x=b where a is symmetric. */
/* Note that the rhs b are stored in the ROWS of b */
/* rather than the columns because of the way Fortran accesses arrays. */


int LINSOLVE(double **a, double **b, int nrhs, int dim){
#ifdef APPEND_UNDERSCORE
#define DGESV dgesv_
#else
#define DGESV dgesv
#endif
register int i,j;
int *ipiv;
int Nrhs, Dim;
int info;
#ifdef __cplusplus
extern "C" {
#endif
/* Fortran dgesv: SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) */
void DGESV(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
#ifdef __cplusplus
}
#endif

/* calculate transpose of a-- this is done because matrices in Fortran */
/* and C have row and column indices interchanged */
MATRIX_TRANSPOSE(a,dim);
Dim= dim;
Nrhs= nrhs;
ipiv = (int *) malloc (sizeof(int)*Dim);
DGESV(&Dim, &Nrhs, a[0], &Dim, ipiv, b[0], &Dim, &info);
free(ipiv);
return(info);
}
#include "mathutils.h"
/*==========================================================================*/
/* Routine to Solve set of linear equations a.x=b where a is symmetric. */
/* Note that the rhs b are stored in the ROWS of b */
/* rather than the columns because of the way Fortran accesses arrays. */
int LINSOLVE(double **a, double **b, int nrhs, int dim){
#ifdef APPEND_UNDERSCORE
#define DGESV dgesv_
#else
#define DGESV dgesv
#endif
register int i,j;
int *ipiv;
int Nrhs, Dim;
int info;
#ifdef __cplusplus
extern "C" {
#endif
/* Fortran dgesv: SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) */
void DGESV(int *n, int *nrhs, double *a, int *lda, int *ipiv, double *b, int *ldb, int *info);
#ifdef __cplusplus
}
#endif
/* calculate transpose of a-- this is done because matrices in Fortran */
/* and C have row and column indices interchanged */
MATRIX_TRANSPOSE(a,dim);
Dim= dim;
Nrhs= nrhs;
ipiv = (int *) malloc (sizeof(int)*Dim);
DGESV(&Dim, &Nrhs, a[0], &Dim, ipiv, b[0], &Dim, &info);
free(ipiv);
return(info);
}
46 changes: 23 additions & 23 deletions bng2/Network3/src/util/mathutils/matrix_mult.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#include "mathutils.h"


/*==========================================================================*/
void MATRIX_MULT(double **a, double **b, double **c, int dim){
/* uses BLAS3 routine dgemm (NAG f06yaf) */
#ifdef APPEND_UNDERSCORE
#define DGEMM dgemm_
#else
#define DGEMM dgemm
#endif
int n=dim;
double alpha=1.0;
double beta=0.0;
extern void DGEMM(char*, char*, int*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*);

/* need to call dgemm_ with transposed matrices because C and Fortran */
/* reference matrices in the opposite sense */
DGEMM("t", "t", &n, &n, &n, &alpha, a[0], &n, b[0], &n, &beta, c[0], &n);
/* tranpose result */
MATRIX_TRANSPOSE(c, dim);
}

#include "mathutils.h"
/*==========================================================================*/
void MATRIX_MULT(double **a, double **b, double **c, int dim){
/* uses BLAS3 routine dgemm (NAG f06yaf) */
#ifdef APPEND_UNDERSCORE
#define DGEMM dgemm_
#else
#define DGEMM dgemm
#endif
int n=dim;
double alpha=1.0;
double beta=0.0;
extern void DGEMM(char*, char*, int*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*);
/* need to call dgemm_ with transposed matrices because C and Fortran */
/* reference matrices in the opposite sense */
DGEMM("t", "t", &n, &n, &n, &alpha, a[0], &n, b[0], &n, &beta, c[0], &n);
/* tranpose result */
MATRIX_TRANSPOSE(c, dim);
}
46 changes: 23 additions & 23 deletions bng2/Network3/src/util/mathutils/matrix_vector_mult.c
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#include "mathutils.h"


/*==========================================================================*/
void MATRIX_VECTOR_MULT(double **a, double *x, double *y, int dim){
/* uses BLAS3 routine dgemv */
#ifdef APPEND_UNDERSCORE
#define DGEMV dgemv_
#else
#define DGEMV dgemv
#endif
int n=dim;
int incx=1;
int incy=1;
double alpha=1.0;
double beta=0.0;
extern void DGEMV(char*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*);

/* take the transpose of the multiplying matrix because matrices */
/* referenced opposite in Fortran */
DGEMV("t", &n, &n, &alpha, a[0], &n, x, &incx, &beta, y, &incy);
}

#include "mathutils.h"
/*==========================================================================*/
void MATRIX_VECTOR_MULT(double **a, double *x, double *y, int dim){
/* uses BLAS3 routine dgemv */
#ifdef APPEND_UNDERSCORE
#define DGEMV dgemv_
#else
#define DGEMV dgemv
#endif
int n=dim;
int incx=1;
int incy=1;
double alpha=1.0;
double beta=0.0;
extern void DGEMV(char*, int*, int*, double*, double*, int*, double*, int*, double*, double*, int*);
/* take the transpose of the multiplying matrix because matrices */
/* referenced opposite in Fortran */
DGEMV("t", &n, &n, &alpha, a[0], &n, x, &incx, &beta, y, &incy);
}
Loading
Loading