abstract class MemoStrategy extends Strategy with IdMemoised[Any, Option[Any]]
- Source
- MemoRewriter.scala
- Alphabetic
- By Inheritance
- MemoStrategy
- IdMemoised
- MemoisedBase
- Strategy
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MemoStrategy(name: String)
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(name: String, q: ⇒ Strategy): PlusStrategy
As for the other
+with the first argument specifying a name for the constructed strategy.As for the other
+with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
+(q: Strategy): PlusStrategy
Non-deterministic choice.
Non-deterministic choice. Normally, construct a strategy that first applies either this strategy or the given strategy. If it succeeds, succeed with the resulting term. Otherwise, apply
q. Currently implemented as deterministic choice, but this behaviour should not be relied upon. When used as the argument to the<conditional choice combinator,+just serves to hold the two strategies that are chosen between by the conditional choice.qis evaluated at most once.- Definition Classes
- Strategy
-
def
<(name: String, lr: ⇒ PlusStrategy): Strategy
As for the other
<with the first argument specifying a name for the constructed strategy.As for the other
<with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<(lr: PlusStrategy): Strategy
Conditional choice:
c < l + r.Conditional choice:
c < l + r. Construct a strategy that first applies this strategy (c). Ifcsucceeds, the strategy applieslto the resulting term, otherwise it appliesrto the original subject term.lris evaluated at most once.- Definition Classes
- Strategy
-
def
<*(name: String, q: ⇒ Strategy): Strategy
As for the other
<*with the first argument specifying a name for the constructed strategy.As for the other
<*with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<*(q: Strategy): Strategy
Sequential composition.
Sequential composition. Construct a strategy that first applies this strategy. If it succeeds, then apply
qto the new subject term. Otherwise fail.qis evaluated at most once.- Definition Classes
- Strategy
-
def
<+(name: String, q: ⇒ Strategy): Strategy
As for the other
<+with the first argument specifying a name for the constructed strategy.As for the other
<+with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<+(q: Strategy): Strategy
Deterministic choice.
Deterministic choice. Construct a strategy that first applies this strategy. If it succeeds, succeed with the resulting term. Otherwise, apply
qto the original subject term.qis evaluated at most once.- Definition Classes
- Strategy
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (Option[Any]) ⇒ A): (Any) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
apply(r: Any): Option[Any]
Return the value of this attribute for node
t, raising an error if it depends on itself.Return the value of this attribute for node
t, raising an error if it depends on itself.- Definition Classes
- MemoStrategy → Strategy → Function1
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
compose[A](g: (A) ⇒ Any): (A) ⇒ Option[Any]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
dup(t1: Any, t2: Any, u: Option[Any]): Unit
Duplicate an entry if possible.
Duplicate an entry if possible. If
t1has a memoised value associated with it, set the value associated witht2to the same value. If there is no value associated witht1, set the value associated witht2tou.- Definition Classes
- MemoisedBase
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get(t: Any): Option[Option[Any]]
Return the value stored at key
tas an option.Return the value stored at key
tas an option.- Definition Classes
- MemoisedBase
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getWithDefault(t: Any, u: Option[Any]): Option[Any]
Return the value stored at key
tif there is one, otherwise returnu.Return the value stored at key
tif there is one, otherwise returnu.- Definition Classes
- MemoisedBase
-
def
hasBeenComputedAt(t: Any): Boolean
Has the value of this attribute at
talready been computed or not? By default, does the memo table contain a value fort?Has the value of this attribute at
talready been computed or not? By default, does the memo table contain a value fort?- Definition Classes
- MemoisedBase
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
memo: Cache[AnyRef, AnyRef]
The memo table.
The memo table.
- Definition Classes
- IdMemoised → MemoisedBase
-
def
mkStrategy(name: String, f: (Any) ⇒ Option[Any]): Strategy
Make one of these strategies with the given name and body
f.Make one of these strategies with the given name and body
f.- Definition Classes
- MemoStrategy → Strategy
-
val
name: String
- Definition Classes
- Strategy
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
put(t: Any, u: Option[Any]): Unit
Store the value
uunder the keyt.Store the value
uunder the keyt.- Definition Classes
- MemoisedBase
-
def
putIfNotPresent(t: Any, u: Option[Any]): Unit
Store the value
uunder the keytiftdoes not already have an associated value.Store the value
uunder the keytiftdoes not already have an associated value.- Definition Classes
- MemoisedBase
-
def
reset(): Unit
Immediately reset the memo table.
Immediately reset the memo table.
- Definition Classes
- MemoisedBase
-
def
resetAt(t: Any): Unit
Immediately reset the memo table at
t.Immediately reset the memo table at
t.- Definition Classes
- MemoisedBase
-
def
resetIfRequested(): Unit
Check to see if a reset has been requested via the common memo version, and if so, do it.
Check to see if a reset has been requested via the common memo version, and if so, do it.
- Definition Classes
- MemoisedBase
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Identify this strategy by its name.
Identify this strategy by its name.
- Definition Classes
- Strategy → Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )