Skip to content

Commit

Permalink
Fix checking package in read.g/init.g
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Aug 27, 2024
1 parent e6f0fae commit 597c419
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
2 changes: 2 additions & 0 deletions gap/BacktrackKit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,5 @@ DeclareGlobalFunction( "BuildRBase" );
#!
DeclareGlobalFunction( "Backtrack" );

# From init.g
_BTKit.CheckInitg := true;
5 changes: 4 additions & 1 deletion gap/canonical.gi
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ InstallGlobalFunction( CanonicalBacktrack,
end);


_BTKit.SimpleCanonicalSearch :=
_BTKit.SimpleCanonicalSearch :=
function(state, group)
local canonical, tracer;
canonical := rec(perms := []);
Expand Down Expand Up @@ -128,3 +128,6 @@ BTKit_SimpleCanonicalSearchInGroup :=
Remove(ret.image);
return ret;
end;

# Used in read.g
_BTKit.CheckReadg := true;
3 changes: 3 additions & 0 deletions gap/interface.gd
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ DeclareGlobalFunction( "BTKit_SimpleSinglePermSearch" );

#!
DeclareGlobalFunction( "BTKit_SimpleAllPermSearch" );

# Used in init.g
_BTKit.CheckInitgInterface := true;
5 changes: 5 additions & 0 deletions gap/interface.gi
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,8 @@ end);

InstallGlobalFunction( BTKit_SimpleAllPermSearch,
{ps, conlist, conf...} -> _BTKit.SimpleSearch(_BTKit.BuildProblem(ps, conlist, conf)));



# Used in read.g
_BTKit.CheckReadgInterface := true;
10 changes: 5 additions & 5 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ if not IsBound(_BTKit) then
_BTKit := AtomicRecord(rec());
fi;

if not IsBound(_BTKit.FilesInit) then
if not IsBound(_BTKit.CheckInitg) then
ReadPackage( "BacktrackKit", "gap/tracer.gd");
ReadPackage( "BacktrackKit", "gap/partitionstack.gd");
fi;

if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.InitInterface) then
_BTKit.InitInterface := true;
if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.CheckInitgInterface) then
# _BTKit.CheckInitgInterface := true; is in gap/interface.gd
ReadPackage( "BacktrackKit", "gap/interface.gd");
fi;

if not IsBound(_BTKit.FilesInit) then
_BTKit.FilesInit := true;
if not IsBound(_BTKit.CheckInitg) then
# _BTKit.CheckInitg := true; in gap/BacktrackKit.gd
ReadPackage( "BacktrackKit", "gap/BacktrackKit.gd");

ReadPackage( "BacktrackKit", "gap/canonical.gd");
Expand Down
10 changes: 5 additions & 5 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ fi;



if not IsBound(_BTKit.ReadFiles) then
if not IsBound(_BTKit.CheckReadg) then
ReadPackage( "BacktrackKit", "gap/internal/util.g");
ReadPackage( "BacktrackKit", "gap/stabtree.g");
ReadPackage( "BacktrackKit", "gap/BacktrackKit.gi");
fi;


if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.ReadInterface) then
_BTKit.ReadInterface := true;
if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.CheckReadgInterface) then
# _BTKit.CheckReadgInterface := true; set in gap/interface.gi
ReadPackage( "BacktrackKit", "gap/interface.gi");
fi;

if not IsBound(_BTKit.ReadFiles) then
_BTKit.ReadFiles := true;
if not IsBound(_BTKit.CheckReadg) then
# _BTKit.CheckReadg := true; set in gap/canonical.gi

ReadPackage( "BacktrackKit", "gap/canonical.gi");
ReadPackage( "BacktrackKit", "gap/constraint.gi");
Expand Down

0 comments on commit 597c419

Please sign in to comment.