Skip to content

Commit

Permalink
Make it easier to redirect ReadPackage calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Aug 27, 2024
1 parent 597c419 commit 94de820
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 23 deletions.
18 changes: 11 additions & 7 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,30 @@
# Reading the declaration part of the package.
#

if not IsBound(_ReadBTPackage) then
_ReadBTPackage := {f} -> ReadPackage("BacktrackKit", f);
fi;

# Private members
if not IsBound(_BTKit) then
_BTKit := AtomicRecord(rec());
fi;

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

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");
_ReadBTPackage( "gap/interface.gd");
fi;

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

ReadPackage( "BacktrackKit", "gap/canonical.gd");
ReadPackage( "BacktrackKit", "gap/constraint.gd");
ReadPackage( "BacktrackKit", "gap/refiner.gd");
_ReadBTPackage( "gap/canonical.gd");
_ReadBTPackage( "gap/constraint.gd");
_ReadBTPackage( "gap/refiner.gd");
fi;
33 changes: 17 additions & 16 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Reading the implementation part of the package.
#


# A store of the BTKit refiners
if not IsBound(BTKit_Refiner) then
BTKit_Refiner := AtomicRecord(rec());
Expand All @@ -12,32 +13,32 @@ fi;


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


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");
_ReadBTPackage( "gap/interface.gi");
fi;

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

ReadPackage( "BacktrackKit", "gap/canonical.gi");
ReadPackage( "BacktrackKit", "gap/constraint.gi");
ReadPackage( "BacktrackKit", "gap/partitionstack.gi");
ReadPackage( "BacktrackKit", "gap/refiner.gi");
ReadPackage( "BacktrackKit", "gap/tracer.gi");

ReadPackage( "BacktrackKit", "gap/refiners/simple.g");
ReadPackage( "BacktrackKit", "gap/refiners/conjugacyexample.g");
ReadPackage( "BacktrackKit", "gap/refiners/normaliserexample.g");
ReadPackage( "BacktrackKit", "gap/refiners/graphs.g");
ReadPackage( "BacktrackKit", "gap/refiners/canonicalrefiners.g");
ReadPackage( "BacktrackKit", "gap/refiners/tree/tree.g");
_ReadBTPackage( "gap/canonical.gi");
_ReadBTPackage( "gap/constraint.gi");
_ReadBTPackage( "gap/partitionstack.gi");
_ReadBTPackage( "gap/refiner.gi");
_ReadBTPackage( "gap/tracer.gi");

_ReadBTPackage( "gap/refiners/simple.g");
_ReadBTPackage( "gap/refiners/conjugacyexample.g");
_ReadBTPackage( "gap/refiners/normaliserexample.g");
_ReadBTPackage( "gap/refiners/graphs.g");
_ReadBTPackage( "gap/refiners/canonicalrefiners.g");
_ReadBTPackage( "gap/refiners/tree/tree.g");

Perform(["BTKit_Refiner", "_BTKit", "Constraint"],
SetNamesForFunctionsInRecord);
Expand Down

0 comments on commit 94de820

Please sign in to comment.