Bug 1941 - Remove unnecessary modules dependencies
Remove unnecessary modules dependencies
Status: CONFIRMED
Product: ns-3
Classification: Unclassified
Component: lte
ns-3-dev
All All
: P5 enhancement
Assigned To: Biljana Bojović
:
Depends on: 2142 1811 2130
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-27 16:44 EDT by Tommaso Pecorella
Modified: 2017-01-05 12:50 EST (History)
3 users (show)

See Also:


Attachments
patch to fix (remove 'applications' from csma wscript, and adjust others) (12.22 KB, patch)
2014-06-27 17:56 EDT, Tom Henderson
Details | Diff
AODV cleanup (24.09 KB, patch)
2015-05-26 17:38 EDT, Tommaso Pecorella
Details | Diff
OLSR cleanup (36.38 KB, patch)
2015-05-30 17:33 EDT, Tommaso Pecorella
Details | Diff
Energy model cleanup (133.20 KB, patch)
2015-06-21 08:26 EDT, Tommaso Pecorella
Details | Diff
MESH cleanup (26.27 KB, patch)
2015-07-08 03:03 EDT, Tommaso Pecorella
Details | Diff
WAVE cleanup (5.50 KB, patch)
2015-07-08 04:05 EDT, Tommaso Pecorella
Details | Diff
dependency graph (124.30 KB, image/gif)
2015-07-08 07:18 EDT, Tommaso Pecorella
Details
Internet-Network-Core redundancy (5.70 KB, patch)
2015-07-08 07:30 EDT, Tommaso Pecorella
Details | Diff
dependency graph pruned (94.82 KB, image/gif)
2015-07-08 07:31 EDT, Tommaso Pecorella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tommaso Pecorella 2014-06-27 16:44:30 EDT
Konstantinos Katsaros pointed this out on this thread:
https://groups.google.com/forum/?hl=en#!topic/ns-3-users/IGaaUZq6bc8

The examples may depend on Application, not the module itself.
Comment 1 Konstantinos Katsaros 2014-06-27 17:48:49 EDT
Looking at the wscript of other modules, I noticed that others have the same dependency on application without any obvious reason, e.g. routing protocols (aodv, olsr, dsr), csma-layout, wimax, mesh. I guess this is due to examples dependency on application.
Comment 2 Tom Henderson 2014-06-27 17:56:44 EDT
Created attachment 1853 [details]
patch to fix (remove 'applications' from csma wscript, and adjust others)
Comment 3 Tommaso Pecorella 2014-06-28 02:33:59 EDT
Comment on attachment 1853 [details]
patch to fix (remove 'applications' from csma wscript, and adjust others)

Thanks, pushed in changeset:   10824:c5f41363f688 a merge between your and mine.

Keeping the bug open to fix Spectrum, Mesh and others.

Note that some of them needs the "SimpleApplications" to be fixed.
Comment 4 Tommaso Pecorella 2014-06-28 06:40:10 EDT
I updated some more wscripts.
The modules remaining to be fixed are:
- aodv
- mesh
- spectrum
- wimax
- lte
- wave

In all the above cases, a small refactoring of the tests is needed, as "applications" are used (among other strictly unnecessary modules) in tests.

Leaving the bug open for those cases.
Comment 5 Tommaso Pecorella 2014-07-27 18:05:45 EDT
changeset 10849 is the best we can do without the "new" apps here:
https://codereview.appspot.com/45320043

The patch includes already fixes for the other low hanging fruits: wave and spectrum.
The missing ones are:
- aodv
- mesh
- olsr
- lte
- test

+ aodv, mesh and olsr are all a matter of re-building the reference traces. Boring but easy.
+ lte is too complex for my taste. I'd leave to Nicola
+ the test module should die anyway. Sooner or later. I guess more later than sooner, but I'd rather fix the tests AND move them to their right places.
Comment 6 Tommaso Pecorella 2015-05-26 17:38:59 EDT
Created attachment 2044 [details]
AODV cleanup

New AODV tests. Some regression traces had to be rebuilt (small differences).
All the applications have been replaced with internal ones and/or stripped down versions of the normal apps.
Comment 7 Tommaso Pecorella 2015-05-30 17:33:46 EDT
Created attachment 2053 [details]
OLSR cleanup
Comment 8 Tommaso Pecorella 2015-05-30 17:35:46 EDT
This patch needs one more functionality to SimpleChannel: to be able to blacklist some devices. I.e., to have a shared medium where two devices can not communicate (e.g., because they are out of range or because they are mutually hidden).

