anchor.diff:  prop_read_write() ->
       ?FORALL(S, list(byte()), write_read(S)).
   
  +-spec prop_short() -> proper:outer_test().
  +prop_short() ->
  +     ?FORALL(S, 
  +	     integer(0,trunc(math:pow(2,16))-1),
  +	     short_comp(S)).
  +
   %% testcases
   -spec cstr_list_test() -> boolean().
   cstr_list_test() ->
  
positive.code: -module(nifty_lib_test).
  -export([cstr_list_test/0,
  	 read_write_test/0,
  	 int_deref_test/0]).
  
  -include_lib("proper/include/proper.hrl").
  
negative.code: -type mystring() :: [1..255].
  -type byte() :: 0..255.
  
  
  %% auxilary functions
  -spec cstr_list_comp(mystring()) -> boolean().
  cstr_list_comp(Str) ->
      CStr = nifty:list_to_cstr(Str),
      DStr = nifty:dereference(CStr),
      ok = nifty:free(CStr),
      DStr =:= Str.
  
  short_comp(Sh) ->
      P = nifty:pointer_of(Sh, "unsigned short"),
      DSh = nifty:dereference(P),
      ok = nifty:free(P),
      Sh =:= DSh.
  
  -spec write_read([byte()]) -> boolean().
  write_read(Data) ->
      Ptr = nifty:mem_write(Data),
      DData = nifty:mem_read(Ptr, length(Data)),
      ok = nifty:free(Ptr),
      DData =:= Data.
  
  %% properties
  -spec prop_cstr_list() -> proper:outer_test().
  