src/metrics: clean importations
authorJean Privat <jean@pryen.org>
Wed, 3 Sep 2014 13:55:20 +0000 (09:55 -0400)
committerJean Privat <jean@pryen.org>
Wed, 3 Sep 2014 17:07:20 +0000 (13:07 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

15 files changed:
src/metrics/ast_metrics.nit
src/metrics/generate_hierarchies.nit
src/metrics/inheritance_metrics.nit
src/metrics/mclasses_metrics.nit
src/metrics/mendel_metrics.nit
src/metrics/mmodules_metrics.nit
src/metrics/model_hyperdoc.nit
src/metrics/nullables_metrics.nit
src/metrics/poset_metrics.nit
src/metrics/refinement_metrics.nit
src/metrics/rta_metrics.nit
src/metrics/self_metrics.nit
src/metrics/static_types_metrics.nit
src/metrics/tables_metrics.nit
tests/sav/nitmetrics_args1.res

index c1442c0..d34899e 100644 (file)
@@ -16,9 +16,7 @@
 
 # Metrics about the nodes and identifiers in the AST
 module ast_metrics
-import modelbuilder
-private import metrics_base
-import frontend
+import metrics_base
 
 redef class ToolContext
        var ast_metrics_phase: Phase = new AstMetricsPhase(self, null)
index 455ed83..fbed03e 100644 (file)
@@ -18,9 +18,7 @@
 # See graphviz http://www.graphviz.org/
 module generate_hierarchies
 
-import model
-private import metrics_base
-import frontend
+import metrics_base
 import model_viz
 
 redef class ToolContext
index 00d03f2..d475562 100644 (file)
 # Collect metrics about inheritance usage
 module inheritance_metrics
 
-import model
+import metrics_base
 import mmodules_metrics
 import mclasses_metrics
-import phase
-import frontend
 
 redef class ToolContext
        var inheritance_metrics_phase: Phase = new InheritanceMetricsPhase(self, null)
index ffdf69c..fabd573 100644 (file)
 # Collect common metrics about mclasses
 module mclasses_metrics
 
-import model
 import metrics_base
-import phase
-import frontend
 
 redef class ToolContext
        var mclasses_metrics_phase: Phase = new MClassesMetricsPhase(self, null)
index 65e104f..6c63925 100644 (file)
 #  in Proceedings of the 16th IEEE International Conference on Program Comprehension (OCPC'08)
 module mendel_metrics
 
-import model
 import metrics_base
 import mclasses_metrics
-import phase
-import frontend
+import modelize
 
 redef class ToolContext
        var mendel_metrics_phase: Phase = new MendelMetricsPhase(self, null)
index ca87fdf..a7ac696 100644 (file)
 # Collect common metrics about modules
 module mmodules_metrics
 
-import model
 import metrics_base
-import phase
-import frontend
 
 redef class ToolContext
        var mmodules_metrics_phase: Phase = new MModulesMetricsPhase(self, null)
index dbc7f45..43384d9 100644 (file)
 # Dump of Nit model into hypertext human-readable format.
 module model_hyperdoc
 
-import model
 import metrics_base
-import phase
-import frontend
 
 redef class ToolContext
        var model_hyperdoc_phase: Phase = new ModelHyperdocPhase(self, null)
index a101be9..7f1b898 100644 (file)
@@ -17,7 +17,7 @@
 # Statistics about the usage of nullables
 module nullables_metrics
 
-import model_utils
+import metrics_base
 import mclasses_metrics
 import semantize
 
index 5ff2a6f..1fc8be5 100644 (file)
@@ -15,9 +15,7 @@
 # Metrics about the various posets of the model of a Nit program
 module poset_metrics
 
-import poset
 import metrics_base
-import frontend
 
 redef class ToolContext
        var poset_metrics_phase: Phase = new PosetMetricsPhase(self, null)
index 2c9ac5a..7ba18e8 100644 (file)
@@ -18,8 +18,7 @@
 module refinement_metrics
 
 import model
-private import metrics_base
-import frontend
+import metrics_base
 
 redef class ToolContext
        var refinement_metrics_phase: Phase = new RefinementMetricsPhase(self, null)
index 1224513..1527731 100644 (file)
 # Metrics from RTA
 module rta_metrics
 
-import modelbuilder
 private import rapid_type_analysis
-private import metrics_base
+import metrics_base
 import mmodules_metrics
 import mclasses_metrics
-import frontend
 
 redef class ToolContext
        var rta_metrics_phase: Phase = new RTAMetricsPhase(self, null)
index 12b2f64..ba7ea78 100644 (file)
@@ -16,9 +16,8 @@
 
 # Metrics about the usage of explicit and implicit self
 module self_metrics
-import modelbuilder
-private import metrics_base
-import frontend
+
+import metrics_base
 
 redef class ToolContext
        var self_metrics_phase: Phase = new SelfMetricsPhase(self, null)
index 88e9555..aa4f1ef 100644 (file)
@@ -17,8 +17,8 @@
 # Metrics on the usage of explicit static types.
 module static_types_metrics
 
-private import metrics_base
-import frontend
+import metrics_base
+import modelize
 
 redef class ToolContext
        var static_types_metrics_phase: Phase = new StaticTypesMetricsPhase(self, null)
index 42dae2a..664415a 100644 (file)
@@ -17,9 +17,7 @@
 # Metrics on table generation
 module tables_metrics
 
-import model
-private import metrics_base
-import frontend
+import metrics_base
 
 redef class ToolContext
        var tables_metrics_phase: Phase = new TablesMetricsPhase(self, null)
index ab778d5..979a95a 100644 (file)
@@ -460,22 +460,6 @@ Number of property definitions: 20
 Number of redefined properties: 1 (5.55%)
 Average number of property redefinitions by property: 0.11
 Average number of property redefinitions by redefined property: 2.00
---- Metrics of the explitic static types ---
-Total number of explicit static types: 9
-Statistics of type usage:
- population: 4
- minimum value: 1
- maximum value: 6
- total value: 9
- average value: 2.25
- distribution:
-  <=1: sub-population=3 (75.00%); cumulated value=3 (33.33%)
-  <=8: sub-population=1 (25.00%); cumulated value=6 (66.66%)
- list:
-  Int: 6 (66.66%)
-  C: 1 (11.11%)
-  B: 1 (11.11%)
-  A: 1 (11.11%)
 --- Explicit vs. Implicit Self ---
 Total number of self: 5
 Total number of implicit self: 4 (80.00%)
@@ -485,50 +469,9 @@ Average number of composing class definition by runtime class: 2.00
 Total size of tables (classes and instances): 38 (not including stuff like info for subtyping or call-next-method)
 Average size of table by runtime class: 6.33
 Values never redefined: 32 (84.21%)
-
-# Mendel metrics
-       large mclasses (threshold: 2.291)
-          B: 3
-          C: 3
-       budding mclasses (threshold: 0.693)
-          B: 0.75
-          C: 0.75
-       blooming mclasses (threshold: 1.935)
-          B: 2.25
-          C: 2.25
-       blooming mclasses (threshold: 1.935)
-          B: 2.25
-          C: 2.25
 generating out/nitmetrics_args1.write/project_hierarchy.dot
 generating out/nitmetrics_args1.write/module_hierarchy.dot
 
-# Nullable metrics
-
- ## project base_simple3
-  `- group base_simple3
-       cnba: number of accessible attributes (inherited + local)
-         avg: 0.0
-         max: C (2)
-         min: Object (0)
-         std: 0.845
-         sum: 3
-       cnbna: number of accessible nullable attributes (inherited + local) -- nothing
-         sum: 0
-
- ## global metrics
-       cnba: number of accessible attributes (inherited + local)
-         avg: 0.0
-         max: C (2)
-         min: Object (0)
-         std: 0.845
-         sum: 3
-       cnbna: number of accessible nullable attributes (inherited + local) -- nothing
-         sum: 0
---- Sends on Nullable Receiver ---
-Total number of sends: 19
-Number of sends on a nullable receiver: 0 (0.0%)
-Number of buggy sends (cannot determine the type of the receiver): 0 (0.0%)
-
 # Inheritance metrics
 
  ## project base_simple3
@@ -715,6 +658,63 @@ Number of buggy sends (cannot determine the type of the receiver): 0 (0.0%)
          min: base_simple3 (0.143)
          std: 0.0
          sum: 0.143
+--- Metrics of the explitic static types ---
+Total number of explicit static types: 9
+Statistics of type usage:
+ population: 4
+ minimum value: 1
+ maximum value: 6
+ total value: 9
+ average value: 2.25
+ distribution:
+  <=1: sub-population=3 (75.00%); cumulated value=3 (33.33%)
+  <=8: sub-population=1 (25.00%); cumulated value=6 (66.66%)
+ list:
+  Int: 6 (66.66%)
+  C: 1 (11.11%)
+  B: 1 (11.11%)
+  A: 1 (11.11%)
+
+# Mendel metrics
+       large mclasses (threshold: 2.291)
+          B: 3
+          C: 3
+       budding mclasses (threshold: 0.693)
+          B: 0.75
+          C: 0.75
+       blooming mclasses (threshold: 1.935)
+          B: 2.25
+          C: 2.25
+       blooming mclasses (threshold: 1.935)
+          B: 2.25
+          C: 2.25
+
+# Nullable metrics
+
+ ## project base_simple3
+  `- group base_simple3
+       cnba: number of accessible attributes (inherited + local)
+         avg: 0.0
+         max: C (2)
+         min: Object (0)
+         std: 0.845
+         sum: 3
+       cnbna: number of accessible nullable attributes (inherited + local) -- nothing
+         sum: 0
+
+ ## global metrics
+       cnba: number of accessible attributes (inherited + local)
+         avg: 0.0
+         max: C (2)
+         min: Object (0)
+         std: 0.845
+         sum: 3
+       cnbna: number of accessible nullable attributes (inherited + local) -- nothing
+         sum: 0
+--- Sends on Nullable Receiver ---
+Total number of sends: 19
+Number of sends on a nullable receiver: 0 (0.0%)
+Number of buggy sends (cannot determine the type of the receiver): 0 (0.0%)
 
 # RTA metrics