Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux.fr machine (x86_64 architecture), and agregate them in the final report:

The target is to exceed 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - basemath - lll.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.18.1 lcov report (development 30556-bb9f5f8fc8) Lines: 1335 1641 81.4 %
Date: 2025-11-25 09:20:50 Functions: 125 130 96.2 %
Legend: Lines: hit not hit

Function Name Sort by function name Hit count Sort by hit count
Babai 0
RgM_flop 0
dbg_flatter 0
dbg_flattergram 0
fplll 0
matkerint0 28
lllgramkerim 35
lllkerim 35
kerint 42
lllgen 42
lllgramgen 42
lllgramkerimgen 42
lllkerimgen 42
qflllgram 63
kerint0 70
incrementalGSgen 168
lllallgen 168
lllgramallgen 168
lllint 183
REDgen 196
do_SWAPgen 196
qflllgram0 245
qflll0 301
pslg 504
ZM_flattergram 947
ZM_flattergram_rank 947
gramschmidt_upper 1280
RgM_Cholesky_dynprec 2918
flattergram_i 2918
ZM_to_RM 4237
fplll_heuristic 4237
gc_lll 4814
lllgram 9089
truncexpo 11844
ZC_to_RC 15889
dpeM_diagonal_shallow 20217
RgM_flip 34813
lllgramint 36439
lllall 36699
get_gaussred 44510
RgM_is_square_mat 45828
dpetor 93921
setG2_heuristic 187582
realsqrdotproduct 197336
setG_heuristic 205464
dpe_negz 240962
submulzu2n 262549
addmulzu2n 271563
Babai_heuristic 288721
mulshift 316711
dpe_addmuluz 342872
absrsmall2 400996
dpe_submuluz 409939
rotateG 443217
ZM_is_knapsack 603815
ZM_flatter_rank 623726
fplll_flatter 624673
ZM_flatter 625740
dperotate 652336
addmuliu642n 667356
u64toineg 667356
submuliu642n 683409
absrsmall 695823
lll_trivial 769078
dpe_muluz 797362
get_gramschmidt 1096566
realdotproduct 1182454
ZM_is_lower 1202905
lll 1241458
drop 1344016
flat 1344017
potential 1344017
sizered 1344018
affii_or_copy_gc 1389316
dpe_abssmall 1389336
submulshift 1494285
fplll_dpe 1599747
dpe_addz 1942987
vectail_inplace 2084935
fplll_fast 2098092
lll_finish 2158324
dbldotsquare 2470416
gramschmidt_dynprec 2688035
affdbldpe 3199490
cget_dpemat 3199497
mpabscmp 4081559
addmuliu2n 4096917
submuliu2n 4178633
ZM_is_upper 4226947
addmulziu 4580412
Babai_dpe 4642374
GS_extraprec 4719414
condition_bound 4719414
ZM2_lll_norms 4834905
gsisinv 5186150
dpe_cmp 5251738
dpe_cmpmul 5251738
lllfp 5359447
spread 5840651
submulziu 5905067
ZM_lll_norms 7116198
nbits2prec64 7475576
cget_dblmat 8392351
addmuliu64_inplace 9323345
submuliu64_inplace 9364045
pari_rint 10697210
rotateG_fast 11463539
update_alpha 11906804
cget_dpevec 13249936
dpe_divz 13982436
dpe_abscmp 14423774
setG2_fast 16904853
addzi 17781947
subzi 18511206
u64toi 19370799
affidpe 20637092
setG_fast 22506234
set_line 24769421
affdpe 25402275
Babai_fast 29954630
rotate 31698861
dblrotate 34390390
cget_dblvec 34834476
dpe_normalize 47082823
dpe_submulz 50449568
dpe_subz 52477535
dpe_mulz 55701176
dpe_normalize0 106420743
dbldotproduct 116801404
itodbl_exp 160511862

Generated by: LCOV version 1.16