aboutsummaryrefslogtreecommitdiffhomepage
path: root/ccc
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2004-04-06 15:04:11 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2004-04-06 15:04:11 +0000
commit59c8f587f0997a18acb531e19a22cd8b389e4cb1 (patch)
tree564b3c8cdd7e3ef367d0c6f52b689d545762c8c4 /ccc
parent6fa0cbce5be983dc3134331e1a8add70e1268a57 (diff)
Added example count undos function (completely untested)
Diffstat (limited to 'ccc')
-rw-r--r--ccc/ccc.el28
1 files changed, 28 insertions, 0 deletions
diff --git a/ccc/ccc.el b/ccc/ccc.el
index f7b55a03..b2dc68d7 100644
--- a/ccc/ccc.el
+++ b/ccc/ccc.el
@@ -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)
+
+