HOL icon indicating copy to clipboard operation
HOL copied to clipboard

Speed up net filtering by names in the simplifier

Open ordinarymath opened this issue 4 months ago • 1 comments

Currently the check to filter out a net by name in the simplifier is complicated and slow https://github.com/HOL-Theorem-Prover/HOL/blob/24e40cd1c7f7e235a5c9f32f692c0d9ae04ddb2b/src/simp/src/simpLib.sml#L272C1-L275C66

            val checknamepart =
                patbase = ssnm orelse
                "rewrite:" ^ patbase = ssnm orelse
                String.isPrefix ("rewrite:" ^ patbase ^ ".") ssnm

This should only be one check and more information currently stored in the string should move to conv_info https://github.com/HOL-Theorem-Prover/HOL/blob/24e40cd1c7f7e235a5c9f32f692c0d9ae04ddb2b/src/simp/src/simpLib.sml#L233C1-L234C76

ordinarymath avatar Aug 23 '25 18:08 ordinarymath

It's slow but called very infrequently; this doesn't feel like a high priority.

mn200 avatar Aug 25 '25 01:08 mn200