Skip to content
Merged
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
6 changes: 3 additions & 3 deletions CAP/gap/CategoryMorphisms.gi
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ InstallMethod( RandomMorphism,
InstallGlobalFunction( ObjectifyMorphismForCAPWithAttributes,

function( arg_list... )
local category, morphism, objectified_morphism;
local category, objectified_morphism;

category := arg_list[ 2 ];

Expand All @@ -275,8 +275,8 @@ InstallGlobalFunction( ObjectifyMorphismForCAPWithAttributes,
objectified_morphism := CallFuncList( ObjectifyWithAttributes, arg_list );

if category!.predicate_logic then
INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Source", [ objectified_morphism ], Source( morphism ), category );
INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Range", [ objectified_morphism ], Range( morphism ), category );
INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Source", [ objectified_morphism ], Source( objectified_morphism ), category );
INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Range", [ objectified_morphism ], Range( objectified_morphism ), category );
fi;

return objectified_morphism;
Expand Down
2 changes: 1 addition & 1 deletion CompilerForCAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SetPackageInfo( rec(
PackageName := "CompilerForCAP",
Subtitle := "This package allows to \"compile\" the code of CAP categories.",
Version := Maximum( [
"2020.06.17", ## Fabian's version
"2020.07.06", ## Fabian's version
## this line prevents merge conflicts
] ),
Date := ~.Version{[ 1 .. 10 ]},
Expand Down
7 changes: 4 additions & 3 deletions CompilerForCAP/gap/ResolveGlobalVariables.gi
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ InstallGlobalFunction( "CapJitResolvedGlobalVariables", function( tree )

if IsRecord( tree ) and not ( IsBound( tree.CAP_JIT_NOT_RESOLVABLE ) and tree.CAP_JIT_NOT_RESOLVABLE ) then

if tree.type = "EXPR_REF_GVAR" then
# do not resolve the global variable "Julia" since we otherwise lose information about the Julia module and operation
if tree.type = "EXPR_REF_GVAR" and tree.gvar <> "Julia" then

value := ValueGlobal( tree.gvar );

elif tree.type = "EXPR_ELM_COMOBJ_NAME" and tree.comobj.type = "EXPR_REF_GVAR" then
elif tree.type = "EXPR_ELM_COMOBJ_NAME" and tree.comobj.type = "EXPR_REF_GVAR" and tree.comobj.gvar <> "Julia" then

value := ValueGlobal( tree.comobj.gvar )!.(tree.name);

elif tree.type = "EXPR_ELM_REC_NAME" and tree.record.type = "EXPR_REF_GVAR" then
elif tree.type = "EXPR_ELM_REC_NAME" and tree.record.type = "EXPR_REF_GVAR" and tree.record.gvar <> "Julia" then

value := ValueGlobal( tree.record.gvar ).(tree.name);

Expand Down
4 changes: 2 additions & 2 deletions CompilerForCAP/gap/ResolveOperations.gi
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ InstallGlobalFunction( CapJitResolvedOperations, function( tree, jit_args )
if Length( filter_list ) = Length( arguments ) and ForAll( [ 1 .. Length( filter_list ) ], i -> replaced_filter_list[i](arguments[i]) ) then

# do not infer category from other_object et al.
positions := PositionsProperty( filter_list, x -> x in [ "object", "morphism", "twocell", "list_of_objects", "list_of_morphisms" ] );
positions := PositionsProperty( filter_list, x -> x in [ "category", "object", "morphism", "twocell", "list_of_objects", "list_of_morphisms" ] );
category := CapJitGetCapCategoryFromArguments( arguments{ positions } );

if category = fail then
Expand Down Expand Up @@ -185,7 +185,7 @@ InstallGlobalFunction( CapJitResolvedOperations, function( tree, jit_args )

if not IsKernelFunction( method ) then

resolved_tree := ENHANCED_SYNTAX_TREE( method );
resolved_tree := ENHANCED_SYNTAX_TREE( method, true );

if Length( resolved_tree.stats.statements ) >= 1 and resolved_tree.stats.statements[1].type = "STAT_PRAGMA" and resolved_tree.stats.statements[1].value = "% CAP_JIT_RESOLVE_FUNCTION" then

Expand Down