public class TypeUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
BOOL |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
INT |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
INT16 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
INT32 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
INT64 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
INT8 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
REAL |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
UINT16 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
UINT32 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
UINT64 |
static edu.uiowa.cs.clc.kind2.lustre.NamedType |
UINT8 |
| Constructor and Description |
|---|
TypeUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Type |
array(Type base,
int size)
Construct an array type
|
static Type |
enumeration(java.util.List<java.lang.String> values)
Construct an enum type
|
static Type |
intSubrange(long low,
long high)
Construct an integer-subrange type
|
static Type |
intSubrange(java.lang.String low,
java.lang.String high)
Construct an integer-subrange type
|
static Type |
named(java.lang.String name)
Construct a named type
|
static Type |
record(java.util.Map<java.lang.String,Type> fields)
Construct a record type
|
static Type |
tuple(java.util.List<? extends Type> types)
Construct an tuple type
|
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType BOOL
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType INT
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType REAL
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType INT8
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType INT16
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType INT32
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType INT64
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType UINT8
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType UINT16
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType UINT32
public static final edu.uiowa.cs.clc.kind2.lustre.NamedType UINT64
public static Type array(Type base, int size)
Lustre: <base>^<size>
base - type of the elements of the arraysize - size of the arraypublic static Type enumeration(java.util.List<java.lang.String> values)
Lustre: enum {<values[0]>, <values[1]>, ...}
values - a list values for the enumerated typepublic static Type named(java.lang.String name)
Lustre: <name>
name - name of the typepublic static Type record(java.util.Map<java.lang.String,Type> fields)
Lustre: struct {<fields[0].key> : <fields[0].value>, ...}
fields - a mapping from field names to their typespublic static Type intSubrange(java.lang.String low, java.lang.String high)
Lustre: subrange [<low>, <high>] of int
low - minimum integer value (inclusive)high - maximum integer value (inclusive)public static Type intSubrange(long low, long high)
Lustre: subrange [<low>, <high>] of int
low - minimum integer value (inclusive)high - maximum integer value (inclusive)