<commit_before>.PHONY: .FORCE rebuild-all check-all accept-all
.SUFFIXES:

ALL := $(wildcard *.in)

DISABLED=FailRange.in

IN=$(filter-out $(DISABLED), $(ALL))

default: check

# Rebuild all .out files
BUILD_TARGETS := $(IN:.in=.out)
build: ${BUILD_TARGETS}

# Check that .out files conform to .out.expect references
CHECK_TARGETS := $(BUILD_TARGETS:=.check)
check: ${CHECK_TARGETS}

# Show diffs of non-matching files
DIFF_TARGETS := $(BUILD_TARGETS:=.diff)
diff: ${DIFF_TARGETS}

# Update .expect.out files from .out files
ACCEPT_TARGETS := $(BUILD_TARGETS:=.expected)
accept: ${ACCEPT_TARGETS}

# Remove all .out files
clean:
	rm -f *.out

touch:
	touch ${IN}

.FORCE:

%.in: .FORCE

FSTAR_HOME = ../../..
include $(FSTAR_HOME)/ulib/gmake/z3.mk

ifdef Z3
SMT=--smt $(Z3)
endif

FSTAR:=${FSTAR_HOME}/bin/fstar.exe $(SMT) --ide

# Feed .in to F* and record output as .out.  Output is passed through cleanup.py
# to ensure that the output is deterministic by pretty-printing JSON messages
# (otherwise the order of fields in JSON dictionaries might vary across runs)
%.out: %.in $(FSTAR_HOME)/bin/fstar.exe
	$(eval FST := $(firstword $(subst ., ,$<)))
	$(FSTAR) "$(realpath ${FST}.fst)" < "$<" | python cleanup.py "$@"

# Clean up and accept an existing ‘.out’ file (possibly generated by
# ‘fstar-write-transcript’, or possibly by ‘make build’) and save it as
# ‘.out.expected’.
%.out.expected: %.out
	python cleanup.py "$@" < "$<"

# Verify that a given output matches the corresponding input
%.out.check: %.out
	diff -u "$<.expected" "$<"
<commit_msg>interactive tests: silence stale .checked warning<commit_after>.PHONY: .FORCE rebuild-all check-all accept-all
.SUFFIXES:

ALL := $(wildcard *.in)

DISABLED=FailRange.in

IN=$(filter-out $(DISABLED), $(ALL))

default: check

# Rebuild all .out files
BUILD_TARGETS := $(IN:.in=.out)
build: ${BUILD_TARGETS}

# Check that .out files conform to .out.expect references
CHECK_TARGETS := $(BUILD_TARGETS:=.check)
check: ${CHECK_TARGETS}

# Show diffs of non-matching files
DIFF_TARGETS := $(BUILD_TARGETS:=.diff)
diff: ${DIFF_TARGETS}

# Update .expect.out files from .out files
ACCEPT_TARGETS := $(BUILD_TARGETS:=.expected)
accept: ${ACCEPT_TARGETS}

# Remove all .out files
clean:
	rm -f *.out

touch:
	touch ${IN}

.FORCE:

%.in: .FORCE

FSTAR_HOME = ../../..
include $(FSTAR_HOME)/ulib/gmake/z3.mk

ifdef Z3
SMT=--smt $(Z3)
endif

FSTAR:=${FSTAR_HOME}/bin/fstar.exe $(SMT) --ide


# Feed .in to F* and record output as .out.  Output is passed through cleanup.py
# to ensure that the output is deterministic by pretty-printing JSON messages
# (otherwise the order of fields in JSON dictionaries might vary across runs)
# We silence warning 241 (about stale .checked files) so it doesn't impact the output
%.out: %.in $(FSTAR_HOME)/bin/fstar.exe
	$(eval FST := $(firstword $(subst ., ,$<)))
	$(FSTAR) --warn_error -241 "$(realpath ${FST}.fst)" < "$<" | python cleanup.py "$@"

# Clean up and accept an existing ‘.out’ file (possibly generated by
# ‘fstar-write-transcript’, or possibly by ‘make build’) and save it as
# ‘.out.expected’.
%.out.expected: %.out
	python cleanup.py "$@" < "$<"

# Verify that a given output matches the corresponding input
%.out.check: %.out
	diff -u "$<.expected" "$<"

{'fraction_non_alphanumeric': 0.16251154201292706, 'fraction_numerical': 0.003693444136657433, 'mean_word_length': 4.2, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2111429', 'n_tokens_mistral': 1196, 'n_tokens_neox': 1136, 'n_words': 357}