Information Technology Reference
In-Depth Information
new_fun(NewVar_1, NewVar_2, NewVar_3) ->
?COMMENT(NewVar_1, []),
SidMux = {mux_id_1, h223_id_1},
{TdmSid, LocalData, _, _} = precond_one_blade_tdm_mux_create(SidMux),
?CHECK(ok, hcfTraceServerSupport, start, [[{brchDspRhI, exported}]]),
SidLc = {mux_id_1, audio_id_1},
CreateData = #brchMuxLcAccess{sid=SidLc,
stream_type = ?BRCH_AUDIO,
local_data=LocalData,
codec={NewVar_2, NewVar_3, 33, 44, 40},
event_module=iptermCb},
[{ok, [{SidLc, _IntCep}], ?BRCH_REPLICATION_NEEDED}] =
?CH(1, brchShI, create, [[CreateData]]),
?CHECK([], hcfTraceServerSupport, get_trace_list, []),
clean_up([SidLc, SidMux, TdmSid]),
?RESULT("DONE", []).
Being able to generate the least general abstraction automatically speeds up the
similar code elimination process, because the user does not need to inspect the
differences manually, and generalise the function step by step.
The notion of least general abstraction (anti-unifier) and the definition of
”similarity” need to be refined further, but for the moment we have a working
definition. We are now also in the process of designing a more ecient algorithm
so that we could apply ”similar code detection” to large projects, as well as
investigating a more general notion of ”similarity” than having a non-trivial
common generalisation.
Apart from the work on duplicate code detection and the introduction of
”similar expression search”, a number of new refactorings have also been added
including the introduction macros (optionally with parameters), folding expres-
sions against a macro definition, and the normalisation of record expressions.
4.2
Extension to Wrangler to Refactor EUnit Test Data
We have been working on the extension of the Wrangler tool to accompany
the basic refactorings in Wrangler with refactorings of EUnit test data. This
extension has two aspects:
1. When application code is refactored, Wrangler should make sure that the
test code of the application code is also refactored consistently.
2. Since test code is also Erlang code, it can be refactored in its own right, but
Wrangler needs to make sure the refactoring of test code preserves the test
framework's particular idioms, such as naming conventions.
The extension affects all the refactorings that change module/function/macro
interfaces, such as renaming, generalisation, move function between modules,
function extraction, etc.
Search WWH ::




Custom Search