Opened 17 years ago
Closed 16 years ago
#82 closed enhancement (fixed)
add record types and tuple types to symbolic package
| Reported by: | Stephen Siegel | Owned by: | ywei |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | symbolic | Version: | 1.0 |
| Keywords: | record, tuple, struct, field, type | Cc: |
Description (last modified by )
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
SymType newTupleType(String name, SymType[] fieldTypes); SymExpression tupleRead(SymExpression tuple, int index); SymExpression tupleWrite(SymExpression tuple, int index, SymExpression element); SymExpression tupleExpression(SymType tupleType, SymExpression[] elements)
The following is an example of using the CVC3 interactive to create a record type:
Reference : TYPE = [# pid : INT,
stackIndex : INT,
id : INT,
numLinks : INT,
links : ARRAY INT OF INT #];
a,a1 : ARRAY INT OF INT;
ASSERT a1 = a WITH [0] := 3, [1]:=5;
r1 : Reference = (# pid:=2, stackIndex:=-1, id:=3, numLinks:=2, links:=a1 #);
TRANSFORM r1;
The CVC3 manual has a detailed description of record types. Here is a simple example from the manual:
% Record updates Item: TYPE = [# key: INT, weight: REAL #]; x: Item = (# key := 23, weight := 43/10 #); x1: Item = x WITH .weight := 48;
Similar methods work for tuple types.
Change History (6)
comment:1 by , 17 years ago
| Status: | new → accepted |
|---|
comment:2 by , 17 years ago
comment:3 by , 17 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 17 years ago
Operations for tuple type added in the SymUniverseIF. Implementation code will be added soon.
comment:5 by , 17 years ago
Add corresponding tuple type and tuple expression to the symbolic package. Also implemented the corresponding create/read/write methods in symbolic universe.
comment:6 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
We decided that record type is not required at this time.

For now, tuple types are all I need.