Changes between Initial Version and Version 3 of Ticket #82
- Timestamp:
- 10/27/09 14:56:47 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #82
- Property Status new → accepted
-
Ticket #82 – Description
initial v3 1 CVC3 supports record types andtuple types. Now we need to add these to the symbolic package. There should be a method to create such a type like1 CVC3 supports tuple types. Now we need to add these to the symbolic package. There should be a method to create such a type like 2 2 3 3 {{{ 4 SymType newRecordType(String name, String[] fieldNames, SymType[] fieldTypes); 5 SymType newTypleType(String name, String[] fieldTypes); 4 SymType newTupleType(String name, SymType[] fieldTypes); 5 SymExpression tupleRead(SymExpression tuple, int index); 6 SymExpression tupleWrite(SymExpression tuple, int index, SymExpression element); 7 SymExpression tupleExpression(SymType tupleType, SymExpression[] elements) 6 8 }}} 7 9 8 A tuple type is just the special case of record type, where the fields are just named 0, 1, 2, ....9 10 10 Then there must be methods to11 12 1. create a new SymExpression of a given record type, given the field values13 2. read a field from a record14 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.19 11 20 12 The following is an example of using the CVC3 interactive to create a record type: … … 45 37 }}} 46 38 39 Similar methods work for tuple types.
