code.lang
Class SystemModule

java.lang.Object
  extended by code.modules.CurryModule
      extended by code.lang.SystemModule

public class SystemModule
extends CurryModule

This class defines a few "core" symbols, some of which cannot be defined in Curry.

Builtin symbols that want to work with TeaBag need to have two instructions sets, the normal one and one with debug instructions inserted. Currently, the parser removes debug instructions when the vm is not running in debug mode. However, builtin modules are not run through the parser. So builtin modules need to maintain two sets of instructions. See List.map for an example. Right now there is a number of builtin modules. Eventually, this will change so that there is just a small number of builtin modules that do not change much.

Since:
July 2, 2003
Author:
Sergio Antoy

Nested Class Summary
static class SystemModule.applyCode
           
static class SystemModule.ensureNotFreeCode
           
private static class SystemModule.eqGenericInstruction
           
private static class SystemModule.normalizeInstruction
           
private static class SystemModule.NotImplemented
           
static class SystemModule.seqCode
           
static class SystemModule.showInstruction
           
 
Field Summary
static java.lang.String applyName
           
private static OperationSymbol applyOperation
           
private static TypeExpression applyType
           
private static ConstructorSymbol closureConstructor
           
static java.lang.String closureName
           
private static TypeExpression closureType
           
private static DataSymbol commitOperation
           
private static Instruction[] condCode
           
private static java.lang.String condName
           
private static OperationSymbol condOperation
           
private static DataSymbol condSearchOperation
           
private static TypeExpression condType
           
static java.lang.String ensureNotFreeName
           
private static OperationSymbol ensureNotFreeOperation
           
private static TypeExpression ensureNotFreeType
           
private static Instruction[] eqGenericCode
           
static int eqGenericId
           
private static java.lang.String eqGenericName
           
private static OperationSymbol eqGenericOperation
           
private static TypeExpression eqGenericType
           
private static DataSymbol errorOperation
           
static java.lang.String moduleName
           
private static Instruction[] normalizeCode
           
static int normalizeId
           
static java.lang.String normalizeName
           
private static OperationSymbol normalizeOperation
           
private static TypeExpression normalizeType
           
private static DataSymbol oneOperation
           
static java.lang.String seqName
           
private static OperationSymbol seqOperation
           
private static TypeExpression seqType
           
static java.lang.String showName
           
private static OperationSymbol showOperation
           
private static TypeExpression showType
           
private static DataSymbol tryoneOperation
          Not yet implemented operations.
private static DataSymbol tryOperation
           
 
Fields inherited from class code.modules.CurryModule
compiled, fileLocation, timestamp
 
Constructor Summary
SystemModule()
           
 
Method Summary
private static java.util.Vector<DataSymbol> createSymbols()
           
 
Methods inherited from class code.modules.CurryModule
getAllSymbolsEnumeration, getImportedEnumeration, printAsTxtLoadable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moduleName

public static final java.lang.String moduleName
See Also:
Constant Field Values

seqName

public static final java.lang.String seqName
See Also:
Constant Field Values

seqType

private static final TypeExpression seqType

seqOperation

private static final OperationSymbol seqOperation

ensureNotFreeName

public static final java.lang.String ensureNotFreeName
See Also:
Constant Field Values

ensureNotFreeType

private static final TypeExpression ensureNotFreeType

ensureNotFreeOperation

private static final OperationSymbol ensureNotFreeOperation

normalizeName

public static final java.lang.String normalizeName
See Also:
Constant Field Values

normalizeId

public static final int normalizeId

normalizeType

private static final TypeExpression normalizeType

normalizeCode

private static Instruction[] normalizeCode

normalizeOperation

private static final OperationSymbol normalizeOperation

eqGenericName

private static final java.lang.String eqGenericName
See Also:
Constant Field Values

eqGenericType

private static final TypeExpression eqGenericType

eqGenericCode

private static Instruction[] eqGenericCode

eqGenericOperation

private static final OperationSymbol eqGenericOperation

eqGenericId

public static final int eqGenericId

applyName

public static final java.lang.String applyName
See Also:
Constant Field Values

applyType

private static final TypeExpression applyType

applyOperation

private static final OperationSymbol applyOperation

closureName

public static final java.lang.String closureName
See Also:
Constant Field Values

closureType

private static final TypeExpression closureType

closureConstructor

private static final ConstructorSymbol closureConstructor

condName

private static final java.lang.String condName
See Also:
Constant Field Values

condType

private static final TypeExpression condType

condCode

private static final Instruction[] condCode

condOperation

private static final OperationSymbol condOperation

showName

public static final java.lang.String showName
See Also:
Constant Field Values

showType

private static final TypeExpression showType

showOperation

private static final OperationSymbol showOperation

tryoneOperation

private static final DataSymbol tryoneOperation
Not yet implemented operations. Must be somewhat defined to avoid error messages. Throw an exception if they are executed


oneOperation

private static final DataSymbol oneOperation

tryOperation

private static final DataSymbol tryOperation

condSearchOperation

private static final DataSymbol condSearchOperation

commitOperation

private static final DataSymbol commitOperation

errorOperation

private static final DataSymbol errorOperation
Constructor Detail

SystemModule

public SystemModule()
Method Detail

createSymbols

private static java.util.Vector<DataSymbol> createSymbols()