Package avail.descriptor.methods

Types

Link copied to clipboard
interface A_ChunkDependable : A_BasicObject

A_ChunkDependable is an interface that specifies behavior specific to values on which chunks can depend. When those objects change in some way, dependent chunks must be invalidated. The rate of change of such objects is expected to be very low compared to the number of times the dependent chunks are invoked.

Link copied to clipboard
interface A_Definition : A_Sendable

A_Definition is an interface that specifies the operations specific to definitions (of a method) in Avail. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard
interface A_GrammaticalRestriction : A_BasicObject

A_GrammaticalRestriction is an interface that specifies the operations suitable for a grammatical restriction. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard
interface A_Macro : A_Sendable

A_Macro is an interface that specifies how a send phrase that appears to invoke some method should be transformed to another phrase. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard
interface A_Method : A_ChunkDependable

A_Method is an interface that specifies behavior specific to Avail methods that an AvailObject must implement.

Link copied to clipboard
interface A_SemanticRestriction : A_BasicObject

A_SemanticRestriction is an interface that specifies the operations suitable for a semantic restriction. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard
interface A_Sendable : A_BasicObject

A_Sendable is the common superinterface that subsumes A_Definition and A_Macro. It's the kind of thing for which an invocation site can be parsed.

Link copied to clipboard
interface A_Styler : A_BasicObject

A_Styler is an interface that specifies the operations specific to stylers of a method definition in Avail. It's a sub-interface of A_BasicObject, the interface that defines the behavior that all AvailObjects are required to support.

Link copied to clipboard
class AbstractDefinitionDescriptor : DefinitionDescriptor

This is a specialization of DefinitionDescriptor that is an abstract declaration of an Avail method (i.e., no implementation).

Link copied to clipboard
abstract class DefinitionDescriptor : Descriptor

DefinitionDescriptor is an abstraction for things placed into a method. They can be:

Link copied to clipboard
class ForwardDefinitionDescriptor : DefinitionDescriptor

This is a forward declaration of a method. An actual method must be defined with the same signature before the end of the current module.

Link copied to clipboard
class GrammaticalRestrictionDescriptor : Descriptor

A GrammaticalRestrictionDescriptor grammatical restriction serves to exclude specific parses of nested method sends, thereby defining the negative space of a grammar. As it happens, this negative space is significantly more modular than traditional positive grammars, in which precedence between all operations is specified explicitly. Not only is the negative space scheme more modular, but the class of grammars specifiable this way is much more powerful.

Link copied to clipboard
class MacroDescriptor : Descriptor

Macros are extremely hygienic in Avail. They are defined almost exactly like ordinary multimethods. The first difference is which primitive is used to define a macro versus a method. The other difference is that instead of generating code at an occurrence to call a method (a call site), the macro body is immediately invoked, passing the phrases that occupy the corresponding argument positions in the method/macro name. The macro body will then do what it does and return a suitable replacement phrase.

Link copied to clipboard
class MethodDefinitionDescriptor : DefinitionDescriptor

An object instance of MethodDefinitionDescriptor represents a function in the collection of available functions for this method hierarchy.

Link copied to clipboard
class MethodDescriptor : Descriptor

A method maintains all A_Definitions that have the same name. At compile time a name is looked up and the corresponding method is stored as a literal in the object code for a call site. At runtime, the actual function is located within the method and then invoked. The methods also keep track of bidirectional dependencies, so that a change of membership (e.g., adding a method definition) causes an immediate invalidation of optimized level two code that depends on the previous membership.

Link copied to clipboard
class SemanticRestrictionDescriptor : Descriptor

A semantic restriction holds a function to invoke when compiling a potential call site of a method. The arguments' static types at the call site are passed to the function, and if successful it produces a result type used to further restrict the expected type at that call site. Instead, it may invoke P_RejectParsing to cause that call site to be rejected as a possible parse, supplying a message describing the nature of the rejection. The message will be shown to the user if no significant parsing beyond this point in the source file was possible. Raising an unhandled exception during execution of the semantic restriction will similarly be wrapped with a suitable error string and possibly a stack trace, leading to a parse rejection just as with the explicit rejection primitive.

Link copied to clipboard
class StylerDescriptor : Descriptor

An A_Styler is the mechanism by which abstract styles are associated with a module's phrases and tokens. Stylers are created within the scope of a module, and attached to a single A_Method.