Class OperationStaticSemantics
java.lang.Object
org.kigalisim.lang.operation.OperationStaticSemantics
Record describing common properties of an operation which can be inferred from static analysis.
Record describing common properties of an operation which can be inferred from static analysis, intended for use in polymorphic program static analysis for QubecTalk scripts.
-
Constructor Summary
ConstructorsConstructorDescriptionOperationStaticSemantics(OperationType operationType) Create a record indicating that only the operation type could be inferred statically.OperationStaticSemantics(OperationType operationType, String stream) Create a record for an operation which involves a single stream.OperationStaticSemantics(OperationType operationType, Set<String> streams, Optional<Boolean> assumePriorNew) Create a new record of statically inferred operation properties. -
Method Summary
Modifier and TypeMethodDescriptionDetermine if the operation treats prior equipment as new (theassuming newmodifier).Get the kind of operation described.Get the streams targeted in the operation.
-
Constructor Details
-
OperationStaticSemantics
Create a record indicating that only the operation type could be inferred statically.- Parameters:
operationType- The type of operation for which the record is provided.
-
OperationStaticSemantics
Create a record for an operation which involves a single stream.- Parameters:
operationType- The type of operation for which the record is provided.stream- The name of the stream involved in the operation.
-
OperationStaticSemantics
public OperationStaticSemantics(OperationType operationType, Set<String> streams, Optional<Boolean> assumePriorNew) Create a new record of statically inferred operation properties.- Parameters:
operationType- The type of operation for which the record is provided.streams- The names of the streams included in the operation, copied on construction.assumePriorNew- Whether the operation treats prior equipment as a pseudo-cohort of typical age (theassuming newmodifier) or empty if not applicable.
-
-
Method Details
-
getOperationType
Get the kind of operation described.- Returns:
- The type of the operation.
-
getStreams
Get the streams targeted in the operation.The set of streams which are included in this operation which can be interpreted as analagous to "operands" of this operation which are streams. For example, the set command's operand is the stream set. Meanwhile, the read command's operand is the stream read. Some operations like a cap with displace may have two different streams as operands.
- Returns:
- Unmodifiable set of names of the streams involved, empty if none apply.
-
getAssumePriorNew
-