Commit fde77c69 authored by Vincent Zweije's avatar Vincent Zweije
Browse files

Disable new abstraction node of trace

parent cde838a4
...@@ -89,6 +89,9 @@ all the introduced functions from it. ...@@ -89,6 +89,9 @@ all the introduced functions from it.
*/ */
/* Disable the new abstraction node
Unsafe subtraces are going to be pruned again.
:: FallibleTrace sym var pvar :: FallibleTrace sym var pvar
= GoodTrace (Trace sym var pvar) = GoodTrace (Trace sym var pvar)
| NeedAbstraction [Rgraph sym var] | NeedAbstraction [Rgraph sym var]
...@@ -158,8 +161,6 @@ handleredex _ _ _ _ _ _ = undef ...@@ -158,8 +161,6 @@ handleredex _ _ _ _ _ _ = undef
handlestrict :: (Spine sym var pvar) (Strat sym var pvar) (History sym var) (Rgraph sym var) -> FallibleTrace sym var pvar handlestrict :: (Spine sym var pvar) (Strat sym var pvar) (History sym var) (Rgraph sym var) -> FallibleTrace sym var pvar
handlestrict _ _ _ _ = undef handlestrict _ _ _ _ = undef
/*
------------------------------------------------------------ ------------------------------------------------------------
Types Types
......
...@@ -162,13 +162,16 @@ Implementation ...@@ -162,13 +162,16 @@ Implementation
| Stop | Stop
| Instantiate (Trace sym var pvar) | Instantiate (Trace sym var pvar)
(Trace sym var pvar) (Trace sym var pvar)
/* Disable the new abstraction node for now...
| Abstract [Abstraction sym var pvar] | Abstract [Abstraction sym var pvar]
:: Abstraction sym var pvar :: Abstraction sym var pvar
= NewAbstraction (Trace sym var pvar) = NewAbstraction (Trace sym var pvar)
| KnownAbstraction (Rule sym var) | KnownAbstraction (Rule sym var)
/* Alternatives for the Abstract constructor: Alternatives for the Abstract constructor:
Abstract [Trace sym var pvar] Abstract [Trace sym var pvar]
together with: Backpointer (Trace sym var pvar) together with: Backpointer (Trace sym var pvar)
......
...@@ -129,6 +129,9 @@ Implementation ...@@ -129,6 +129,9 @@ Implementation
| Stop | Stop
| Instantiate (Trace sym var pvar) | Instantiate (Trace sym var pvar)
(Trace sym var pvar) (Trace sym var pvar)
/* Disable the abstraction node for now...
| Abstract [Abstraction sym var pvar] | Abstract [Abstraction sym var pvar]
// Some abstractions (introduced recursion) spawn a fresh subtrace, but others // Some abstractions (introduced recursion) spawn a fresh subtrace, but others
...@@ -138,8 +141,6 @@ Implementation ...@@ -138,8 +141,6 @@ Implementation
= NewAbstraction (Trace sym var pvar) = NewAbstraction (Trace sym var pvar)
| KnownAbstraction (Rule sym var) | KnownAbstraction (Rule sym var)
/*
> showtrace showa showb showc (Trace stricts rule answer history transf) > showtrace showa showb showc (Trace stricts rule answer history transf)
> = "(Trace "++ > = "(Trace "++
> show (map strictchar stricts)++' ': > show (map strictchar stricts)++' ':
...@@ -236,7 +237,7 @@ foldtrace reduce annotate stop instantiate trace ...@@ -236,7 +237,7 @@ foldtrace reduce annotate stop instantiate trace
ftf stricts rule answer history (Annotate trace) = annotate stricts rule answer history (ftr trace) ftf stricts rule answer history (Annotate trace) = annotate stricts rule answer history (ftr trace)
ftf stricts rule answer history Stop = stop stricts rule answer history ftf stricts rule answer history Stop = stop stricts rule answer history
ftf stricts rule answer history (Instantiate yestrace notrace) = instantiate stricts rule answer history (ftr yestrace) (ftr notrace) ftf stricts rule answer history (Instantiate yestrace notrace) = instantiate stricts rule answer history (ftr yestrace) (ftr notrace)
ftf _ _ _ _ (Abstract _) = abort "foldtrace not implemented for abstraction nodes" // ftf _ _ _ _ (Abstract _) = abort "foldtrace not implemented for abstraction nodes"
foldtransformation foldtransformation
:: ((Trace sym var pvar) -> .result) :: ((Trace sym var pvar) -> .result)
...@@ -256,6 +257,6 @@ foldtransformation ftr reduce annotate stop instantiate abstract knownabstractio ...@@ -256,6 +257,6 @@ foldtransformation ftr reduce annotate stop instantiate abstract knownabstractio
ftf (Annotate trace) = annotate (ftr trace) ftf (Annotate trace) = annotate (ftr trace)
ftf Stop = stop ftf Stop = stop
ftf (Instantiate yestrace notrace) = instantiate (ftr yestrace) (ftr notrace) ftf (Instantiate yestrace notrace) = instantiate (ftr yestrace) (ftr notrace)
ftf (Abstract as) = abstract (map fab as) // ftf (Abstract as) = abstract (map fab as)
fab (NewAbstraction t) = newabstraction (ftr t) // fab (NewAbstraction t) = newabstraction (ftr t)
fab (KnownAbstraction r) = knownabstraction r // fab (KnownAbstraction r) = knownabstraction r
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment