Generated: Wednesday, June 6, 2007, 07:31:31 A SchemeDoc Manual

Ryan Newton Computer Science and Artificial Intelligence Laboratory MIT

Source file: /home/newton/wavescript/doc/html/generic/compiler_components/prim_defs.ss.tmp

The type-bindings for all Regiment and TML primitives. [2004.07.28] Introducing 'Area'. Note that a Region is also an Area. Ok, redoing primitive listings with type information: The types I'm using right now are:
Anchor, Area, Region, Stream, Event, Node, Location, Reading Number, Int, Float, Bool, Void List, Array, Tuple

Then some types that are used only in the local language are: Token NodeID

TODO TODO TODO: Need to phase out the old type defs and make this the only one. The lists of primitives here have entries of the form:

[PrimName Type] -- For constants
[PrimName ArgTypess ReturnType] -- For functions

Table of Contents:
1. Misc global definitions. 3. General Regiment/WaveScript primitives. 5. Type signatures for TML/Node-local primitives.
2. Type signatures for primitives that are singled out in some way. 4. Aggregates of the above sets of primitives. 6. Various small functions, related to primitive tables.

Alphabetic index:
basic-primitive? (basic-primitive? x) More specific classification of Regiment primitives.
distributed-primitive? (distributed-primitive? x) More specific classification of Regiment primitives.
generic-arith-primitives generic-arith-primitives Hierarchy: Int8 Int16 Int Float Int64 Double Complex32 Complex64
get-primitive-entry (get-primitive-entry prim) [2004.06.24]
This is for the regiment primitives:
get-primitive-return-type (get-primitive-return-type prim) Gotta remember to update this if I change the format of prim entries..
higher-order-primitives higher-order-primitives These are (or will be) allowed in both the meta and the object language.
local-node-primitives local-node-primitives These are pretty much compiler-internal primitives which can operate on the local node.
map-prim-w-types (map-prim-w-types f prim origargs) This lets you easily line up a primitives arguments with the expected types.
meta-only-primitives meta-only-primitives Only for the meta-language, shouldn't exist after static-elaborate.
primitives-hash primitives-hash This private state keeps a hash-table of all regiment primitives for fast lookup:
regiment-basic-primitives regiment-basic-primitives These are the basic (non-distributed) primitives supported by the Regiment language.
regiment-constant? (regiment-constant? x) Is it a regiment constant?
regiment-constants regiment-constants These count as primitives also.
regiment-distributed-primitives regiment-distributed-primitives These are the distributed primitives.
regiment-primitive? (regiment-primitive? x) Is it a regiment primitive?
regiment-primitives regiment-primitives [2007.01.30] Upgrading this to a parameter.
regiment-type-aliases regiment-type-aliases These are type aliases that are defined by default.
token-machine-keyword? (token-machine-keyword? x) Keywords allowed in the restricted token machine language.
token-machine-primitive? (token-machine-primitive? x) Predicate for token machine primitives.
token-machine-primitives token-machine-primitives [2004.06.09]
Many of these are actually language forms.
wavescript-effectful-primitives wavescript-effectful-primitives All side-effecting primitives MUST go here and must return UNIT:
wavescript-primitives wavescript-primitives Adding Wavescope-related primitives:
wavescript-stream-primitives wavescript-stream-primitives These are the ones that take or return Stream values: Be wary that this is only computed once while "regiment-primitives" might change.


1 Misc global definitions.

regiment-type-aliases
Form regiment-type-aliases
Description These are type aliases that are defined by default.
See also Scheme source file regiment-type-aliases


2 Type signatures for primitives that are singled out in some way.

generic-arith-primitives
Form generic-arith-primitives
Description Hierarchy: Int8 Int16 Int Float Int64 Double Complex32 Complex64
See also Scheme source file generic-arith-primitives

higher-order-primitives
Form higher-order-primitives
Description These are (or will be) allowed in both the meta and the object language. They're higher order, but in the object language the lambda expression parameterizing each of these primitives must be *known* so that first-order code may be generated.
See also Scheme source file higher-order-primitives

