Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
5c9aaa5
Diagnostics for DynComp
mernst Jan 8, 2026
de0676d
Javadoc
mernst Jan 8, 2026
9b5c84c
Comment out failing test
mernst Jan 8, 2026
56a4914
Merge ../daikon-branch-master into dyncomp-diagnostics
mernst Jan 8, 2026
25424f8
Improve diagnostics
mernst Jan 8, 2026
70d736e
Add comment about Java 11
mernst Jan 8, 2026
79a022d
Fix import
mernst Jan 8, 2026
8cf4cef
Improve diagnostics
mernst Jan 9, 2026
31f596a
Merge ../daikon-branch-master into dyncomp-diagnostics
mernst Jan 9, 2026
5ad9143
Fix variable name
mernst Jan 9, 2026
ed17000
Fix printf
mernst Jan 9, 2026
b130c72
Javadoc
mernst Jan 9, 2026
f5f3bcf
Must variable be exported?
mernst Jan 9, 2026
983df4f
Don't use a variable
mernst Jan 9, 2026
b7e8464
Adapt to changes
mernst Jan 10, 2026
ada7529
Define `add_variable_quietly()`
mernst Jan 10, 2026
43871ad
Merge ../daikon-branch-master into add-variable-quietly
mernst Jan 10, 2026
ad89112
Rename `skinyOutput()` to `skinnyOutput()`
mernst Jan 10, 2026
67f8e8c
Merge ../daikon-fork-mernst-branch-skinny-output-methodname into dync…
mernst Jan 10, 2026
71d977a
Define `toStringWithIdentityHashCode()`
mernst Jan 10, 2026
b384f65
Generalize signature
mernst Jan 10, 2026
0e7853b
Handle errors in counting
mernst Jan 10, 2026
2aeb4ca
Improve error messages
mernst Jan 10, 2026
1fa1eab
Merge ../daikon-fork-mernst-branch-diagnostics-char-sequence into dyn…
mernst Jan 10, 2026
bab52f4
Merge ../daikon-fork-mernst-branch-total-lines into dyncomp-diagnosti…
mernst Jan 10, 2026
6f0b219
Merge ../daikon-fork-mernst-branch-error-msgs into dyncomp-diagnostic…
mernst Jan 10, 2026
7edbf18
Improve diagnostic
mernst Jan 10, 2026
dc35f51
Merge ../daikon-fork-mernst-branch-makefile4 into dyncomp-diagnostics…
mernst Jan 10, 2026
33b5997
Tweaks
mernst Jan 10, 2026
754ad4b
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 10, 2026
58d76dd
Simplify
mernst Jan 10, 2026
559a246
Merge ../daikon-fork-mernst-branch-diagnostics-char-sequence into dyn…
mernst Jan 10, 2026
23634aa
Merge ../daikon-branch-master into skinny-output-methodname
mernst Jan 10, 2026
282c9ac
Merge ../daikon-fork-mernst-branch-skinny-output-methodname into dync…
mernst Jan 10, 2026
319b7f7
Merge ../daikon-fork-mernst-branch-tostring-with-identityhashcode int…
mernst Jan 10, 2026
e010c0d
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 10, 2026
9d9fcf9
Address Error Prone warnings
mernst Jan 10, 2026
12a1641
Merge ../daikon-fork-mernst-branch-tostring-with-identityhashcode int…
mernst Jan 10, 2026
422a45f
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 10, 2026
ddcdf6e
Run more quietly
mernst Jan 10, 2026
09af281
Remove duplication
mernst Jan 10, 2026
c03d17f
Merge ../daikon-branch-master into quieter
mernst Jan 10, 2026
d532459
Add dependency
mernst Jan 10, 2026
62bac65
Remove logging from add_variable
mernst Jan 10, 2026
da17c46
Rename `utils/` to `.utils/`
mernst Jan 10, 2026
6a4c852
Variables, and fix bad replacement
mernst Jan 11, 2026
b048a0f
Fixes
mernst Jan 11, 2026
8234364
Merge ../daikon-branch-master into dyncomp-diagnostics
mernst Jan 11, 2026
26b02de
Undo changes
mernst Jan 11, 2026
4cda853
Merge ../daikon-branch-master into quieter
mernst Jan 11, 2026
8866c8e
Complete the removal of jobs
mernst Jan 11, 2026
b65ae0a
Merge ../daikon-fork-mernst-branch-circleci-validate into dot-utls
mernst Jan 11, 2026
c7ef052
Merge ../daikon-fork-mernst-branch-circleci-validate into quieter
mernst Jan 11, 2026
2293725
Merge ../daikon-fork-mernst-branch-circleci-validate into dyncomp-dia…
mernst Jan 11, 2026
7b58b12
Merge ../daikon-fork-mernst-branch-dot-utls into dyncomp-diagnostics-pre
mernst Jan 11, 2026
55a1014
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 11, 2026
f88021a
Fix target, handle parallelism
mernst Jan 11, 2026
2e284fe
Merge ../daikon-branch-master into quieter
mernst Jan 11, 2026
8066c2e
Complete the renaming
mernst Jan 11, 2026
5ff3632
Merge ../daikon-branch-master into dot-utls
mernst Jan 11, 2026
a645a93
Another renaming
mernst Jan 11, 2026
9213ec4
Support parallelism
mernst Jan 11, 2026
a719fb2
Update target name
mernst Jan 11, 2026
4fe5334
Complete the renaming
mernst Jan 11, 2026
662349b
Support parallelism
mernst Jan 11, 2026
6edf69f
Rename target
mernst Jan 11, 2026
ac13e80
Merge ../daikon-branch-master into plume-scripts-in-utils
mernst Jan 11, 2026
391bfdb
Merge ../daikon-branch-master into parallelism
mernst Jan 11, 2026
037c2c0
Treat recursive `make` correctly`
mernst Jan 11, 2026
7ce2d52
Treat recursive `make` correctly
mernst Jan 11, 2026
684ad7c
Fix comment
mernst Jan 11, 2026
073720e
Merge ../daikon-branch-master into dyncomp-diagnostics-pre
mernst Jan 11, 2026
0acad9a
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 11, 2026
073fd00
Undo a change
mernst Jan 11, 2026
e2607fc
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 11, 2026
029f8a2
Merge ../daikon-fork-mernst-branch-recursive-make into dot-utls
mernst Jan 11, 2026
7abc40d
Remove suppression
mernst Jan 11, 2026
07afec6
Merge ../daikon-fork-mernst-branch-quieter into dyncomp-diagnostics-pre
mernst Jan 11, 2026
657c0ff
Merge ../daikon-fork-mernst-branch-dot-utls into dyncomp-diagnostics-pre
mernst Jan 11, 2026
fd9b32e
Merge ../daikon-fork-mernst-branch-parallelism into dyncomp-diagnosti…
mernst Jan 11, 2026
d7ba5be
Merge ../daikon-fork-mernst-branch-plume-scripts-in-utils into dyncom…
mernst Jan 11, 2026
5a280fa
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 11, 2026
4e59d62
Document `cronic`
mernst Jan 11, 2026
cd0d6d4
Document `cronic`
mernst Jan 11, 2026
f822484
Define `COMSPEC` environment variable, needed by Rocky Linux under JD…
mernst Jan 12, 2026
f8e16ed
Merge ../daikon-branch-master into plume-scripts-in-utils
mernst Jan 12, 2026
9ea38a7
Merge ../daikon-branch-master into dot-utls
mernst Jan 12, 2026
2c40dae
Merge ../daikon-branch-master into quieter
mernst Jan 12, 2026
028ce01
Merge ../daikon-fork-mernst-branch-plume-scripts-in-utils into dot-utls
mernst Jan 12, 2026
f841780
Define another variable
mernst Jan 12, 2026
0d6fccb
Merge ../daikon-fork-mernst-branch-quieter into dyncomp-diagnostics-pre
mernst Jan 12, 2026
23bdb76
Merge ../daikon-fork-mernst-branch-dot-utls into dyncomp-diagnostics-pre
mernst Jan 12, 2026
ba7b9ad
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 12, 2026
2f82ba3
Merge ../daikon-branch-master into quieter
mernst Jan 12, 2026
7e3c6f3
Merge ../daikon-fork-mernst-branch-quieter into dyncomp-diagnostics-pre
mernst Jan 12, 2026
be1dfe0
Merge ../daikon-fork-mernst-branch-dyncomp-diagnostics-pre into dynco…
mernst Jan 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
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m
misc-ubuntu-jdk11:
docker:
Expand All @@ -351,7 +351,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m
misc-ubuntu-jdk17:
docker:
Expand All @@ -373,7 +373,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m
misc-ubuntu-jdk21:
docker:
Expand All @@ -395,7 +395,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m
misc-ubuntu-jdk25:
docker:
Expand All @@ -417,7 +417,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m

kvasir-ubuntu-jdk8:
Expand Down Expand Up @@ -939,7 +939,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m
misc-rockylinux-jdk25:
docker:
Expand All @@ -961,7 +961,7 @@ jobs:
paths:
- ".git"
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m

kvasir-rockylinux-jdk8:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/defs.m4
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ define([misc_job], [dnl
- image: mdernst/daikon-$1-jdk$2-plus
circleci_boilerplate(full)
- run:
command: ./scripts/test-misc.sh
command: export COMSPEC="" && export ComSpec="" && ./scripts/test-misc.sh
no_output_timeout: 20m])dnl
dnl
define([kvasir_job], [dnl
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ nightly-test-except-doc-pdf:
${MAKE} junit test

# Code style; defines `style-check` and `style-fix`.
CODE_STYLE_EXCLUSIONS_USER := --exclude-dir kvasir-tests --exclude-dir six170 --exclude-dir .utils --exclude clustering.html
CODE_STYLE_EXCLUSIONS_USER := --exclude-dir kvasir-tests --exclude-dir six170 --exclude-dir .utils --exclude-dir .plume-scripts --exclude clustering.html
ifeq (,$(wildcard .plume-scripts))
dummy := $(shell git clone -q https://github.com/plume-lib/plume-scripts.git .plume-scripts)
endif
Expand Down
21 changes: 12 additions & 9 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ all-except-pdf: config-options.texinfo invariants-doc.texinfo html-chap html
TEXI2HTML ?= makeinfo --html

HTMLTOOLS ?= ../.utils/html-tools
# `cronic` suppresses output unless the wrapped command fails.
CRONIC ?= ../.utils/plume-scripts/cronic

daikon.info: daikon.texinfo config-options.texinfo invariants-doc.texinfo
# Large split size fixes an apparent bug in makeinfo 4.11:
Expand Down Expand Up @@ -32,7 +34,7 @@ invariants-doc.texinfo:
${MAKE} -C ../java ../doc/invariants-doc.texinfo

# Always remake config-options.texinfo
# (We delegate to ../java/Makefile, which is more discerning)
# (We delegate to ../java/Makefile, which is more discerning.)
.PHONY : config-options.texinfo
.PHONY : invariants-doc.texinfo
endif
Expand Down Expand Up @@ -66,6 +68,7 @@ daikon-fast: daikon.texinfo
../.utils/html-tools:
${MAKE} -C .. update-html-tools

${CRONIC}: ../.utils/plume-scripts
../.utils/plume-scripts:
${MAKE} -C .. update-plume-scripts-in-utils

Expand All @@ -87,9 +90,9 @@ html-chap: daikon/index.html developer/index.html

# The "subdir" flag does not copy over images, so the
# pathnames become incorrect. We need to copy them over ourselves.
daikon/index.html: daikon.texinfo config-options.texinfo invariants-doc.texinfo images/dfepl-flow.jpg ../.utils/html-tools
daikon/index.html: daikon.texinfo config-options.texinfo invariants-doc.texinfo images/dfepl-flow.jpg ../.utils/html-tools ../.utils/plume-scripts
rm -rf daikon/*
${TEXI2HTML} --split=chapter -o daikon $<
${CRONIC} ${TEXI2HTML} --split=chapter -o daikon $<
# Fixup 'bad' href(s) inserted by makeinfo.
perl -pi -e 's|../dir/index.html|../index.html|;' daikon/index.html
perl -pi -e 's|href="CHANGELOG.md"|href="../CHANGELOG.md"|;' daikon/*.html
Expand All @@ -98,9 +101,9 @@ daikon/index.html: daikon.texinfo config-options.texinfo invariants-doc.texinfo
cp images/*.jpg daikon/images
cd daikon && ../${HTMLTOOLS}/html-add-favicon . ../daikon-favicon.png

developer/index.html: developer.texinfo ../.utils/html-tools
developer/index.html: developer.texinfo ../.utils/html-tools ${CRONIC}
rm -rf developer/*
${TEXI2HTML} --split=chapter -o developer $<
${CRONIC} ${TEXI2HTML} --split=chapter -o developer $<
# Fixup 'bad' href inserted by makeinfo.
perl -pi -e 's|../dir/index.html|../index.html|;' developer/index.html
mkdir developer/images
Expand All @@ -110,11 +113,11 @@ developer/index.html: developer.texinfo ../.utils/html-tools

pdf: daikon.pdf images/dfepl-flow.eps developer.pdf

daikon.pdf: daikon.texinfo config-options.texinfo invariants-doc.texinfo
makeinfo --pdf $<
daikon.pdf: daikon.texinfo config-options.texinfo invariants-doc.texinfo ${CRONIC}
${CRONIC} makeinfo --pdf $<

developer.pdf: developer.texinfo
makeinfo --pdf $<
developer.pdf: developer.texinfo ${CRONIC}
${CRONIC} makeinfo --pdf $<

# Note that the clean target does not remove invariants-doc.texinfo or
# config-options.texinfo.
Expand Down
9 changes: 8 additions & 1 deletion java/daikon/chicory/DaikonVariableInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,11 @@ protected void addChild(DaikonVariableInfo info) {
children.add(info);
}

/** Returns a string representation of this node. */
/**
* Returns a string representation of this node.
*
* <p>This implementation returns its run-time class and its name.
*/
@SideEffectFree
@Override
public String toString(@GuardSatisfied DaikonVariableInfo this) {
Expand Down Expand Up @@ -1391,6 +1395,9 @@ public boolean isStatic() {
*/
private boolean check_for_dup_names() {

// TODO: It seems wrong to choose the first occurrence of the variable, which could be a nested
// occurrence rather than the canonical top-level occurrence.

if (ppt_statics.contains(name)) {
debug_vars.log("ignoring already included variable %s [%s]", name, getClass());
// if (!isStatic()) {
Expand Down
76 changes: 72 additions & 4 deletions java/daikon/dcomp/DCRuntime.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@
import daikon.chicory.StringInfo;
import daikon.chicory.ThisObjInfo;
import daikon.plumelib.bcelutil.SimpleLog;
import daikon.plumelib.util.StringsPlume;
import daikon.plumelib.util.WeakIdentityHashMap;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
Expand Down Expand Up @@ -2236,6 +2242,20 @@ private static String skinnyOutput(DaikonVariableInfo dv, boolean on) {
private static class DVSet extends ArrayList<DaikonVariableInfo> implements Comparable<DVSet> {
static final long serialVersionUID = 20050923L;

/** Creates an empty DVSet. */
private DVSet() {
super();
}

/**
* Creates a DVSet with that contains the given variables.
*
* @param variables the variables
*/
private DVSet(Collection<DaikonVariableInfo> variables) {
super(variables);
}

@Pure
@Override
public int compareTo(@GuardSatisfied DVSet this, DVSet s1) {
Expand All @@ -2257,7 +2277,6 @@ void sort() {
*
* @return a multi-line representation of the list of variables
*/
@SuppressWarnings("UnusedMethod") // TEMPORARY
String toStringWithIdentityHashCode() {
StringJoiner result = new StringJoiner(System.lineSeparator());
result.add("DVSet(");
Expand All @@ -2270,8 +2289,8 @@ String toStringWithIdentityHashCode() {
}

/**
* Gets a list of comparability sets of Daikon variables. If the method has never been executed
* returns null (it would probably be better to return each variable in a separate set, but I
* Gets a list of comparability sets of Daikon variables. Returns null if the method has never
* been executed (it would probably be better to return each variable in a separate set, but I
* wanted to differentiate this case for now).
*
* <p>The sets are calculated by processing each daikon variable and adding it to a list
Expand Down Expand Up @@ -2305,6 +2324,32 @@ String toStringWithIdentityHashCode() {
return set_list;
}

/**
* Produce debugging output for a {@code List<DVSet>}.
*
* @param dvsets a list of DVSet objects
* @param indent how many spaces to indent each line
* @return a string representation of {@code dvsets}
*/
static String dvSetsToString(List<DVSet> dvsets, int indent) {
// On Java 11, do
// ByteArrayOutputStream baos = new ByteArrayOutputStream();
// try (PrintStream ps = new PrintStream(baos, true, StandardCharsets.UTF_8)) {
// ...
// return baos.toString(StandardCharsets.UTF_8);
// and drop the catch clause.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
String utf8 = StandardCharsets.UTF_8.name();
try (PrintStream ps = new PrintStream(baos, true, utf8)) {
for (DVSet dvset : dvsets) {
ps.println(StringsPlume.indentLines(indent, dvset.toStringWithIdentityHashCode()));
}
return baos.toString(utf8);
} catch (UnsupportedEncodingException e) {
throw new Error(e);
}
}

/**
* Returns a map representing the tree of tracers. Represents the tree as entries in a map with
* each parent node as the key to a set contains all its children. The parameter RootInfo node is
Expand Down Expand Up @@ -2421,14 +2466,37 @@ static void merge_class_comparability(ClassInfo ci) {
*/
static void merge_dv_comparability(RootInfo src, RootInfo dest, String debuginfo) {

// TODO: Why does this take a RootInfo? A RootInfo contains many more variables than we are
// interested in.
// What is a better way to obtain just the relevant DaikonVariableInfo objects for a given
// program point?

// TODO: We should never merge across different program points.

debug_merge_comp.log("merge_dv_comparability: %s%n", debuginfo);

debug_merge_comp.indent();

// Create a map relating destination names to their variables
Map<String, DaikonVariableInfo> dest_map = new LinkedHashMap<>();
for (DaikonVariableInfo dest_var : varlist(dest)) {
dest_map.put(dest_var.getName(), dest_var);
String dest_var_name = dest_var.getName();
if (false) { // temporarily commented out because it is failing
if (dest_map.containsKey(dest_var_name)) {
DaikonVariableInfo old_dest_var = dest_map.get(dest_var_name);
String msg =
String.format(
"duplicate var name %s%n from old_dest_var = %s%n and dest_var = %s%n" + " in %s",
dest_var_name,
old_dest_var.toStringWithIdentityHashCode(),
dest_var.toStringWithIdentityHashCode(),
new DVSet(varlist(dest)).toStringWithIdentityHashCode());
System.out.println(msg);
System.err.println(msg);
throw new Error(msg);
}
}
dest_map.put(dest_var_name, dest_var);
}

// Get the variable sets for the source
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ endif

chicory: $(SCRATCH_FOR_DAIKON)/$(PROJECT_FILE).dtrace.gz
$(SCRATCH_FOR_DAIKON)/$(PROJECT_FILE).dtrace.gz : $(SCRATCH_FOR_DAIKON)/.copy-timestamp \
$(INST_LIST_FILE) $(CHICORY_EXEC)
$(INST_LIST_FILE) $(CHICORY_EXEC)
@echo
@echo "### Run Chicory (${PROJECT_FILE})"
@echo
Expand Down
Loading