Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
2fbd437
Remove scripts that process only version 1 files; port others to vers…
mernst Oct 6, 2026
5d304d1
Address code review: reject version 1 input, use rep types, skip cons…
mernst Oct 7, 2026
e455d48
Address code review: share helpers, fix version 2 parsing bugs
mernst Oct 7, 2026
b21496c
Address code review: shared decls parser, comment handling, version 1…
mernst Oct 7, 2026
3cdd2e7
Address code review: read single-line headers, keep comments with rec…
mernst Oct 7, 2026
6176d1b
Leave the cluster analysis scripts to the runcluster.pl pull request
mernst Oct 7, 2026
b6ffab4
Make sort-dtrace.pl honor perl -i
mernst Oct 7, 2026
3b4e21c
sort-dtrace.pl: no blank lines between single-line headers
mernst Oct 8, 2026
2852f88
Address code review: read records by paragraph, use Perl's -i, valida…
mernst Oct 8, 2026
27571d8
Address code review: CRLF input, comparability sets, dtrace-diff decl…
mernst Oct 8, 2026
ec7b064
Address code review: declaration differences, CRLF output, array comp…
mernst Oct 11, 2026
acc344d
Address code review: -1: line in analyze-comp-file.py, optional decls…
mernst Oct 11, 2026
93624b6
convertcsv.pl: do not quote variable names; update Kvasir .comp goals…
mernst Oct 11, 2026
0985c39
Merge branch 'master' of github.com:codespecs/daikon into remove-vers…
mernst Oct 12, 2026
1138790
Reject duplicate CSV column names; fix dtrace-indent error message
mernst Oct 12, 2026
b694105
Update ArrayTest-cpp.comp.goal-Rocky for variables without comparability
mernst Oct 12, 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
15 changes: 15 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@ Further documentation can be found in:
* `daikon.diff.Diff` no longer accepts the `-u` and `-z` options, which had
no effect.

Scripts:

* `convertcsv.pl` now writes version 2 files.
* `convertcsv.pl -decl`, `dtrace-count.pl`, `dtrace-diff.pl`,
`dtrace-indent.pl`, and `sort-dtrace.pl` no longer accept version 1
declarations.
Comment thread
mernst marked this conversation as resolved.
* `dtrace-diff.pl` reads program point declarations from the .dtrace files,
so its .decls file argument is now optional. It no longer accepts the
`--ignore_exitno` option, which had no effect.
* Removed scripts that processed only version 1 files: `auxinfo.pl`,
`clean-decls.php`, `copy_comparable.pl`, `decls2comp-1.0.py`,
`decls-lackwit-disjoint.pl`, `dfec-to-kvasir.py`, `dfec-to-kvasir-dtrace.py`,
`dtrace-rm-decls.php`, `find_comparable.pl`, `find_globals.pl`,
`generate-dec-types.py`, `lwpp.pl`, `lwpp-init.pl`, and `set_decl_type.pl`.

## Version 5.9.0 (September 1, 2026)

* All Daikon tools now work with Java 8-26.
Expand Down
31 changes: 24 additions & 7 deletions scripts/analyze-comp-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@
all_lines = [line.strip() for line in f]

# Key: program point name
# Value: a list where each element is the size of a comparability set
# for that ppt
ppt_info_dict = {}
# Value: a pair of a list where each element is the size of a comparability
# set for that ppt, and the number of variables that are comparable
# to every variable at that ppt
ppt_info_dict: dict[str, tuple[list[int], int]] = {}

# The current program point we are analyzing
cur_ppt = None

# Initialize this to an empty list and append on the size of the
# comparability sets for each line you encounter in the program point.
cur_ppt_set_sizes: list[int] = []
# The number of variables at the current program point that are comparable
# to every variable. decls2comp.py lists them on a line starting with "-1:".
cur_ppt_num_always_comparable = 0

# Initialize ppt_info_dict
for line in all_lines:
Expand All @@ -35,17 +39,24 @@
# Normally, throw all of the data about the previous program
# point into ppt_info_dict and update cur_ppt
else:
ppt_info_dict[cur_ppt] = cur_ppt_set_sizes
ppt_info_dict[cur_ppt] = (cur_ppt_set_sizes, cur_ppt_num_always_comparable)
cur_ppt = line

cur_ppt_set_sizes = []
cur_ppt_num_always_comparable = 0

# The variables that are comparable to every variable
elif line.startswith("-1:"):
cur_ppt_num_always_comparable = len(line.split()) - 1

# (Ignore blank lines) ... we hit a space-delimited list of
# comparable variables
elif line:
# Size of comparability set for that line (usually 1)
cur_ppt_set_sizes.append(len(line.split()))

if cur_ppt:
ppt_info_dict[cur_ppt] = (cur_ppt_set_sizes, cur_ppt_num_always_comparable)

# Now ppt_info_dict should be initialized with all numerical data.
# We can now crunch numbers and produce useful-looking results
Expand All @@ -58,9 +69,15 @@

total_square_vars_no_comp = 0

for ppt, comp_set_sizes_at_ppt in ppt_info_dict.items(): # ruff:ignore[unused-loop-control-variable, incorrect-dict-iterator]
total_vars_at_ppt = sum(comp_set_sizes_at_ppt)
square_vars_at_ppt = sum((i * i) for i in comp_set_sizes_at_ppt)
for ppt, (comp_set_sizes_at_ppt, num_always_comparable) in ppt_info_dict.items(): # ruff:ignore[unused-loop-control-variable, incorrect-dict-iterator]
total_vars_at_ppt = sum(comp_set_sizes_at_ppt) + num_always_comparable
# The sum, over all variables at the ppt, of the number of variables it is
# comparable to. A variable in a comparability set of size i is
# comparable to the i variables in its set and to every variable that is
# comparable to every variable.
square_vars_at_ppt = sum((i * (i + num_always_comparable)) for i in comp_set_sizes_at_ppt) + (
num_always_comparable * total_vars_at_ppt
)

if total_vars_at_ppt > 0:
avg_for_ppt = float(square_vars_at_ppt) / float(total_vars_at_ppt)
Expand Down
87 changes: 0 additions & 87 deletions scripts/auxinfo.pl

This file was deleted.

36 changes: 0 additions & 36 deletions scripts/clean-decls.php

This file was deleted.

Loading
Loading