meta-only-primitives
Form meta-only-primitives
Description Only for the meta-language, shouldn't exist after static-elaborate. TODO: FIXME: Don't think I enforce this right now!!
See also Scheme source file meta-only-primitives

wavescript-effectful-primitives
Form wavescript-effectful-primitives
Description All side-effecting primitives MUST go here and must return UNIT:
See also Scheme source file wavescript-effectful-primitives


3 General Regiment/WaveScript primitives.

regiment-constants
Form regiment-constants
Description These count as primitives also. All regiment constants are presumed to be "slow prims" for now. (see add-heartbeats)
See also Scheme source file regiment-constants

regiment-basic-primitives
Form regiment-basic-primitives
Description These are the basic (non-distributed) primitives supported by the Regiment language.
See also Scheme source file regiment-basic-primitives

wavescript-primitives
Form wavescript-primitives
Description Adding Wavescope-related primitives:
See also Scheme source file wavescript-primitives

regiment-distributed-primitives
Form regiment-distributed-primitives
Description These are the distributed primitives. The real Regiment combinators.

These pretty much apply only to Regiment 1.0 and not WaveScript.
See also Scheme source file regiment-distributed-primitives


4 Aggregates of the above sets of primitives.

primitives-hash
Form primitives-hash
Description This private state keeps a hash-table of all regiment primitives for fast lookup:
See also Scheme source file primitives-hash

regiment-primitives
Form regiment-primitives
Description [2007.01.30] Upgrading this to a parameter. (A box might have better performance.)
See also Scheme source file regiment-primitives

wavescript-stream-primitives
Form wavescript-stream-primitives
Description These are the ones that take or return Stream values: Be wary that this is only computed once while "regiment-primitives" might change.
See also Scheme source file wavescript-stream-primitives


5 Type signatures for TML/Node-local primitives.

local-node-primitives
Form local-node-primitives
Description These are pretty much compiler-internal primitives which can operate on the local node.
See also Scheme source file local-node-primitives

token-machine-primitives
Form token-machine-primitives
Description [2004.06.09]
Many of these are actually language forms. I gotta get this sorted out eventually.
[2004.10.22] For now everything that handles tokens is a syntax not a prim.
[2005.05] I revoked that. Basically everything is a prim now.
See also Scheme source file token-machine-primitives


6 Various small functions, related to primitive tables.

token-machine-keyword?
Form (token-machine-keyword? x)
Description Keywords allowed in the restricted token machine language.
See also Scheme source file token-machine-keyword?

get-primitive-entry
Form (get-primitive-entry prim)
Description [2004.06.24]
This is for the regiment primitives:
See also Scheme source file get-primitive-entry

get-primitive-return-type
Form (get-primitive-return-type prim)
Description Gotta remember to update this if I change the format of prim entries..
See also Scheme source file get-primitive-return-type

map-prim-w-types
Form (map-prim-w-types f prim origargs)
Description This lets you easily line up a primitives arguments with the expected types.
See also Scheme source file map-prim-w-types

regiment-primitive?
Form (regiment-primitive? x)
Description Is it a regiment primitive?
See also Scheme source file regiment-primitive?

regiment-constant?
Form (regiment-constant? x)
Description Is it a regiment constant?
See also Scheme source file regiment-constant?

basic-primitive?
Form (basic-primitive? x)
Description More specific classification of Regiment primitives.
See also Scheme source file basic-primitive?

distributed-primitive?
Form (distributed-primitive? x)
Description More specific classification of Regiment primitives.
See also Scheme source file distributed-primitive?

token-machine-primitive?
Form (token-machine-primitive? x)
Description Predicate for token machine primitives.
See also Scheme source file token-machine-primitive?

Generated: Wednesday, June 6, 2007, 07:31:31
Generated by LAML SchemeDoc using LAML Version 31.0 (May 1, 2006, full)