10 Technical Details

10.2 Install Functions for IsWellDefined

10.2-1 InstallMethodWithToDoForIsWellDefined

10.2-2 InstallSetWithToDoForIsWellDefined

10.2-3 DeclareAttributeWithToDoForIsWellDefined

10.2-4 DeclareFamilyProperty

10.2-5 CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS

10.2-6 CAP_INTERNAL_MERGE_FILTER_LISTS

10.2-7 CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT

10.2-8 CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION

10.2-9 CAP_INTERNAL_MERGE_PRECONDITIONS_LIST

10.2-1 InstallMethodWithToDoForIsWellDefined

10.2-2 InstallSetWithToDoForIsWellDefined

10.2-3 DeclareAttributeWithToDoForIsWellDefined

10.2-4 DeclareFamilyProperty

10.2-5 CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS

10.2-6 CAP_INTERNAL_MERGE_FILTER_LISTS

10.2-7 CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT

10.2-8 CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION

10.2-9 CAP_INTERNAL_MERGE_PRECONDITIONS_LIST

`‣ ObjectCache` ( functor ) | ( attribute ) |

Returns: IsCachingObject

Retuns the caching object which stores the results of the functor `functor` applied to objects.

`‣ MorphismCache` ( functor ) | ( attribute ) |

Returns: IsCachingObject

Retuns the caching object which stores the results of the functor `functor` applied to morphisms.

`‣ InstallMethodWithToDoForIsWellDefined` ( arg ) | ( function ) |

The IsWellDefined filter is a basic function of CAP. For every categorial construction the outcome is well defined if and only if every input object or morphism of the construction is well defined. So for every implementation of a categorial construction a ToDoListEntry needs to be defined which propagates well definedness from the input cells to the output. For not writing this construction in every method, this function can be used to install a method which then installs the correct ToDoListEntries for the output. The input syntax works exactly like InstallMethod, with one extension: The method creates an auxilliary function which computes the output from the function given to InstallMethodWithToDoForIsWellDefined, then installs the ToDoListEntries, and then installs the auxilliary function instead of the original one. This is normally done with InstallMethod. However, one can change this via the option InstallMethod, which can be set to any other function which is then used instead of InstallMethod. This is used for the caching functions.

`‣ InstallSetWithToDoForIsWellDefined` ( arg1, arg2, arg3 ) | ( operation ) |

For the caching one needs the possibility to install setters for functions with multiple arguments. This is a setter function which automatically adds ToDoListEntries for IsWellDefined like described above for the manually setted result of a method.

`‣ DeclareAttributeWithToDoForIsWellDefined` ( arg ) | ( function ) |

Since attributes install their setters themselfes, one needs to declare attributes in another way to ensure ToDoListEntries for IsWellDefined in the setter of an attribute. This function works like DeclareAttribute, but installs ToDoListEntries for the setter of the attribute. Please note that implementations still need to be done with InstallMethodWithToDoForIsWellDefined.

`‣ DeclareFamilyProperty` ( arg ) | ( function ) |

`‣ CAP_INTERNAL_REPLACE_STRINGS_WITH_FILTERS` ( list, category ) | ( function ) |

Returns: Replaced list

The function takes a list (of lists) of filters or strings, where the strings can be category, cell, object, morphism, or twocell. The strings are then recursively replaced by the corresponding filters of the category. The replaced list is returned.

`‣ CAP_INTERNAL_MERGE_FILTER_LISTS` ( list, additional, list ) | ( function ) |

Returns: merged lists

The first argument should be a dense list with filters, the second a sparse list containing filters not longer then the first one. The filters of the second list are then appended (via and) to the filters in the first list at the corresponding position, and the resulting list is returned.

`‣ CAP_INTERNAL_RETURN_OPTION_OR_DEFAULT` ( string, value ) | ( function ) |

Returns: option value

Returns the value of the option with name string, or, if this value is fail, the object value.

`‣ CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION` ( function, symbol_list, loop_multiple ) | ( function ) |

Returns: a list of symbols with multiples

The function searches for the appearance of the strings in symbol list on the function function and returns a list of pairs, containing the name of the symbol and the number of appearance. If the symbol appears in a loop, the number of appearance is counted times the loop multiple.

`‣ CAP_INTERNAL_MERGE_PRECONDITIONS_LIST` ( list1, list2 ) | ( function ) |

Returns: merge list

The function takes two lists containing pairs of symbols (strings) and multiples. The lists are merged that pairs where the string only appears in one list is then added to the return list, if a pair with a string appears in both lists, the resulting lists only contains this pair once, with the higher multiple from both lists.

generated by GAPDoc2HTML