Resystance is a tool to collect statistics on rewrite systems written in the lambdapi format.
The tool can be compiled with dune with the dependencies
- lambdapi (development version needed)
- timed
Lambdapi must be compiled from sources. To have the latest version.
and then
make install
Two executables are available
dkstatsto compute miscellaneous statistics,dkriticto find critical pairs in the system.
The program outputs the following statistics:
Symbolsnumber of symbols,Rulesnumber of rules,NL_rulesnumber of non left linear rules,HO_rulesnumber of rules with abstractions;- statistics of three distributions:
Arityarity of the root symbol of the rulesSizenumber of subterms in rulesHeightheight (or depth) of the rules
The statistics of distributions are
avgaverage value25th_pct25th percentilemedmedian or 50th percentile75th_pct75th percentilesdstandard deviation.
The CSV separator is the comma ','. CSV content is preceded by a header containing the name of the columns.
--csvoutput as a csv line--separateoutput one csv line per input file
On the tests,
$ cd tests/
$ resystance *
SUMMARY
Symbols : 17
Rules : 25
Non linear rules: 0
HO rules : 0
$ resystance --csv *
File,Symbols,Rules,NL_rules,HO_rulesArity_avg,Arity_25th_pct,Arity_med,Arity_75th_pctHeight_avg,Height_25th_pct,Height_med,Height_75th_pctSize_avg,Size_25th_pct,Size_med,Size_75th_pct
N/A,17,25,0,0,1.920000,2,2,2,1.120000,1,1,2,1.360000,1,1,3
$ resystance --separate *
File,Symbols,Rules,NL_rules,HO_rulesArity_avg,Arity_25th_pct,Arity_med,Arity_75th_pctHeight_avg,Height_25th_pct,Height_med,Height_75th_pctSize_avg,Size_25th_pct,Size_med,Size_75th_pct
nat.lp,9,15,0,0,2.000000,2,2,2,1.333333,1,1,1,1.733333,1,1,2
bool.lp,8,10,0,0,1.800000,2,1,2,0.800000,1,0,1,0.800000,1,0,1
To see what it is about: make tests
- Finding critical pairs in first order
- Assess joinability of critical pairs in first order
- Implement path to a subterm
- Right hand side substitution
- Find critical pairs higher order
- Higher order joinability