diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2004-04-06 15:04:11 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2004-04-06 15:04:11 +0000 |
commit | 59c8f587f0997a18acb531e19a22cd8b389e4cb1 (patch) | |
tree | 564b3c8cdd7e3ef367d0c6f52b689d545762c8c4 /ccc | |
parent | 6fa0cbce5be983dc3134331e1a8add70e1268a57 (diff) |
Added example count undos function (completely untested)
Diffstat (limited to 'ccc')
-rw-r--r-- | ccc/ccc.el | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -41,6 +41,34 @@ proof-shell-init-cmd "" proof-shell-proof-completed-regexp "^Consistency proof successfully finished." proof-shell-eager-annotation-start "^\\[opening \\|^###\\|^Reading" ;;; ??? + proof-count-undos-fn 'ccc-count-undos ) + +;; da: example of a possible count undos function -- replace upper case +;; strings by real stuff + +(defun ccc-count-undos (span) + "Count number of undos in a span, return the command needed to undo that far." + (let + ((count-ccc 0) + (count-casl 0) + casl) + (while span + (setq str (span-property span 'cmd)) + (if (proof-string-match "HOL-CASL GOAL COMMAND REGEXP" str) + (setq casl t)) + (cond ((eq (span-property span 'type) 'vanilla) + (unless (proof-string-match proof-non-undoables-regexp str) + (if casl + (setq count-casl (+ 1 count-casl)) + (setq count-ccc (+ 1 count-ccc)))))) + (setq span (next-span span 'type))) + (format + "HOL-CASL UNDOS (%s); CCC-UNDOS (%s);" + count-cassl count-ccc))) + + (provide 'ccc) + + |