The BBP module provides inspection routines over the BAT buffer pool. It is mainly used at the MAL level to debug a program.
MODULE bbp;
PATTERN bbp.bind(X_0:str):bat[:any_2];
COMMENT "Locate the BAT using its logical name";
COMMAND bbp.get() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:str], X_3:bat[:lng], X_4:bat[:int], X_5:bat[:int], X_6:bat[:str], X_7:bat[:int], X_8:bat[:str], X_9:bat[:str], X_10:bat[:str]);
COMMENT "bpp";
COMMAND bbp.getCount():bat[:lng];
COMMENT "Create a BAT with the cardinalities of all known BATs";
COMMAND bbp.getDirty():bat[:str];
COMMENT "Create a BAT with the dirty/ diffs/clean status";
COMMAND bbp.getDiskSpace():lng;
COMMENT "Estimate the amount of disk space occupied by dbpath";
COMMAND bbp.getIndex(X_0:bat[:any_2]):int;
COMMENT "Retrieve the index in the BBP";
COMMAND bbp.getKind():bat[:str];
COMMENT "Create a BAT with the persistency status";
COMMAND bbp.getLRefCount():bat[:int];
COMMENT "Create a BAT with the logical reference counts";
COMMAND bbp.getLRefCount(X_0:bat[:any_1]):int;
COMMENT "Utility for debugging MAL interpreter";
COMMAND bbp.getLocation():bat[:str];
COMMENT "Create a BAT with their disk locations";
COMMAND bbp.getName(X_0:bat[:any_1]):str;
COMMENT "Map a BAT into its internal name";
COMMAND bbp.getNames():bat[:str];
COMMENT "Map BAT into its bbp name";
COMMAND bbp.getPageSize():int;
COMMENT "Obtain the memory page size";
COMMAND bbp.getRefCount():bat[:int];
COMMENT "Create a BAT with the (hard) reference counts";
COMMAND bbp.getRefCount(X_0:bat[:any_1]):int;
COMMENT "Utility for debugging MAL interpreter";
COMMAND bbp.getStatus():bat[:str];
COMMENT "Create a BAT with the disk/load status";
COMMAND bbp.setName(X_0:bat[:any_1], X_1:str):str;
COMMENT "Rename a BAT";