metamodel: rename 'universal' to 'enum'
[nit.git] / src / analysis / reachable_method_analysis.nit
index c1c37d9..a7ac075 100644 (file)
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Package containing all bases for the reachable method analysis
+# Module containing all bases for the reachable method analysis
 package reachable_method_analysis
 
 import icode
@@ -26,7 +26,7 @@ redef class Program
 
        # This method will create a file and output all reachable method names in it
        fun dump_reachable_methods(directory_name: String, algo: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.reachable_methods.{algo}.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.reachable_methods.{algo}.log")
                with_each_methods !action(m) do
                        if rma.is_method_reachable(m) then
                                f.write("{m.full_name}\n")
@@ -37,7 +37,7 @@ redef class Program
 
        # This method will create a file and output all unreachable method names in it
        fun dump_unreachable_methods(directory_name: String, algo: String) do
-               var f = new OFStream.open("{directory_name}/{module.name}.unreachable_methods.{algo}.log")
+               var f = new OFStream.open("{directory_name}/{main_module.name}.unreachable_methods.{algo}.log")
                with_each_methods !action(m) do
                        if not rma.is_method_reachable(m) then
                                f.write("{m.full_name}\n")
@@ -57,7 +57,7 @@ end
 
 # Default behavior is to say that all methods/iroutines are reachable
 class DefaultReachableMethodAnalysis
-special ReachableMethodAnalysis
+       super ReachableMethodAnalysis
        redef fun is_iroutine_reachable(ir: nullable IRoutine): Bool do return true
        redef fun is_method_reachable(method: MMMethod): Bool do return true