Research Article

Behaviour Preservation across Code Versions in Erlang

Listing 15

SecEr reports discrepancies in the functions implementing the requests.
$  ./secer -pois "test_hello_server:rel()" -funs "test_hello_server:funs()" -to 15
Function: handle_call/3
----------------------------
Generated test cases: 19083
Both versions of the program generate identical traces for the defined points of interest
----------------------------
Function: handle_cast/2
----------------------------
Generated test cases: 42
Mismatching test cases: 21 (50.0%)
  POIs comparison:
    + ’examples/gen_server/hello_server.erl’,37,tuple,1,
     ’examples/gen_server/hello_server_wrong.erl’,37,tuple,1
         Unexpected trace value => 21 Errors
         Example call: handle_cast(say_hello,state,4)
------ Detected Error ------
Call: handle_cast(say_hello,state,4)
Error Type: Unexpected trace value
POI: (’examples/gen_server/hello_server.erl’,37,tuple,1) trace:
     [noreply,state,5]
POI: (’examples/gen_server/hello_server_wrong.erl’,37,tuple,1) trace:
     [noreply,state,3]
----------------------------