|
@@ -1048,6 +1048,34 @@ class ReadEdgeInstruction(StateInstruction):
|
|
|
"""Gets this state instruction's argument list."""
|
|
|
return [self.node_id]
|
|
|
|
|
|
+class ReadOutgoingEdgesInstruction(StateInstruction):
|
|
|
+ """An instruction that reads all outgoing edges for a node."""
|
|
|
+ def __init__(self, node_id):
|
|
|
+ StateInstruction.__init__(self)
|
|
|
+ self.node_id = node_id
|
|
|
+
|
|
|
+ def get_opcode(self):
|
|
|
+ """Gets the opcode for this state instruction."""
|
|
|
+ return "RO"
|
|
|
+
|
|
|
+ def get_arguments(self):
|
|
|
+ """Gets this state instruction's argument list."""
|
|
|
+ return [self.node_id]
|
|
|
+
|
|
|
+class ReadIncomingEdgesInstruction(StateInstruction):
|
|
|
+ """An instruction that reads all incoming edges for a node."""
|
|
|
+ def __init__(self, node_id):
|
|
|
+ StateInstruction.__init__(self)
|
|
|
+ self.node_id = node_id
|
|
|
+
|
|
|
+ def get_opcode(self):
|
|
|
+ """Gets the opcode for this state instruction."""
|
|
|
+ return "RI"
|
|
|
+
|
|
|
+ def get_arguments(self):
|
|
|
+ """Gets this state instruction's argument list."""
|
|
|
+ return [self.node_id]
|
|
|
+
|
|
|
class CreateNodeInstruction(StateInstruction):
|
|
|
"""An instruction that creates an empty node."""
|
|
|
|