next up previous contents index
Next: Matching and Substitution Up: Proof Annotations Previous: Goal Labels

Tactic Arguments

Unlike Lisp functions, ML functions cannot take optional arguments  , although it is natural to want to write tactics which do take optional arguments. One approach is to provide a set of variants of each tactic for the most common combinations of arguments. This can be confusing, and places an extra burden on the user who has to keep track of these variants. Nuprl V4 allows optional arguments to be passed to tactics by attaching these arguments to the proof argument which all tactics operate on. Currently argument types of int, tactic, term, tok, var and (var # term) list are supported. Each argument is given a token label, and arguments are looked up by these labels. Sets of arguments are maintained on a stack, so nesting of tactics which use optional arguments is possible.

Note that some tactics do useful preprocessing on some of their arguments, and in these cases there would be a performance penalty if such arguments were supplied, annotated to the proof.

Tactic arguments  are also used for the analogy tactics . See the relevant section below.

Tacticals for manipulating these arguments are:

With (t:term) T

  New ([v1;...;vn] : var list) T   At (U:term) T   Using (sub:(var # term) list) T   Sel (n:int) T  

These tactics are all special cases of:

WithArgs (args: (tok # arg) list) T

 

Each tactic description includes information on the optional arguments (if any) that it takes.



next up previous contents index
Next: Matching and Substitution Up: Proof Annotations Previous: Goal Labels



Karla Consroe
Wed Oct 23 13:48:45 EDT 1996