Changes between Initial Version and Version 3 of Ticket #82


Ignore:
Timestamp:
10/27/09 14:56:47 (17 years ago)
Author:
Stephen Siegel
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #82

    • Property Status newaccepted
  • Ticket #82 – Description

    initial v3  
    1 CVC3 supports record types and tuple types.  Now we need to add these to the symbolic package.  There should be a method to create such a type like
     1CVC3 supports tuple types.  Now we need to add these to the symbolic package.  There should be a method to create such a type like
    22
    33{{{
    4 SymType newRecordType(String name, String[] fieldNames, SymType[] fieldTypes);
    5 SymType newTypleType(String name, String[] fieldTypes);
     4SymType newTupleType(String name, SymType[] fieldTypes);
     5SymExpression tupleRead(SymExpression tuple, int index);
     6SymExpression tupleWrite(SymExpression tuple, int index, SymExpression element);
     7SymExpression tupleExpression(SymType tupleType, SymExpression[] elements)
    68}}}
    79
    8 A tuple type is just the special case of record type, where the fields are just named 0, 1, 2, ....
    910
    10 Then there must be methods to
    11 
    12 1. create a new SymExpression of a given record type, given the field values
    13 2. read a field from a record
    14 3. modify a field in a record.
    15 
    16 Ditto for tuples.
    17 
    18 This is similar in many ways to the way arrays are dealt with.
    1911
    2012The following is an example of using the CVC3 interactive to create a record type:
     
    4537}}}
    4638
     39Similar methods work for tuple types.