anchor.diff:             [{FieldName, V}|FVs]
             )).
   
  +%% generate schema for a struct with given data size and fields
   struct_node(Size, Fields) ->
       ?LET(R, struct_ref(range(Size, inf), range(0, inf)),
            #struct{ dsize = R#struct_ref.dsize,
  
positive.code: %% property types
  %%% ----------------------------------------
  
  data_value() ->
      union(
        [?LET(B, boolean(), {1, bool, B}),
  
negative.code:                   fields = Fields
                  }).
  
  %% generate schema node for struct with given names for data fields
  schema_data_fields(FieldNames) ->
      ?LET({Size, Fs, FVs}, data_fields(FieldNames, 0, [], []),
           ?LET(S, struct_node(1 + ((Size - 1) div 8), Fs),
                {#schema_node{ kind = S }, FVs})).
  
  %% generate schema node for struct
  schema_data_fields() ->
      ?LET(FieldNames, field_names(), schema_data_fields(FieldNames)).
  
  %% generate field names
  field_names() ->
      ?SUCHTHAT(FieldNames, non_empty(list(atom())),
                lists:sort(FieldNames) =:= lists:usort(FieldNames)).
  