
Warning
This page is primarily intended for the developers of the CIF 3 simulator, and not its end users.
The CIF 3 simulator generates highly optimized code for the specification, to speed up the simulation. By enabling the Debug the generated code (by writing it to disk) debugging output, the generated code can be written to disk, for further debugging.
If the simulation is performed from within Eclipse, and a project named nl.tue.cif.v3x0x0.simulator.debug exists, is not closed, and has a src directory, the generated code will be written to that src directory. Otherwise, the generated code will be written to the directory containing the input specification file.
Regardless, the code is also always written to a cifcode sub-directory. If this sub-directory does not yet exist, it is created. If it already exists, all existing .java files are removed from the sub-directory first, before the newly generated code is written.
The generated code consists of Java files only. This results in several .java files being written to the cifcode directory.
Additionally, an Eclipse launch configuration file (_cif3sim_debug.launch) is written. This launch configuration can be used to reproduce the simulation implemented by the generated code. The launch configuration reproduces the simulation options that were used, and always shows the option dialog. The working directory for the simulation performed via the generated launch configuration is the same working directory as the original simulation. This allows additional files, such as configuration files, to be found.
To use this feature, follow these steps:
The launch configuration that is written to disk with the generated code, uses the Load debug code option (Simulator category). Using this option, the classpath (directory) where the already generated code is located, is specified. By specifying it, the simulator knows from where to load it.
Simulations not started from the generated launch configuration, generally don’t use this option. They load the input specification, validate it, generate fresh code, and compile the code in-memory, or use compiled code files
Simulations using the generated code ignore all options related to repeated simulations. That is, the Load debug code option takes priority over the Compile only option (Compiler category), and simulating with compiled code files.
A warning is printed to the console if the generated code was generated with a different version of the simulator than the one used to simulate it. Ignoring the warning may lead to unexpected simulation results, or even simulator crashes.