(In reply to Tommaso Pecorella from comment #7)
> Created attachment 2053 [details]
> OLSR cleanup
Comment 9 Tommaso Pecorella 2015-06-21 08:26:01 EDT
Created attachment 2070 [details]
Energy model cleanup

This one is... intrusive.

The energy model dependency on wifi is removed by:
1) moving the wifi energy models to wifi
2) changing some tests in examples (not extremely example-ish, tho).
3) adding some dependencies to other modules (e.g., uan didn't need mobility explicitly).
Comment 10 Tommaso Pecorella 2015-07-08 03:03:55 EDT
Created attachment 2084 [details]
MESH cleanup
Comment 11 Tommaso Pecorella 2015-07-08 04:05:59 EDT
Created attachment 2085 [details]
WAVE cleanup

This was easy... a module included for an header (used in a test).
Comment 12 Tommaso Pecorella 2015-07-08 07:18:47 EDT
Created attachment 2086 [details]
dependency graph

Dependency graph as today (with the patches), minus LTE and test modules.

There's still a lot of redundancy (e.g., why network *and* core, just network is enough), but it's definitely cleaner.
Comment 13 Tommaso Pecorella 2015-07-08 07:30:25 EDT
Created attachment 2087 [details]
Internet-Network-Core redundancy

This removes the Internet / Network / Core redundancy.
There are still some "quirks". E.g., point-to-point has a "hard" dependency on mpi, but it could work flawlessly without.
Comment 14 Tommaso Pecorella 2015-07-08 07:31:10 EDT
Created attachment 2088 [details]
dependency graph pruned

Dependencies without Internet / Network / Core redundancy.
Comment 15 Tom Henderson 2015-07-08 09:21:49 EDT
(In reply to Tommaso Pecorella from comment #14)
> Created attachment 2088 [details]
> dependency graph pruned
> 
> Dependencies without Internet / Network / Core redundancy.

Is there any reason to do this other than to save some typing in wscripts?  If not, I'd prefer to be more explicit in listing the dependencies.
Comment 16 Tommaso Pecorella 2015-07-08 09:26:56 EDT
(In reply to Tom Henderson from comment #15)
> (In reply to Tommaso Pecorella from comment #14)
> > Created attachment 2088 [details]
> > dependency graph pruned
> > 
> > Dependencies without Internet / Network / Core redundancy.
> 
> Is there any reason to do this other than to save some typing in wscripts? 
> If not, I'd prefer to be more explicit in listing the dependencies.

None, it's purely cosmetic (so far).
It could be useful for bake (less complex inter-dependencies) and to spot misplaced dependencies.
Still, it's largely a matter of taste.
While the other patches are to be applied (in the present or improved form), this is safely skippable.
Comment 17 Tommaso Pecorella 2015-07-09 11:30:20 EDT
Added a dependency on Bug #2142 (NS_EXAMPLE_ASSERT needed) to remember that some tests have been "promoted" to examples and they should be cleaned once a NS_EXAMPLE_ASSERT is available.
Comment 18 Tommaso Pecorella 2015-07-09 18:05:47 EDT
Comment on attachment 2044 [details]
AODV cleanup

changeset 11484 a7698ae651ec
Comment 19 Tommaso Pecorella 2015-07-09 18:06:25 EDT
Comment on attachment 2053 [details]
OLSR cleanup

changeset 11483 36003018211b
Comment 20 Tommaso Pecorella 2015-07-09 18:07:02 EDT
Comment on attachment 2084 [details]
MESH cleanup

changeset 11485 df37afec1b0f
Comment 21 Tommaso Pecorella 2015-07-09 18:07:30 EDT
Comment on attachment 2085 [details]
WAVE cleanup

changeset 11486 882eb93bc1bb
Comment 22 Tommaso Pecorella 2015-07-09 18:08:24 EDT
Comment on attachment 2070 [details]
Energy model cleanup

changeset 11487 36b7799aa256
Comment 23 Tommaso Pecorella 2015-07-09 18:15:36 EDT
The missing ones are:

- test (unavoidable)
- lte (sooner or later I'll do that one too).

I'll leave the bug open to remember to fix lte and to improve the examples once bug# 2142 is fixed.