Hi Aryaman,
Extending XLXC to support arbitrary topologies means that you must have functions to start containers, to establish a single link between two containers, to link a group of containers to a single switch, assign the proper information to the protocol stacks of the containers, and boot up all the setup. Notice that these functions are hard to call since they need a lot of very specific parameters to do their work. That is where the library will help.
One could conceive a language to describe an arbitrary topology that would be compiled into calls of the previously mentioned functions. But defining this language and writing its compiler is quite a lot of work. Instead, one can define a library that describe the topology, so the user of this library would use this library to describe the topology it wants. The output of this library is a data structure that is easy to navigate. Thus, one can write the code to navigate this data structure and properly call the functions that will instantiate the containers, links, and switches.
The library will have at least a function to create a node (i.e. a container), a another to create a switch (i.e. OVS), functions to link node with node, and node with switches. These functions are high level, all the details will be figured out by the code that will make the final calls.
How does one navigate the data structure that the library produces? Notice that this data structure is essentially a graph whose nodes and links will have some associated information, so you can start with a depth-first algorithm, and change and/or refine it to as you find necessary.
Given that all the library does is to create an easy to navigate data structure, one can now write another function that receives this data structure and generates a yEd file. And all one needs to export from RocketFuel is to read RocketFuel data format and generate call to our library. That is, once everything is done, we will be able to visualize RocketFuel's topologies in yEd and simulate them in XLXC!