‣ 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.
‣ FunctionWithNamedArguments ( specification, func ) | ( function ) |
Returns: a function
Simulates named arguments in GAP as follows:
specification is a list of pairs with first entry the name of the argument and second entry a default value (which must be immutable).
func must be a function with first argument CAP_NAMED_ARGUMENTS
.
The return value is a function with one argument fewer than func.
When calling the returned function, the arguments are passed on to func. To simulate named arguments, any GAP options appearing in specification are consumed and put into the record CAP_NAMED_ARGUMENTS
.
‣ CAP_INTERNAL_GET_DATA_TYPE_FROM_STRING ( filter_string[, category] ) | ( function ) |
Returns: a record
The function takes one of the strings listed under filter_list
in 7.3 as input and returns the corresponding data type (see CapJitInferredDataTypes
(CompilerForCAP: CapJitInferredDataTypes) for details). If no category is given, data types with generic filters (IsCapCategoryObject
, IsCapCategoryMorphism
etc.) are returned. However, those cannot be used in the context of CompilerForCAP
because the component category
cannot be set in this case.
‣ CAP_INTERNAL_GET_DATA_TYPES_FROM_STRINGS ( list_of_strings[, category] ) | ( function ) |
Returns: a list
Applies CAP_INTERNAL_GET_DATA_TYPE_FROM_STRING
(9.2-2) to all elements of list and returns the result.
‣ CAP_INTERNAL_REPLACED_STRING_WITH_FILTER ( filter_string[, category] ) | ( function ) |
Returns: a filter
The function takes one of the strings listed under filter_list
in 7.3 as input. The corresponding filter of the category category is returned. If no category is given, generic filters (IsCapCategoryObject
, IsCapCategoryMorphism
etc.) are used.
‣ CAP_INTERNAL_REPLACED_STRINGS_WITH_FILTERS ( list[, category] ) | ( function ) |
Returns: Replaced list
Applies CAP_INTERNAL_REPLACED_STRING_WITH_FILTER
(9.2-4) to all elements of list and returns the result.
‣ 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, replacement_record ) | ( 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. Moreover, if appearances of found strings should be replaced by collections of other strings, then these can be specified in the replacement record.
‣ 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.
‣ CAP_INTERNAL_ASSERT_VALUE_IS_OF_TYPE_GETTER ( data_type, human_readable_identifier_getter ) | ( function ) |
Returns: a function
Returns a function f
which throws an error if its first argument is not of type data_type. human_readable_identifier_getter is a function returning a string which is used to refer to the first argument of f
in the error message. The arguments of f
except the first argument are passed on to human_readable_identifier_getter.
‣ CAP_INTERNAL_ASSERT_IS_CELL_OF_CATEGORY ( cell, category, human_readable_identifier_getter ) | ( function ) |
The function throws an error if cell is not a cell of category. If category is the boolean false
, only general checks not specific to a concrete category are performed. human_readable_identifier_getter is a 0-ary function returning a string which is used to refer to cell in the error message.
‣ CAP_INTERNAL_ASSERT_IS_OBJECT_OF_CATEGORY ( object, category, human_readable_identifier_getter ) | ( function ) |
The function throws an error if object is not an object of category. If category is the boolean false
, only general checks not specific to a concrete category are performed. human_readable_identifier_getter is a 0-ary function returning a string which is used to refer to cell in the error message.
‣ CAP_INTERNAL_ASSERT_IS_MORPHISM_OF_CATEGORY ( morphism, category, human_readable_identifier_getter ) | ( function ) |
The function throws an error if morphism is not a morphism of category. If category is the boolean false
, only general checks not specific to a concrete category are performed. human_readable_identifier_getter is a 0-ary function returning a string which is used to refer to cell in the error message.
‣ CAP_INTERNAL_ASSERT_IS_TWO_CELL_OF_CATEGORY ( two_cell, category, human_readable_identifier_getter ) | ( function ) |
The function throws an error if two_cell is not a \(2\)-cell of category. If category is the boolean false
, only general checks not specific to a concrete category are performed. human_readable_identifier_getter is a 0-ary function returning a string which is used to refer to cell in the error message.
‣ CachingStatistic ( category[, operation] ) | ( function ) |
Prints statistics for all caches in category. If operation is given (as a string), only statistics for the given operation cache is stored.
‣ BrowseCachingStatistic ( category ) | ( function ) |
Displays statistics for all caches in category. in a Browse window. Here "status" indicates if the cache is weak, strong, or inactive, "hits" is the number of successful cache accesses, "misses" the number of unsuccessful cache accesses, and "stored" the number of objects currently stored in the cache.
‣ InstallDeprecatedAlias ( alias_name, function_name, deprecation_date ) | ( function ) |
Makes the function given by function_name available under the alias alias_name with a deprecation warning including the date deprecation_date.
‣ IsSpecializationOfFilter ( filter1, filter2 ) | ( function ) |
Checks if filter2 is more special than filter1, i.e. if filter2 implies filter1. filter1 and/or filter2 can also be one of the strings listed under filter_list
in 7.3 and in this case are replaced by the corresponding filters (e.g. IsCapCategory
, IsCapCategoryObject
, IsCapCategoryMorphism
, ...).
‣ IsSpecializationOfFilterList ( filter_list1, filter_list2 ) | ( function ) |
Checks if filter_list2 is more special than filter_list1, i.e. if both lists have the same length and any element of filter_list2 is more special than the corresponding element of filter_list1 in the sense of IsSpecializationOfFilter
(9.2-17). filter_list1 and filter_list2 can also be the string "any"
, respresenting a most general filter list of any length.
‣ InstallMethodForCompilerForCAP ( same, as, for, InstallMethod ) | ( function ) |
Installs a method via InstallMethod
and adds it to the list of methods known to the compiler. See CapJitAddKnownMethod
(9.2-21) for requirements.
‣ InstallOtherMethodForCompilerForCAP ( same, as, for, InstallOtherMethod ) | ( function ) |
Installs a method via InstallOtherMethod
and adds it to the list of methods known to the compiler. See CapJitAddKnownMethod
(9.2-21) for requirements.
‣ CapJitAddKnownMethod ( operation, filters, method ) | ( function ) |
Adds a method to the list of methods known to the compiler. If the first filter implies IsCapCategory
, method selection only takes the number of arguments and the first filter into account. This allows to resolve operations even in the case that the syntax tree cannot fully be typed. If the first filter does not imply IsCapCategory
, method selection takes all filters into account. To strictly distinguish between the two cases, IsCapCategory
must not imply the first filter (except if the first filter is equal to IsCapCategory
). Method selection is strict in the sense that two different methods for the same operation must not be comparable. That is, they must have a different number of filters or the filters at at least one position must not be related via implication. In particular, adding two methods with a CAP category as first argument (or a convenience method for a CAP operation) with the same number of arguments and one category filter implying the other is not supported.
‣ CapJitAddTypeSignature ( name, input_filters, output_data_type ) | ( function ) |
(experimental) Adds a type signature for the global function or operation given by name to the compiler. input_filters must be a list of filters, or the string '"any"' representing a most general filter list of any length. output_data_type must be a filter, a data type, or a function. If it is a function with one argument, it must accept a list of input types and return the corresponding data type of the output. If it is a function with two arguments, it must accept the arguments of a function call of name (as syntax trees) and the function stack and return a record with components args
(the possibly modified arguments) and output_type
(the data type of the output). See CapJitInferredDataTypes
(CompilerForCAP: CapJitInferredDataTypes) for more details on data types.
‣ CapJitDataTypeOfListOf ( element_type ) | ( function ) |
(experimental) Returns the data type of a list whose elements are of type element_type. element_type must be a filter or a data type.
‣ CapJitDataTypeOfNTupleOf ( n, element_types... ) | ( function ) |
(experimental) Returns the data type of an n-tuple whose entries are of types corresponding to element_types. element_types... must be filters or data types.
‣ CapJitDataTypeOfRing ( ring ) | ( function ) |
‣ CapJitDataTypeOfElementOfRing ( ring ) | ( function ) |
(experimental) Returns the data type of the ring (or elements of the ring) ring.
‣ CapJitDataTypeOfCategory ( category ) | ( function ) |
‣ CapJitDataTypeOfObjectOfCategory ( category ) | ( function ) |
‣ CapJitDataTypeOfMorphismOfCategory ( category ) | ( function ) |
‣ CapJitDataTypeOfTwoCellOfCategory ( category ) | ( function ) |
(experimental) Returns the data type of the category (or objects, morphisms, or two cells in the category) category.
‣ CapJitTypedExpression ( value, data_type_getter ) | ( function ) |
(experimental) Simply returns value, but allows to specify the data type of value for CompilerForCAP. data_type_getter must be a literal function or a global variable pointing to a function. The function must accept no arguments or a single argument, and return a valid data type. If the function accepts a single argument, it must be inside a CAP operation or method known to CompilerForCAP (for example, see InstallMethodForCompilerForCAP
(9.2-19)), and the current category (i.e. the first argument of the CAP operation or method known to CompilerForCAP) will be passed to the function. IMPORTANT: If data_type_getter is a literal function, it must not contain references to variables in its context. Otherwise the code might access random memory locations. See CapJitInferredDataTypes
(CompilerForCAP: CapJitInferredDataTypes) for more details on data types.
‣ CapFixpoint ( predicate, func, initial_value ) | ( function ) |
Computes a fixpoint of func with regard to equality given by predicate, starting with initial_value. If no such fixpoint exists, the execution does not terminate.
‣ Iterated ( list, func, initial_value ) | ( operation ) |
Shorthand for Iterated( Concatenation( [ initial_value ], list ), func )
.
‣ Iterated ( list, func, initial_value, terminal_value ) | ( operation ) |
Shorthand for Iterated( Concatenation( [ initial_value ], list, [ terminal_value ] ), func )
.
‣ TransitivelyNeededOtherPackages ( package_name ) | ( function ) |
Returns a list of package names which are transitively needed other packages of the package package_name.
‣ PackageOfCAPOperation ( operation_name ) | ( function ) |
Returns the name of the package to which the CAP operation given by operation_name belongs or fail if the package is not known.
‣ SafePosition ( list, obj ) | ( operation ) |
Returns: an integer
Returns Position( list, obj )
while asserting that this value is not fail
.
‣ SafeUniquePosition ( list, obj ) | ( operation ) |
Returns: an integer
Returns Position( list, obj )
while asserting that this value is not fail
and the position is unique.
‣ SafePositionProperty ( list, func ) | ( operation ) |
Returns: an integer
Returns PositionProperty( list, func )
while asserting that this value is not fail
.
‣ SafeUniquePositionProperty ( list, func ) | ( operation ) |
Returns: an integer
Returns a position in list for which func returns true
when applied to the corresponding entry while asserting that there exists exactly one such position.
‣ SafeFirst ( list, func ) | ( operation ) |
Returns: an element of the list
Returns First( list, func )
while asserting that this value is not fail
.
‣ SafeUniqueEntry ( list, func ) | ( operation ) |
Returns: an element of the list
Returns a value in list for which func returns true
while asserting that there exists exactly one such entry.
‣ NTuple ( n, args... ) | ( function ) |
Returns: a list
Returns args while asserting that its length is n.
‣ Pair ( first, second ) | ( function ) |
Returns: a list
Alias for NTuple( 2, first, second )
.
‣ Triple ( first, second, third ) | ( function ) |
Returns: a list
Alias for NTuple( 3, first, second, third )
.
‣ TransposedMatWithGivenDimensions ( nr_rows, nr_cols, listlist ) | ( function ) |
Returns: a list (of lists)
The arguments are two integers nr_rows, nr_cols and a list of lists listlist such that nr_rows = Length
(listlist) and nr_cols = Length
(listlist\([i]\)) for \(i=1\) to nr_rows. The output is the transpose of listlist as a list consisting of nr_cols rows and nr_rows columns.
‣ HandlePrecompiledTowers ( category, underlying_category, constructor_name ) | ( function ) |
Handles the information stored in underlying_category!.compiler_hints.precompiled_towers
(if bound) which is a list of records with components:
remaining_constructors_in_tower
: a non-empty list of strings (names of category constructors)
precompiled_functions_adder
: a function accepting a CAP category as input
If constructor_name is the only entry of remaining_constructors_in_tower
, precompiled_functions_adder
is applied to category (except if the option no_precompiled_code
is set to true
) and should add precompiled code. Else, if constructor_name is the first entry of remaining_constructors_in_tower
, the information is attached to category!.compiler_hints.precompiled_towers
after removing constructor_name from remaining_constructors_in_tower
. Note: Currently, there is no logic for finding the "optimal" code to install if constructor_name is the only entry of remaining_constructors_in_tower
of multiple entries.
‣ CAP_JIT_INCOMPLETE_LOGIC ( value ) | ( function ) |
Simply returns value. Used to signify that the argument is not fully run through all logic functions/templates by CompilerForCAP.
‣ CAP_JIT_EXPR_CASE_WRAPPER ( func ) | ( function ) |
Simply returns func, which must be a literal function without arguments only containing an if-elif-else
statement with each branch consisting of a single return
statement. Used to write expressions of the form function() if-elif-else end()
as CAP_JIT_EXPR_CASE_WRAPPER(function() if-elif-else end)()
because the former is not valid in Julia.
‣ ListWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as List( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ SumWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as Sum( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ ProductWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as Product( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ ForAllWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as ForAll( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ ForAnyWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as ForAny( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ NumberWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as Number( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ FilteredWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as Filtered( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ FirstWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as First( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ LastWithKeys ( list, func ) | ( function ) |
Returns: a list
Same as Last( list, func )
but func gets both the key i
and list[i]
as arguments.
‣ CreateGapObjectWithAttributes ( type[, attribute1, value1, ...] ) | ( function ) |
Shorthand for ObjectifyWithAttributes( rec( ), type, [attribute1, value1, ...] )
.
generated by GAPDoc2HTML