This section describes two low level relational operations that are used to implement many of the above operations. The use of these low level functions is discouraged in cases where some combination of the higher level operations can be used instead.
These operations take as arguments mappings which specify for each input and output variable in the input relation(s), the input, output or existentially quantified variable in the resultant relation that they correspond to. For example specifies all occurrences of the input variable will be replaced by the output variable in the resultant relation.
MapRel1 and MapAndCombineRel2 can also take as arguments and produce as results sets. To do so, the specified mappings must refer to Set_Vars rather than Input_Vars and Output_Vars. It is important not to mix Set_Vars with Input_Vars or Output_Vars in the same object.
Mappings are declared using a constructor that takes two integer arguments that represent the input and output arities of the input relation. Mappings are specified using the member function void set_map(Var_Type in_type, int i, Var_Type out_type, int j) . For example the example above would be specified by map.set_map(Input_Var,1,Output_Var,3) .