Skip to content

Add compiler support for RTI-driven transient federate launch#2606

Draft
kushalpaliwal01 wants to merge 146 commits intolf-lang:sstfrom
kushalpaliwal01:transient-fed
Draft

Add compiler support for RTI-driven transient federate launch#2606
kushalpaliwal01 wants to merge 146 commits intolf-lang:sstfrom
kushalpaliwal01:transient-fed

Conversation

@kushalpaliwal01
Copy link
Copy Markdown

@kushalpaliwal01 kushalpaliwal01 commented Mar 30, 2026

Summary

This PR adds compiler support for RTI-driven transient federate launching. The LF compiler now generates the config files and runtime initialization code the RTI and federate runtime need to launch transient federates on demand, without requiring the LF program to hardcode binary paths, SSH details, or SST configs.

Depends on: lf-lang/reactor-c#571


Transient federate config file generation

The LF compiler now generates a transient_federates.config file in the RTI's src-gen directory. This file lists every transient federate in the federation with all the information the RTI needs to launch it: its ID, name, IP address, SSH user, binary path, and SST config path. For local deployments these paths point to the federation's build directory. For remote deployments they point to the remote base directory.

The RTI reads this file at startup via the new -tf flag. The LF compiler automatically adds -tf <path> to the RTI launch command in the generated launcher script whenever the federation has transient federates.


Port-to-transient federate mapping

To support the lf_launch_transient_federate(port_name) API in reactor-c, the compiler generates a compile-time table that maps each output port name to the IDs of the transient downstream federates connected to it.

At compile time, the compiler walks the federation's connection graph and records which output ports of each federate connect to transient downstream federates. This table is emitted as C initialization code that fills _fed.port_to_transient_feds_mapping[] at startup, so the runtime can look up which transient federates to launch when a given port is used.

ChadliaJerad and others added 30 commits December 30, 2024 00:27
…nerator.java

Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
Co-authored-by: Edward A. Lee <eal@eecs.berkeley.edu>
… of launching time in transient federates. This is simply done by increasing the timeout to 3s instead of 2s, and adjusting the check accordingly
@kushalpaliwal01 kushalpaliwal01 marked this pull request as draft March 30, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants