Skip to content

Commit c2e22b8

Browse files
authored
Merge pull request #726 from zickgraf/MatElm
Update TODO file and normalize "MatElm"
2 parents e859b5b + 07c2195 commit c2e22b8

File tree

5 files changed

+57
-15
lines changed

5 files changed

+57
-15
lines changed

CompilerForCAP/PackageInfo.g

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SetPackageInfo( rec(
1010

1111
PackageName := "CompilerForCAP",
1212
Subtitle := "Speed up computations in CAP categories",
13-
Version := "2021.10-03",
13+
Version := "2021.10-04",
1414
Date := Concatenation( "01/", ~.Version{[ 6, 7 ]}, "/", ~.Version{[ 1 .. 4 ]} ),
1515
License := "GPL-2.0-or-later",
1616

CompilerForCAP/TODO

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
Speed:
22

33
* reduce number of calls to `StructuralCopy`
4-
* get value of all expression from jit args only once
5-
* logic templates per category?
6-
* drop unused variables completely (instead of marking them with _UNUSED_)
74

85
Features:
96

107
* list expressions for logic templates
118
* do not inline variables but only a reference to them for the logic to use
129
* support compilation of operations
13-
* support assigning a variable multiple times, at least in different if branches
10+
* For categories with finitely many objects (or morphisms): detect parts of the code which can be precomputed, e.g. hom_structure_on_basis_paths in Algebroids.

CompilerForCAP/examples/MatElm.g

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#! @Chapter Examples and tests
2+
3+
#! @Section Tests
4+
5+
LoadPackage( "CompilerForCAP", false );
6+
7+
#! @Example
8+
9+
func := x -> x[1,1];;
10+
tree := ENHANCED_SYNTAX_TREE( func );;
11+
tree := CapJitResolvedGlobalVariables( tree );;
12+
Display( ENHANCED_SYNTAX_TREE_CODE( tree ) );
13+
#! function ( x_1 )
14+
#! return MatElm( x_1, 1, 1 );
15+
#! end
16+
17+
#! @EndExample

CompilerForCAP/gap/EnhancedSyntaxTree.gi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,19 @@ InstallGlobalFunction( ENHANCED_SYNTAX_TREE_CODE, function ( tree )
11931193

11941194
fi;
11951195

1196+
# normalize "[,]" (GAP 4.11) to "MatElm" (GAP 4.12)
1197+
if tree.type = "EXPR_REF_GVAR" and tree.gvar = "[,]" then
1198+
1199+
# this code is only executed with GAP 4.11, but coverage information is only uploaded for GAP master
1200+
Assert( 0, IsIdenticalObj( \[\,\], MatElm ) );
1201+
1202+
tree := rec(
1203+
type := "EXPR_REF_GVAR",
1204+
gvar := "MatElm",
1205+
);
1206+
1207+
fi;
1208+
11961209
fi;
11971210

11981211
return tree;

makefile

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,28 @@ doc_ToricSheaves:
8888

8989
# END PACKAGE JANITOR
9090

91-
ci-test: homalg_compatibility doc
92-
cd CAP && make ci-test
93-
cd ModulePresentationsForCAP && make ci-test
94-
cd GradedModulePresentationsForCAP && make ci-test
95-
cd LinearAlgebraForCAP && make ci-test
96-
cd GeneralizedMorphismsForCAP && make ci-test
97-
cd GroupRepresentationsForCAP && make ci-test
98-
cd InternalExteriorAlgebraForCAP && make ci-test
99-
cd CompilerForCAP && make ci-test
100-
cd FreydCategoriesForCAP && make doc
91+
ci-test_CAP:
92+
$(MAKE) -C CAP ci-test
93+
94+
ci-test_CompilerForCAP:
95+
$(MAKE) -C CompilerForCAP ci-test
96+
97+
ci-test_GeneralizedMorphismsForCAP:
98+
$(MAKE) -C GeneralizedMorphismsForCAP ci-test
99+
100+
ci-test_GradedModulePresentationsForCAP:
101+
$(MAKE) -C GradedModulePresentationsForCAP ci-test
102+
103+
ci-test_GroupRepresentationsForCAP:
104+
$(MAKE) -C GroupRepresentationsForCAP ci-test
105+
106+
ci-test_InternalExteriorAlgebraForCAP:
107+
$(MAKE) -C InternalExteriorAlgebraForCAP ci-test
108+
109+
ci-test_LinearAlgebraForCAP:
110+
$(MAKE) -C LinearAlgebraForCAP ci-test
111+
112+
ci-test_ModulePresentationsForCAP:
113+
$(MAKE) -C ModulePresentationsForCAP ci-test
114+
115+
ci-test: homalg_compatibility doc ci-test_CAP ci-test_CompilerForCAP ci-test_GeneralizedMorphismsForCAP ci-test_GradedModulePresentationsForCAP ci-test_GroupRepresentationsForCAP ci-test_InternalExteriorAlgebraForCAP ci-test_LinearAlgebraForCAP ci-test_ModulePresentationsForCAP

0 commit comments

Comments
 (0)