Skip to content

Commit

Permalink
Redirect ReadPackage calls in dependancies
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Aug 27, 2024
1 parent f20dc48 commit 8dcfb38
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 35 deletions.
18 changes: 11 additions & 7 deletions dependancies/BacktrackKit/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 dependancies/BacktrackKit/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
10 changes: 7 additions & 3 deletions dependancies/GraphBacktracking/init.g
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
# Reading the declaration part of the package.
#

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


if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.InitInterfaceGB) then
# _BTKit.InitInterfaceGB := true; in gap/interface.gd
ReadPackage( "GraphBacktracking", "gap/interface.gd");
_ReadGBPackage( "gap/interface.gd");
fi;

if not IsBound(_BTKit.FilesInitGB) then
# _BTKit.FilesInitGB := true; in gap/GraphBacktracking.gd
ReadPackage( "GraphBacktracking", "gap/GraphBacktracking.gd");
ReadPackage( "GraphBacktracking", "gap/Equitable.gd");
_ReadGBPackage( "gap/GraphBacktracking.gd");
_ReadGBPackage( "gap/Equitable.gd");
fi;
18 changes: 9 additions & 9 deletions dependancies/GraphBacktracking/read.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ fi;

if not IsBound(_BT_SKIP_INTERFACE) and not IsBound(_BTKit.ReadInterfaceGB) then
# _BTKit.ReadInterfaceGB := true; in gap/interface.gi
ReadPackage( "GraphBacktracking", "gap/interface.gi");
_ReadGBPackage( "gap/interface.gi");
fi;

if not IsBound(_BTKit.FilesReadGB) then
# _BTKit.FilesReadGB := true; in gap/GraphBacktracking.gi
ReadPackage( "GraphBacktracking", "gap/GraphBacktracking.gi");
ReadPackage( "GraphBacktracking", "gap/Equitable.gi");
ReadPackage( "GraphBacktracking", "gap/constraints/simpleconstraints.g");
ReadPackage( "GraphBacktracking", "gap/constraints/normaliser.g");
ReadPackage( "GraphBacktracking", "gap/constraints/canonicalconstraints.g");
ReadPackage( "GraphBacktracking", "gap/constraints/conjugacy.g");
ReadPackage( "GraphBacktracking", "gap/constraints/digraphs.g");
ReadPackage( "GraphBacktracking", "gap/refiners.gi");
_ReadGBPackage( "gap/GraphBacktracking.gi");
_ReadGBPackage( "gap/Equitable.gi");
_ReadGBPackage( "gap/constraints/simpleconstraints.g");
_ReadGBPackage( "gap/constraints/normaliser.g");
_ReadGBPackage( "gap/constraints/canonicalconstraints.g");
_ReadGBPackage( "gap/constraints/conjugacy.g");
_ReadGBPackage( "gap/constraints/digraphs.g");
_ReadGBPackage( "gap/refiners.gi");

Perform(["GB_Con", "_GB"],
SetNamesForFunctionsInRecord);
Expand Down
6 changes: 6 additions & 0 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
#
# Reading the declaration part of the package.

_ReadGBPackage := {f} -> ReadPackage("Vole", Concatenation("dependancies/GraphBacktracking/", f));
_ReadBTPackage := {f} -> ReadPackage("Vole", Concatenation("dependancies/BacktrackKit/", f));
_BT_SKIP_INTERFACE := true;
ReadPackage("Vole", "dependancies/BacktrackKit/init.g");
ReadPackage("Vole", "dependancies/GraphBacktracking/init.g");
UnbindGlobal("_BT_SKIP_INTERFACE");
Unbind(_ReadBTPackage);
Unbind(_ReadGBPackage);

ReadPackage("Vole", "gap/internal/comms.gd");
ReadPackage("Vole", "gap/constraints.gd");
ReadPackage("Vole", "gap/interface.gd");
ReadPackage("Vole", "gap/refiners.gd");
ReadPackage("Vole", "gap/wrapper.gd");


4 changes: 4 additions & 0 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#
# Reading the implementation part of the package.

_ReadGBPackage := {f} -> ReadPackage("Vole", Concatenation("dependancies/GraphBacktracking/", f));
_ReadBTPackage := {f} -> ReadPackage("Vole", Concatenation("dependancies/BacktrackKit/", f));
_BT_SKIP_INTERFACE := true;
ReadPackage("Vole", "dependancies/BacktrackKit/read.g");
ReadPackage("Vole", "dependancies/GraphBacktracking/read.g");
UnbindGlobal("_BT_SKIP_INTERFACE");
Unbind(_ReadBTPackage);
Unbind(_ReadGBPackage);


ReadPackage("Vole", "gap/internal/util.g");
Expand Down

0 comments on commit 8dcfb38

Please sign in to comment.