trait Environments extends AnyRef
General implementation of environments as stacked scopes. The objects associated with names in environments are of type Entity.
- Source
- Environments.scala
- Alphabetic
- By Inheritance
- Environments
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
Environment = List[Scope]
An environment is a stack of scopes with the innermost scope on the top.
-
trait
Named
extends AnyRef
Support for unique ids for named things.
-
trait
NamedEntity
extends Entity with Named
A named entity.
-
type
Scope = Map[String, Entity]
A scope maps identifiers to entities.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
define(env: Environment, i: String, e: Entity): Environment
Define i to be e in the current scope of env, raising an error if the environment is empty.
-
def
enter(env: Environment): Environment
Enter a new empty scope nested within the given environment.
-
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] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
isDefinedInEnv(env: Environment, i: String): Boolean
Say whether i is defined in any scope of env.
-
def
isDefinedInInner(env: Environment, i: String): Boolean
Say whether i is defined in an innermost scope of env (i.e., in the current scope).
-
def
isDefinedInOuter(env: Environment, i: String): Boolean
Say whether i is defined in an outer scope of env (i.e., not in the current scope).
-
def
isDefinedInScope(scope: Scope, i: String): Boolean
Say whether i is defined in the given scope.
-
def
isDefinedInScope(env: Environment, i: String): Boolean
Say whether i is defined in the current scope of env.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
leave(env: Environment): Environment
Leave the outermost scope of the given environment, raising an error if the environment is empty.
-
def
lookup(env: Environment, i: String, e: Entity, scope: Boolean = false): Entity
Look up i in env, returning the mapped Entity if there is one, otherwise return e.
Look up i in env, returning the mapped Entity if there is one, otherwise return e. If scope is true, just search the innermost scope, otherwise search outwards in all scopes, returning the first Entity found, if any.
-
val
nameCounter: Counter
A counter to count generated names.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
resetEnvironments(): Unit
Reset the environment module.
-
def
rootenv(bindings: (String, Entity)*): Environment
Create a root environment, i.e., one that has a single scope containing the given bindings.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- 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( ... )