Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
a629bf6
Honor explicit Isabelle heap directory overrides
hanno-becker Sep 24, 2026
bc81b29
Crush: Skip inactive callback-free timers
hanno-becker Sep 24, 2026
a1185c4
Crush: Reuse the ucincl discharge solver
hanno-becker Sep 24, 2026
1d995cc
Crush: Prepare the mandatory ucincl solver once
hanno-becker Sep 24, 2026
70f6e94
Crush: Avoid disabled REPEAT_SMART diagnostics
hanno-becker Sep 24, 2026
ee04463
Crush: Reuse premise lists in REPEAT_SMART
hanno-becker Sep 24, 2026
9f6bf0a
Misc: Add generic set, list, and multiset facts
Sep 24, 2026
a7a5b4a
AutoCorrode: Derive locality rewrites on demand
hanno-becker Sep 24, 2026
ff43a9b
AutoCorrode: Match helper certificates by application
hanno-becker Sep 24, 2026
489a53a
AutoCorrode: Infer records for explicit locality facts
hanno-becker Sep 24, 2026
96b2235
AutoCorrode: Add fine-grained PIDE timing
hanno-becker Sep 24, 2026
76b7fba
Crush: Publish fine-grained timing profiles
hanno-becker Sep 24, 2026
43a13e2
I/P: Inspect fine-grained PIDE timings
hanno-becker Sep 24, 2026
cf58765
Scala plugins: Normalize Isabelle installation paths
hanno-becker Sep 24, 2026
3a7cc1a
Fine-Grained Timing: Build source hierarchy asynchronously
hanno-becker Sep 24, 2026
76db658
AutoCorrode: Separate timing session from panel component
hanno-becker Sep 24, 2026
d88b054
Crush: Try crule branches before premise unfolding
hanno-becker Sep 24, 2026
cdb8459
AutoLocality: Don't unfold baked-in logical-core constants
Sep 24, 2026
d34f479
Balance meta-comment (*<*)/(*>*) markers
Sep 24, 2026
c88b679
Fine-Grained Timing: Apply the threshold to every sink
hanno-becker Sep 24, 2026
77bfc60
Fine-Grained Timing: Report failed methods as failed
hanno-becker Sep 24, 2026
0545c9a
Fine-Grained Timing: Collect complete timing reports
hanno-becker Sep 24, 2026
4e51477
Fine-Grained Timing: Track subgoal blocks in proof scopes
hanno-becker Sep 24, 2026
a3e3cc5
I/R: Don't cap zstd decompression of PIDE exports
hanno-becker Sep 24, 2026
b4f1f13
AutoCorrode: Avoid duplicate Isabelle component registrations
hanno-becker Sep 24, 2026
72f6719
AutoLocality: Merge sibling dispatchers by dispatch key
hanno-becker Sep 25, 2026
d42d448
Fine-Grained Timing: Decode entries from mixed reports
hanno-becker Sep 25, 2026
ee23857
AutoCorrode: Use typed artifacts for record generation
hanno-becker Sep 24, 2026
445a2a7
Fine-Grained Timing: Report exceptions from profiled pulls
hanno-becker Sep 26, 2026
4e3cd7b
AutoLocality: Unfold helpers after ambiguous lookup
hanno-becker Sep 26, 2026
14fb9cf
Fine-Grained Timing: Preserve raised invocation outcomes
hanno-becker Sep 26, 2026
ffd1925
Fine-Grained Timing: Aggregate Calls by invocation timing
hanno-becker Sep 26, 2026
f63d8b3
AutoCorrode: Ignore stale component registrations
hanno-becker Sep 28, 2026
f219688
AutoLocality: Decline ambiguous simproc lookups
hanno-becker Sep 28, 2026
069fa43
Misc: Add `quiet_context` to open a named context silently
hanno-becker Sep 25, 2026
68379cb
Make AutoCorrode weakest preconditions resource-exact
ike-mulder-aws Sep 26, 2026
9dc4b70
Crush: Add a guarded order branch
hanno-becker Sep 29, 2026
1ce1952
Make precise pure assertions canonical
ike-mulder-aws Sep 30, 2026
164a384
Crush: Commit to the first closure proof when inserting ⊤
hanno-becker Sep 30, 2026
3ed77d4
Crush: Fold word bounds into the order branch
hanno-becker Oct 1, 2026
c8f84a5
Crush: Strip unused sorts before clarsimp branches
hanno-becker Oct 1, 2026
6713fbf
Crush: Don't rerun a step that a big step has just failed on
hanno-becker Sep 29, 2026
2f8faec
Crush: Skip a step on a goal whose conclusion is a pending guard
hanno-becker Oct 1, 2026
06d9370
Crush: Skip the clarsimp fallback that repeats a filtered call
hanno-becker Sep 29, 2026
68d6fe0
Crush: Don't hide every premise when the conclusion has no constants
hanno-becker Sep 30, 2026
879b415
AutoLocality: Derive disjoint projections linearly
hanno-becker Oct 6, 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
55 changes: 45 additions & 10 deletions Autogen/AutoCommon.thy
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,48 @@ begin

ML\<open>
\<comment>\<open>Trace level: The higher, the more verbose the logging gets\<close>
val locality_trace_level = Attrib.setup_config_int @{binding "locality_trace_level"} (K 1)
val locality_trace_level = Attrib.setup_config_int @{binding "locality_trace_level"} (K 0)

\<comment>\<open>Log text at given debug level; will be dropped if larger than \<^verbatim>\<open>locality_trace_level\<close>.\<close>
fun locality_pretty_trace ctxt lvl =
if lvl <= Config.get ctxt locality_trace_level then
Pretty.string_of #> tracing
else
K ()
\<comment>\<open>Construct and log text at the given debug level only when tracing is enabled.
Level zero disables tracing; positive levels retain the existing verbosity ordering.\<close>
fun locality_pretty_trace ctxt lvl (pretty : unit -> Pretty.T) =
let val trace_level = Config.get ctxt locality_trace_level in
if 0 < trace_level andalso lvl <= trace_level
then pretty () |> Pretty.string_of |> tracing
else ()
end

\<comment>\<open>Authoritative invocation-context switch for AutoLocality cancellation simprocs.\<close>
val locality_cancel_enabled =
Attrib.setup_config_bool @{binding "locality_cancel_enabled"} (K true)

\<comment>\<open>When set, the locality commands report how long each generated sub-proof takes. This is a
diagnostic for spotting which phase (commutativity / disjointness / local-action) dominates,
independent of the verbosity governed by \<^verbatim>\<open>locality_trace_level\<close>.\<close>
val locality_timing = Attrib.setup_config_bool @{binding "locality_timing"} (K false)

\<comment>\<open>Time a thunk and, if \<^verbatim>\<open>locality_timing\<close> is set, report the elapsed time under \<^verbatim>\<open>label\<close>.\<close>
fun locality_time ctxt (label : string) (f : unit -> 'a) : 'a =
if Config.get ctxt locality_timing then
let
val timer = Timing.start ()
val result = f ()
val _ = tracing ("[locality timing] " ^ label ^ ": " ^ Timing.message (Timing.result timer))
in result end
else f ()

\<comment>\<open>As \<^verbatim>\<open>locality_time\<close>, but for a tactic. The tactic's result sequence is forced eagerly so the
measurement captures the real proof-search cost rather than the (lazy) construction of the
sequence. The generated goals are deterministic (at most one result), so forcing is safe.\<close>
fun locality_time_tac ctxt (label : string) (tac : tactic) : tactic =
if Config.get ctxt locality_timing then
(fn st =>
let
val timer = Timing.start ()
val results = Seq.list_of (tac st)
val _ = tracing ("[locality timing] " ^ label ^ ": " ^ Timing.message (Timing.result timer))
in Seq.of_list results end)
else tac

\<comment>\<open>Lookup named theorem list by name. If it does not exist, return \<^verbatim>\<open>NONE\<close>.
If it does, return the fully qualified name.\<close>
Expand All @@ -30,8 +64,9 @@ ML\<open>
NONE =>
let
val (name', ctxt') = Named_Theorems.declare (Binding.make (name, Position.none)) "" ctxt
val _ = Pretty.text "Created named theorem list:" @ [Pretty.brk 1, Pretty.str name]
|> Pretty.block |> locality_pretty_trace ctxt 1
val _ = locality_pretty_trace ctxt 1 (fn () =>
Pretty.text "Created named theorem list:" @ [Pretty.brk 1, Pretty.str name]
|> Pretty.block)
in
(true, name', ctxt')
end
Expand All @@ -57,4 +92,4 @@ ML\<open>
end
\<close>

end
end
Loading
Loading