Implementation

From CoreASM Wiki

Jump to: navigation, search

Contents

To Be Implemented

Kernel

  • NO PLUGIN SHOULD RETURN NULL in its interpret(pos) method.

Standard Library

Number Plugin

  • integer ranges (seperate background, are enumerable, but not related to SETs)
  • although simple integer ranges have been implemented, they need to be revisited to allow for specified step sizes (using a ternary operator?)

String

Not much has been done so far!

!! needs specification

  • which operators are required? (only concat has been implemented)
  • STRING functions (length, what else?)

Set

  • setSize function

Additional Plugins

  • try/catch (L)

Math

A plugin with various mathematical functions such as:

  • rand()
  • sin(x)
  • ...

Implemented

Kernel

  • PushState and PopState
  • Monitored functions are cached by the engine

Standard Library

Rules

The following rule forms have been implemented:

  • block - see CoreASM-TR-3 TR section 4.4.1 and Java package org.coreasm.engine.stdplugins.blockrule
  • conditional - see CoreASM-TR-3 section 4.4.1 and Java package org.coreasm.engine.stdplugins.conditionalrule
  • choose - see CoreASM-TR-3 section 4.4.3 and Java package org.coreasm.engine.stdplugins.chooserule
  • extend - see CoreASM-TR-3 section 4.4.2 and Java package org.coreasm.engine.stdplugins.extendrule
  • forall - see CoreASM-TR-3 section 4.4.3 and Java package org.coreasm.engine.stdplugins.forallrule
  • let - see CoreASM-TR-3 section 4.4.1 and Java package org.coreasm.engine.stdplugins.letrule
  • local - see CoreASM-TR-3 sectuin 4.4.5 and Java package package org.coreasm.engine.stdplugins.turboasm
  • return - see CoreASM-TR-3 sectuin 4.4.3 and Java package package org.coreasm.engine.stdplugins.turboasm
  • return-result - see CoreASM-TR-3 section 4.4.5 and Java package org.coreasm.engine.stdplugins.turboasm
  • seq - see CoreASM-TR-3 section 4.4.4 and Java pacakge org.coreasm.engine.stdplugins.turboasm
  • iterate - see CoreASM-TR-3 section 4.4.4 and Java pacakge org.coreasm.engine.stdplugins.turboasm
  • while - see CoreASM-TR-3 section 4.4.4 and Java pacakge org.coreasm.engine.stdplugins.turboasm

Enumerable Plugin

  • the membership operator (IN)
  • forall and exists experssion forms
  • implemented: see CoreASM-TR-3 section 4.3.3 and Java package org.coreasm.engine.stdplugins.predicatelogic

Number Plugin

  • ordering relation operators (>,<, >=, <=)
  • numberClass functions (e.g., isNatural, isInteger, isReal) as derived functions
  • nurmberCharacteristic functions (odd, even, positive, negative, etc)
  • implemented: see CoreASM-TR-3 section 4.3.4 and Java package org.coreasm.engine.stdplugins.number

Set Plugin

  • set comprehensions: see CoreASM-TR-3 section 4.3.6 and Java package org.coreasm.engine.stdplugins.set

Input/Output

A plugin providing String-based input and output services. See:

  • CoreASM-TR-3 section 5.2
  • Java package org.coreasm.engine.stdplugins.io

Additional Plugins

Time

The proposal was for a time plugin with:

  • background TIME
  • now : TIME

Currently we have a time plugin with:

  • now : Number which represents the current time.

The benefit is that we can simply use comparison operators taken from number plugin. The same goes for time arithmetic (+/-), which would need to be re-implemented otherwise. In particular, an element of TIME would be a specific point in time, and we would need, in addition, a time span concept (and possibly modulus as well, e.g. "every midnight"), whereas an integer represents a specific point in time, and may also represent a time span. Hence, the current solution seems more practical (although less pure).

The amount of conceptual encoding involved in representing Time as a Number is, indeed, quite minimal, and arguably the opposite (keeping them distinct) could be more unnatural.

Personal tools