A submodule invoked via call / parallel / gather. Records only enough about the submodule to produce human-readable diagnostics; the verifier does not inspect its body.
| 28 | |
| 29 | @dataclass |
| 30 | class SubmoduleRef: |
| 31 | """A submodule invoked via call / parallel / gather. |
| 32 | |
| 33 | Records only enough about the submodule to produce human-readable |
| 34 | diagnostics; the verifier does not inspect its body. |
| 35 | """ |
| 36 | name: str |
| 37 | kind: str # "parallel" | "call" | "gather" |
| 38 | output_var: Optional[str] = None |
| 39 | input_var: Optional[str] = None |
| 40 | |
| 41 | def to_dict(self) -> dict: |
| 42 | d: dict = {"name": self.name, "kind": self.kind} |
| 43 | if self.output_var is not None: d["output_var"] = self.output_var |
| 44 | if self.input_var is not None: d["input_var"] = self.input_var |
| 45 | return d |
| 46 | |
| 47 | @staticmethod |
| 48 | def from_dict(d: dict) -> "SubmoduleRef": |
| 49 | return SubmoduleRef( |
| 50 | name=d["name"], kind=d.get("kind", "call"), |
| 51 | output_var=d.get("output_var"), |
| 52 | input_var=d.get("input_var"), |
| 53 | ) |
| 54 | |
| 55 | |
| 56 | # ---------- TypedVar ---------- |
no outgoing calls
no test coverage detected