Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AdditiveClosuresForCAP/gap/AdditiveClosure.gi
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_ADDITIVE_CLOSURE,
function( cat, diagram, test_object, morphisms, direct_sum )
local listlist;

listlist := UnionOfColumnsListList( Length( ObjectList( test_object ) ), List( morphisms, tau -> MorphismMatrix( tau ) ) );
listlist := UnionOfColumnsListList( BigInt( Length( ObjectList( test_object ) ) ), List( morphisms, tau -> MorphismMatrix( tau ) ) );

return AdditiveClosureMorphism( cat, test_object,
listlist,
Expand All @@ -939,7 +939,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_ADDITIVE_CLOSURE,
function( cat, diagram, test_object, morphisms, direct_sum )
local listlist;

listlist := UnionOfRowsListList( Length( ObjectList( test_object ) ), List( morphisms, tau -> MorphismMatrix( tau ) ) );
listlist := UnionOfRowsListList( BigInt( Length( ObjectList( test_object ) ) ), List( morphisms, tau -> MorphismMatrix( tau ) ) );

return AdditiveClosureMorphism( cat, direct_sum,
listlist,
Expand Down
6 changes: 3 additions & 3 deletions AdditiveClosuresForCAP/gap/CategoryOfRows.gi
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,
AddAdditiveGenerators( category,
function( cat )

return [ CategoryOfRowsObject( cat, 1 ) ];
return [ CategoryOfRowsObject( cat, BigInt( 1 ) ) ];

end );

Expand Down Expand Up @@ -1002,7 +1002,7 @@ InstallGlobalFunction( INSTALL_FUNCTIONS_FOR_CATEGORY_OF_ROWS,
AddTensorUnit( category,
function( cat )

return CategoryOfRowsObject( cat, 1 );
return CategoryOfRowsObject( cat, BigInt( 1 ) );

end );

Expand Down Expand Up @@ -1340,7 +1340,7 @@ AddFinalDerivationBundle( "Using BasisOfExternalHom and CoefficientsOfMorphism t
[ ],
function ( cat )

return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), 1 );
return CategoryOfRowsObject( RangeCategoryOfHomomorphismStructure( cat ), BigInt( 1 ) );

end
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ InstallMethod( CategoryOfRows_as_AdditiveClosure_RingAsCategory,

modeling_tower_object_datum := function ( cat, object )

return Length( ObjectList( object ) );
return BigInt( Length( ObjectList( object ) ) );

end;

Expand Down
2 changes: 1 addition & 1 deletion CAP/gap/InstallAdds.gi
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ InstallGlobalFunction( CAP_INTERNAL_INSTALL_ADDS_FROM_RECORD,

fi;

InstallMethod( CAP_operation, replaced_filter_list{[ 2 .. Length( replaced_filter_list ) ]}, get_convenience_function( CAP_operation ) );
InstallOtherMethod( CAP_operation, replaced_filter_list{[ 2 .. Length( replaced_filter_list ) ]}, get_convenience_function( CAP_operation ) );

fi;

Expand Down
2 changes: 1 addition & 1 deletion CAP/gap/ToolsForCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ InstallGlobalFunction( "CAP_INTERNAL_GET_DATA_TYPE_FROM_STRING", function ( stri

elif string = "integer" then

return rec( filter := IsInt );
return rec( filter := IsSmallIntRep );

elif string = "nonneg_integer_or_infinity" then

Expand Down
3 changes: 3 additions & 0 deletions CompilerForCAP/gap/CompilerForCAP.gi
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ InstallGlobalFunction( CAP_JIT_INTERNAL_COMPILED_ENHANCED_SYNTAX_TREE, function

# resolving phase
resolving_phase_functions := [
CapJitInferredDataTypes,
CapJitResolvedOperations,
CapJitInlinedArguments,
CapJitDroppedUnusedBindings,
Expand Down Expand Up @@ -399,6 +400,8 @@ InstallGlobalFunction( CAP_JIT_INTERNAL_COMPILED_ENHANCED_SYNTAX_TREE, function

fi;

#Display(ENHANCED_SYNTAX_TREE_CODE( tree ) );

tree := f( tree );

if CAP_JIT_INTERNAL_DEBUG_LEVEL >= 2 then
Expand Down
20 changes: 18 additions & 2 deletions CompilerForCAP/gap/InferDataTypes.gi
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ InstallGlobalFunction( "CAP_JIT_INTERNAL_GET_OUTPUT_TYPE_OF_GLOBAL_FUNCTION_BY_I

if Length( type_signatures ) = 0 then

DisplayWithCurrentlyCompiledFunctionLocation( Concatenation( "WARNING: Could not find matching declaration of ", gvar, " for input ", String( input_filters ) ) );
ErrorWithCurrentlyCompiledFunctionLocation( Concatenation( "WARNING: Could not find matching declaration of ", gvar, " for input ", String( input_filters ) ) );
return fail;

elif Length( type_signatures ) > 1 then
Expand Down Expand Up @@ -433,7 +433,7 @@ InstallGlobalFunction( CAP_JIT_INTERNAL_INFERRED_DATA_TYPES, function ( tree, in

if tree.type = "EXPR_INT" then

data_type := rec( filter := IsInt );
data_type := rec( filter := IsSmallIntRep );

elif tree.type = "EXPR_STRING" then

Expand Down Expand Up @@ -524,6 +524,7 @@ InstallGlobalFunction( CAP_JIT_INTERNAL_INFERRED_DATA_TYPES, function ( tree, in

elif tree.type = "EXPR_RANGE" then

# TODO
data_type := CapJitDataTypeOfListOf( IsInt );

elif tree.type = "EXPR_LIST" then
Expand Down Expand Up @@ -893,9 +894,17 @@ CapJitAddTypeSignature( "RETURN_TRUE", [ IsObject, IsObject ], IsBool );
CapJitAddTypeSignature( "Length", [ IsList ], IsInt );
CapJitAddTypeSignature( "IsEmpty", [ IsList ], IsBool );
CapJitAddTypeSignature( "+", [ IsInt, IsInt ], IsInt );
CapJitAddTypeSignature( "+", [ IsInt, IsSmallIntRep ], IsInt );
CapJitAddTypeSignature( "+", [ IsSmallIntRep, IsSmallIntRep ], IsSmallIntRep );
CapJitAddTypeSignature( "+", [ IsSmallIntRep, IsInt ], IsInt );
CapJitAddTypeSignature( "AdditiveInverseSameMutability", [ IsInt ], IsInt );
CapJitAddTypeSignature( "-", [ IsInt, IsInt ], IsInt );
CapJitAddTypeSignature( "-", [ IsInt, IsSmallIntRep ], IsInt );
CapJitAddTypeSignature( "-", [ IsSmallIntRep, IsSmallIntRep ], IsSmallIntRep );
CapJitAddTypeSignature( "*", [ IsInt, IsInt ], IsInt );
CapJitAddTypeSignature( "*", [ IsInt, IsSmallIntRep ], IsInt );
CapJitAddTypeSignature( "*", [ IsSmallIntRep, IsInt ], IsInt );
CapJitAddTypeSignature( "*", [ IsSmallIntRep, IsSmallIntRep ], IsInt );
CapJitAddTypeSignature( "^", [ IsInt, IsInt ], IsInt );
CapJitAddTypeSignature( "REM_INT", [ IsInt, IsInt ], IsInt );
CapJitAddTypeSignature( "QUO_INT", [ IsInt, IsInt ], IsInt );
Expand All @@ -905,6 +914,7 @@ CapJitAddTypeSignature( "^", [ IsPerm, IsInt ], IsPerm );
CapJitAddTypeSignature( "PermList", [ IsList ], IsPerm );
CapJitAddTypeSignature( "PermutationMat", [ IsPerm, IsInt ], CapJitDataTypeOfListOf( CapJitDataTypeOfListOf( IsInt ) ) );
CapJitAddTypeSignature( "BigInt", [ IsInt ], IsBigInt );
CapJitAddTypeSignature( "BigInt", [ IsSmallIntRep ], IsInt );

CapJitAddTypeSignature( "IS_IDENTICAL_OBJ", [ IsObject, IsObject ], function ( input_types )

Expand Down Expand Up @@ -1032,6 +1042,12 @@ CapJitAddTypeSignature( "[]", [ IsList, IsInt ], function ( input_types )

end );

CapJitAddTypeSignature( "[]", [ IsList, IsSmallIntRep ], function ( input_types )

return input_types[1].element_type;

end );

CapJitAddTypeSignature( "{}", [ IsList, IsList ], function ( input_types )

return input_types[1];
Expand Down
Loading