WAP-193-WMLScript Language Specification: Static Conformance Requirements
Pascal Haakmat, $Id: WAP193-CONFORMANCE.html,v 1.4 2000/11/28 14:30:36 pascal Exp $
Conformance matrix of WMLScript module against [WAP-193]
June-2000. Please read note 0.
Legend:
- unknown
- Implementation may not be fully conformant.
- partial
- Implementation is not fully conformant.
- n
- Not implemented.
- y
- Implementation is fully conformant.
15.1 Encoder
15.1.1 Core Capabilities
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-001 |
Floating Point Support |
Support for Integer Only Devices |
M |
y |
WMLS-002 |
WMLScript Standard Libraries |
[WMLSLibs] |
M |
partial |
15.1.2 WMLScript Language Core
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-003 |
Language is case-sensitive |
Case Sensitivity |
M |
y |
WMLS-004 |
Ignore extra white space and line break between program tokens |
Whitespace and Line Breaks |
M |
y |
WMLS-005 |
Semicolon is used to terminate certain statements |
Usage of Semicolons |
M |
y |
WMLS-006 |
Multi-line and single-line comments |
Comments |
M |
partial1 |
WMLS-007 |
Disallows nested comments |
Comments |
M |
y |
WMLS-008 |
Integer literals |
Integer Literals |
M |
y |
WMLS-009 |
Floating point literals |
Floating-Point Literals |
M |
unknown2 |
WMLS-010 |
String literals, single and double quoted |
String Literals |
M |
y |
WMLS-011 |
Special escape sequences |
String Literals |
M |
partial3 |
WMLS-012 |
Boolean literals |
Boolean Literals |
M |
y |
WMLS-013 |
Invalid literal |
Invalid Literal |
M |
y |
WMLS-014 |
Identifier syntax |
Identifiers |
M |
y |
WMLS-015 |
Variable scope and lifetime |
Variable Scope and Lifetime |
M |
y |
WMLS-016 |
Integer size |
Integer Size |
M |
y |
WMLS-017 |
Floating point size |
Floating-point Size |
M |
partial4 |
WMLS-018 |
Assignment operators |
Assignment Operators |
M |
y |
WMLS-019 |
Arithmetic operators |
Arithmetic Operators |
M |
y |
WMLS-020 |
Logical operators |
Logical Operators |
M |
y |
WMLS-021 |
String operators |
String Operators |
M |
y |
WMLS-022 |
Comparison operators |
Comparison Operators |
M |
y |
WMLS-023 |
Array operators |
Array Operators |
M |
y |
WMLS-024 |
Comma operator |
Comma Operator |
M |
y |
WMLS-025 |
Conditional operator |
Conditional Operator |
M |
y |
WMLS-028 |
Expression bindings |
Expression Bindings |
M |
y |
WMLS-030 |
Local script functions calls |
Local Script Functions |
M |
y |
WMLS-031 |
External function calls |
External Functions |
M |
n |
WMLS-032 |
Library function calls |
Library Functions |
M |
y |
WMLS-033 |
Default function return value |
Default Return Value |
M |
y |
WMLS-034 |
Empty statement |
Empty Statement |
M |
y |
WMLS-035 |
Block statement |
Block Statement |
M |
y |
WMLS-036 |
Variable statement |
Variable Statement |
M |
y |
WMLS-037 |
if statement |
If Statement |
M |
y |
WMLS-038 |
while statement |
While Statement |
M |
y |
WMLS-039 |
for statement |
For Statement |
M |
y |
WMLS-040 |
break statement |
Break Statement |
M |
y |
WMLS-041 |
continue statement |
Continue Statement |
M |
y |
WMLS-042 |
return statement |
Return Statement |
M |
y |
WMLS-043 |
External compilation unit pragma |
External Compilation Units |
M |
y |
WMLS-044 |
Access control pragma |
Access Control |
M |
y |
WMLS-045 |
Meta information pragma |
Meta-Information |
M |
y |
15.1.3 Function Calls
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-046 |
Function argument passing |
Passing of Function Arguments |
M |
y |
WMLS-047 |
Allocation of variable indexes |
Allocation of Variable Indexes |
M |
y |
WMLS-048 |
Automatic function return value |
Automatic Function Return Value |
M |
y |
WMLS-049 |
Variable initialization |
Initialisation of Variables |
M |
y |
15.1.4 Binary Format
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-050 |
Binary format data types |
Used Data Types |
M |
n |
WMLS-051 |
Multi-byte integer format |
Multi-byte Integer Format |
M |
n |
WMLS-052 |
Character encoding |
Character Encoding |
M |
n |
WMLS-053 |
Header Info |
Bytecode Header |
M |
n |
WMLS-054 |
Constant Pool |
Constant Pool |
M |
n |
WMLS-055 |
Pragma Pool |
Pragma Pool |
M |
n |
WMLS-056 |
Function Pool |
Function Pool |
M |
n |
15.1.5 Instruction Set
Item | Function | Reference | Encoder Status | Conformance |
WMLS-057 |
Control flow instructions |
Control Flow Instructions |
M |
n |
WMLS-058 |
Function call instructions |
Function Call Instructions |
M |
n |
WMLS-059 |
Variable access and manipulation |
Variable Access and Manipulation |
M |
n |
WMLS-060 |
Access to constants |
Access To Constants |
M |
n |
WMLS-061 |
Arithmetic instructions |
Arithmetic Instructions |
M |
n |
WMLS-062 |
Bitwise instructions |
Bitwise Instructions |
M |
n |
WMLS-063 |
Comparison instructions Comparison |
Instructions |
M |
n |
WMLS-064 |
Logical instructions |
Logical Instructions |
M |
n |
WMLS-065 |
Stack instructions |
Stack Instructions |
M |
n |
WMLS-066 |
Access to operand type |
Access to Operand Type |
M |
n |
WMLS-067 |
Return instructions |
Function Return Instructions |
M |
n |
WMLS-068 |
Debug instruction |
Miscellaneous Instructions |
O |
n |
15.2 Interpreter
15.2.1 Core Capabilities
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-069 |
Support for interpreting WMLScript bytecode |
WMLScript Bytecode Interpreter |
M |
n |
WMLS-070 |
WMLScript Standard Libraries |
[WMLSLibs] |
M |
y |
15.2.2 Automatic Data Conversion
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-071 |
Conversions to String |
Conversions to String |
M |
y |
WMLS-072 |
Conversions to Integer |
Conversions to Integer |
M |
y |
WMLS-073 |
Conversions to Floating Point |
Conversions to Floating-Point |
O |
y |
WMLS-074 |
Conversions to Boolean |
Conversions to Boolean |
M |
y |
WMLS-075 |
Conversions to Invalid |
Conversions to Invalid |
M |
y |
WMLS-076 |
Operator data type conversion rules |
Operator Data Type Conversion Rules |
M |
y |
15.2.3 Function Calls
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-077 |
URL schemes |
URL Schemes |
M |
n |
WMLS-078 |
Fragment anchor |
Fragment Anchors |
M |
n |
WMLS-079 |
URL call syntax |
URL Call Syntax |
M |
n |
WMLS-080 |
URL call parameter passing |
URL Calls and Parameter Passing |
M |
n |
WMLS-081 |
Support for relative URLs |
Relative URLs |
M |
n |
WMLS-082 |
Function argument passing |
Passing of Function Arguments |
M |
y |
WMLS-083 |
Allocation of variable indexes |
Allocation of Variable Indexes |
M |
y |
WMLS-084 |
Automatic function return value |
Automatic Function Return Value |
M |
y |
WMLS-085 |
Variable initialization |
Initialisation of Variables |
M |
y |
WMLS-086 |
Access control |
Access Control |
M |
y |
15.2.4 Binary Format
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-087 |
Binary format data types |
Used Data Types |
M |
n |
WMLS-088 |
Multi-byte integer format |
Multi-byte Integer Format |
M |
n |
WMLS-089 |
Character encoding |
Character Encoding |
M |
n |
WMLS-090 |
Header Info |
Bytecode Header |
M |
n |
WMLS-091 |
Constant Pool |
Constant Pool |
M |
n |
WMLS-092 |
Pragma Pool |
Pragma Pool |
M |
n |
WMLS-093 |
Function Pool |
Function Pool |
M |
n |
15.2.5 Instruction Set
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-094 |
Control flow instructions |
Control Flow Instructions |
M |
n |
WMLS-095 |
Function call instructions |
Function Call Instructions |
M |
n |
WMLS-096 |
Variable access and manipulation |
Variable Access and Manipulation |
M |
n |
WMLS-097 |
Access to constants |
Access To Constants |
M |
n |
WMLS-098 |
Arithmetic instructions |
Arithmetic Instructions |
M |
n |
WMLS-099 |
Bitwise instructions |
Bitwise Instructions |
M |
n |
WMLS-100 |
Comparison instructions Comparison |
Instructions |
M |
n |
WMLS-101 |
Logical instructions |
Logical Instructions |
M |
n |
WMLS-102 |
Stack instructions |
Stack Instructions |
M |
n |
WMLS-103 |
Access to operand type |
Access to Operand Type |
M |
n |
WMLS-104 |
Return instructions |
Function Return Instructions |
M |
n |
WMLS-105 |
Debug instruction |
Miscellaneous Instructions |
M |
n |
15.2.6 Error Handling
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-106 |
Bytecode verification |
Integrity Check |
M |
n |
WMLS-107 |
Runtime validity checking |
Runtime Validity Checks |
M |
n |
WMLS-108 |
Support for general error handling |
Error Handling |
M |
n |
WMLS-109 |
Handling of fatal errors |
Fatal Errors |
M |
n |
WMLS-110 |
Handling of non-fatal errors |
Non-Fatal Errors |
M |
n |
15.2.7 Support for Integer Only Devices
Item | Function | Reference | Mandatory/Optional | Conformance |
WMLS-111 |
Support for floating-point operations |
Support for Integer Only Devices |
O |
n |
Notes
0. The WAP-193 specification specifies the design for a parser, a
compiler and a virtual machine to enable execution of WMLScript
bytecode. Given the constraints on developer time and the need to
deliver a prototype rapidly, however, we have opted to implement the
compiler and virtual machine components at a later date. Meanwhile, we
have developed an interpreter that does not require bytecode so we can
directly execute WMLScript in it's textual form (MIME type
text/vnd.wap.wmlscript). It is this interpreter that is being
referred to when the word `interpreter' appears in the notes of this
document.
1. For multi-line comments, the specification requires that:
"A multi-line comment is simply discarded if it contains no line
terminator; but if a multi-line comment contains one or more line
terminators, then it is replaced by a single line terminator."
[WAP-193 7.1.2 Lexical Grammar]
The parser deviates from the specification in that multi-line
comments are always simply discarded.
2. While the parser does strictly adhere to the numeric string grammar
as specified in [WAP-193 7.4 Numeric String Grammar], the
interpreter and libraries may not, instead relying on
slightly extended versions of the C library functions
strtol() and strtod(). There are no known cases of
the numeric string grammar accepting different strings than the
extended C library functions, but they may exist.
3. Not all escape sequences are supported. Because the parser and
the interpreter do not internally represent strings as Unicode, but as
C strings, some escapes cannot be resolved. Specifically, any escape
which resolves to ASCII NUL (\0) results in a parse
error. Also, any Unicode escape which resolves to a multi-byte
character results in a parse error.
4. For floating point numbers, the specification
requires that:
"The minimum/maximum values and precision for floating-point values
are specified by [IEEE754]. WMLScript supports 32-bit single precision
floating-point format."
[WAP-193 6.2.7.2 Floating-point Size]
Instead, both the parser and interpreter use 64-bit double
precision (C double type). As such, [IEEE754] conformance
issues may be compiler-dependant. Even though the parser and
interpreter use 64-bit double precision floating point, however, this
is not reflected in the values returned by the library functions
Float.maxFloat() and Float.minFloat(); these return
3.40282347E+38 and 1.17549435E-38, respectively.