Opened 16 years ago

Closed 15 years ago

#199 closed enhancement (fixed)

Allow use of Isabelle.command to wrap commands singly

Reported by: David Aspinall Owned by: David Aspinall
Priority: minor Milestone: PG-Emacs-4.0
Component: 2:pg-emacs Keywords:
Cc:

Description

Isabelle.command allows additional "properties" to be attached to individual commands when they are processed by Isar. Example properties are file name and line number (Isabelle Position type), which are not maintained by the top-level loop, but would be useful to get error messages to include this information when processing interactively.

Attachments (2)

isar.el (22.5 KB) - added by Makarius 16 years ago.
command-wrapping.patch (2.8 KB) - added by David Aspinall 16 years ago.
Updated patch for command wrapping

Download all attachments as: .zip

Change History (8)

Changed 16 years ago by Makarius

Attachment: isar.el added

comment:1 Changed 16 years ago by Makarius

The attached version of isar.el implements basic wrapping of commands, without any position information yet. Nevertheless, it helps to avoid synchronization problems (with malformed tokens like -- "\bad").

Note: PG tends to paste several commands together internally, which is incompatible with the singleton wrapping; e.g. undo sequences.

comment:2 Changed 16 years ago by David Aspinall

Status: newassigned

Changed 16 years ago by David Aspinall

Attachment: command-wrapping.patch added

Updated patch for command wrapping

comment:3 Changed 16 years ago by David Aspinall

Milestone: PG-Emacs-3.7.1PG-Emacs-3.7.2

Remark: attached a patch with just this change.

Breaking apart conjoined undo commands is possible in principle but requires considerable reworking because then each undo step must then carry the distance that it undoes, and this change would need to be made in every prover.

Since we only need this for the degenerate case of control ("improper", non proof-script) commands which do not require position information, could we instead add a different wrapper for those ones, which allows several commands? Something like Isabelle.controlcommands.

comment:4 Changed 16 years ago by David Aspinall

Milestone: PG-Emacs-3.7.2PG-Emacs-4.0

comment:5 Changed 15 years ago by David Aspinall

Remark: version 10.9 of isar.el now adds a slightly modified version of this patch. To avoid the problem with sequences of commands it does not wrap any that look like undo commands. Note: "look like" is approximate as the regexp could be fooled.

I have a partial patch for a more robust solution, which allows batching up a sequence of commands to send. This is still in progress as is actually passing some useful position information.

comment:6 Changed 15 years ago by David Aspinall

Resolution: fixed
Status: assignedclosed

Position information is now passed to Isabelle.

Line and file numbers are reported back enthusiastically by Isabelle in error messages, but it seems that column numbers are not.

Note: See TracTickets for help on using tickets.