================================================================================ Paper written by: Emmanuel STAPF Date of last review: 05/07/1998 The Main purpose of this document is to explain how the merging of the three negative degrees has been done, i.e. degree -1, -2 and -3. ================================================================================ I- Presentation of how the freezing degrees have been done: =========================================================== Here is a small description found in class SYSTEM_I, where the three lists are declared: melted_set: LINKED_SET [CLASS_C] -- Set of class ids for which feature table needs to be updated -- when melting freeze_set1: LINKED_SET [CLASS_C] -- List of class ids for which a source C compilation is -- needed when freezing. freeze_set2: LINKED_SET [CLASS_C] -- List of class ids for which a hash table recompilation -- is needed when freezing -- ie Need to rebuild the structure of the class A - First compilation: ---------------------- When you freeze the system for the first time, all the classes that need to be frozen are in the list `freeze_set2', ie each class is like a modified classes, so you need to generate: - the descriptor tables - the feature C corresponding code - the feature tables At this time, the list `freeze_set1' and `freeze_set2' does contain the same elements. NOTE: When you are precompiling you don't generate the feature table, no degree -3. B - Incremental compilation: ---------------------------- When you melt your system and change some classes, the `melted_set' is updated. During the development, when you add a class, you add the class in: - melted_set - freeze_set1 - freeze_set2 When you remove a class, you remove the class from: - melted_set - freeze_set1 - freeze_set2 When a compilation has been successful, ie not stopped by the user or because there was a mistake, the `melted_set' is wipped out before to start. When you freeze your system, we add in `melted_set' the class whose descriptor have changed, so that we are generating the descriptor table again for those classes. 1 - Degree 4: ------------- If the class has a changed inheritance, we put the class into: - melted_set - freeze_set2 If the class has changed its assertions, we need to update: - freeze_set1 2 - Degree 3: ------------- At degree 3, if features of the class have changed, we put `Current' into: - melted_set - freeze_set1 - freeze_set2 However, if only the propagators.invariant_removed is true, we put `Current' only in: - melted_set - freeze_set2 If we melt all the features written in the class, we put `Current' into: - melted_set - freeze_set1 - freeze_set2 If the skeleton has changed, we need to insert `Current' into: - melted_set - freeze_set2 3 - Degree -1: -------------- When it is the first time, we do only what is inside: - freeze_set2 But we could have used also freeze_set1 or melted_Set When you freeze your system after some melting, here is what happend: X - Who is calling who? ----------------------- Here are the callers of the three lists. melted_set from SYSTEM_I CLASS_C melt_all -- put, with freeze_set1 and freeze_set2 melt_feature_table -- require pass3 -- put, with freeze_set2 or (freeze_set1 and freeze_set2) process_skeleton -- put, with freeze_set2 PASS2_C execute -- put, with freeze_set2 SYSTEM_I freeze_system -- used as a temporary list init_recompilation -- wipe_out insert_new_class -- put, with freeze_set1 and freeze_set2 make -- creation melt -- use of content of melted_set, wipe_out after remove_class -- prune, with freeze_set1 and freeze_set2 freeze_set1 from SYSTEM_I CLASS_C insert_changed_assertion-- put melt_all -- put, with melted_set and freeze_set2 pass3 -- put, with melted_set SYSTEM_I freeze_system -- use of content of freeze_set1, wipe_out after insert_new_class -- put, with melted_set and freeze_set2 make -- creation remove_class -- prune, with melted_set and freeze_set2 update_valid_body_ids -- use of content of freeze_set1 SYSTEM_STATISTICS make -- count, number of melted class in the system freeze_set2 from SYSTEM_I CLASS_C melt_all -- put, with melted_set and freeze_set1 pass3 -- put, with melted_set process_skeleton -- put, with melted_set PASS2_C execute -- put, with melted_set SYSTEM_I freeze_system -- use of freeze_set2, wipe_out after insert_new_class -- put, with melted_set and freeze_set1 make -- creation make_update_feature_tables -- use of content of freeze_set2 remove_class -- put, with melted_set and freeze_set1