Skip to content

Commit

Permalink
Removing the need to 'solve' or 'keepSolving' everywhere
Browse files Browse the repository at this point in the history
darcs-hash:20060729234531-974a0-9578f70ef19fc14496d9db8ab4372f3de284bdb1.gz
  • Loading branch information
eb committed Jul 29, 2006
1 parent dab2999 commit 3f6e388
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
14 changes: 8 additions & 6 deletions Ivor/TT.lhs
Expand Up @@ -884,7 +884,7 @@ Convert an internal tactic into a publicly available tactic.
> -- by unification and solves them (with 'solve').
> -- See 'refineWith' and 'basicRefine' for slight variations.
> refine :: IsTerm a => a -> Tactic
> refine tm = basicRefine tm >=> trySolve
> refine tm = basicRefine tm >-> keepSolving
> -- | Solve a goal by applying a function.
> -- If the term given has arguments, this will create a subgoal for each.
Expand Down Expand Up @@ -941,8 +941,10 @@ Convert an internal tactic into a publicly available tactic.
> -- | Attach a solution to a goal.
> fill :: IsTerm a => a -> Tactic
> fill guess = do rawguess <- raw guess
> runTac (Tactics.fill rawguess)
> fill guess = fill' guess >-> keepSolving
> fill' guess = do rawguess <- raw guess
> runTac (Tactics.fill rawguess)
> -- | Remove a solution from a goal.
> abandon :: Tactic
Expand Down Expand Up @@ -1099,15 +1101,15 @@ FIXME: Choose a sensible name here
> -- | Apply an eliminator.
> by :: IsTerm a => a -- ^ An elimination rule applied to a target.
> -> Tactic
> by rule = by' rule >=> attack
> by rule = (by' rule >=> attack) >=> keepSolving
> by' rule = do rawrule <- raw rule
> runTac (Tactics.by rawrule)
> -- | Apply the appropriate induction rule to the term.
> induction :: IsTerm a => a -- ^ target of the elimination
> -> Tactic
> induction tm = induction' tm >=> attack
> induction tm = (induction' tm >=> attack) >=> keepSolving
> induction' tm = do rawtm <- raw tm
> runTac (Tactics.casetac True rawtm)
Expand All @@ -1116,7 +1118,7 @@ FIXME: Choose a sensible name here
> -- Like 'induction', but no induction hypotheses generated.
> cases :: IsTerm a => a -- ^ target of the case analysis
> -> Tactic
> cases tm = cases' tm >=> attack
> cases tm = (cases' tm >=> attack) >=> keepSolving
> cases' tm = do rawtm <- raw tm
> runTac (Tactics.casetac False rawtm)
Expand Down
4 changes: 1 addition & 3 deletions TODO
Expand Up @@ -2,10 +2,8 @@ Short term things to do:

* Current naive proof state representation is far too slow. Come up
with something better.
* API shouldn't really need to require use of attack/solve except in
specialised cases (e.g. fine control over refinement). Change it so
that shell and api are more or less consistent.
* Keep track of level in proof state.
* Keep track of binding level in context, and check at point of use.
* Allow dump of global context to disk, for fast reloading.
* Syntax for equality.
* Elimination with a motive.
Expand Down
4 changes: 3 additions & 1 deletion papers/ivor/corett.tex
Expand Up @@ -8,7 +8,8 @@ \subsection{The Core Calculus}
The core type theory of \Ivor{} is a strongly normalising dependent
type theory with inductive families~\cite{dybjer94}, similar to Luo's
UTT~\cite{luo94} or the Calculus of Inductive Constructions in
\Coq{}~\cite{coq-manual}. This language, which I call $\source$, is an
\Coq{}~\cite{coq-manual}.
This language, which I call $\source$, is an
enriched lambda calculus, with the usual properties of subject
reduction, Church Rosser, and uniqueness of types up to
conversion. The strong normalisation property (i.e. that evaluation
Expand Down Expand Up @@ -295,3 +296,4 @@ \subsection{Hole Manipulation}
\end{array}
}


3 changes: 2 additions & 1 deletion papers/ivor/examples.tex
@@ -1,4 +1,5 @@
\section{First Order Logic Theorem Prover}
\section{A First Order Logic Theorem Prover}

\section{\Funl{}, a Functional Language with a Built-in Theorem Prover}


17 changes: 9 additions & 8 deletions papers/ivor/tactics.tex
Expand Up @@ -130,17 +130,18 @@ \subsection{Tactic Combinators}

\subsubsection{Sequencing Tactics}

\hdecl{(>->) :: Tactic -> Tactic -> Tactic}

\hdecl{(>=>) :: Tactic -> Tactic -> Tactic}

\hdecl{(>+>) :: Tactic -> Tactic -> Tactic}
\begin{verbatim}
(>->) :: Tactic -> Tactic -> Tactic
(>=>) :: Tactic -> Tactic -> Tactic
(>+>) :: Tactic -> Tactic -> Tactic
\end{verbatim}

\subsubsection{Handling Failure}

\hdecl{try :: Tactic -> Tactic -> Tactic -> Tactic}

\begin{verbatim}
try :: Tactic -> Tactic -> Tactic -> Tactic
\end{verbatim}

\subsection{The Shell}

\subsection{Extending and Embedding}
\subsection{Extending and Embedding}

0 comments on commit 3f6e388

Please sign in to comment.