# Additional {Seam} functions for the HotPath heuristic. # Last edited on 2021-05-14 03:03:15 by jstolfi # In addition to the fields defined in the {seam} interface, each {Seam} # object also has some mutable fields that are used during the # {hotpath.best_path} algorithm. They are handled by the procedures in # this section. # # These attributes are not defined automatically. Their initial values # are undefined and must be properly defined by the {set_*} procedures # below, just before or during the heuristic. import seam_hp_IMP import block def get_coverage_status(sm): # Returns /coverage status/ of the {Seam} object {sm}. This is a list # {iscov} of two bools, such that {iscov[i]} is true if and only if # some choice of the block {bc = side(sm,i)} has been included in the # current tentative path {Q}. return seam_hp_IMP.get_coverage_status(sm) def set_coverage_status(sm, iscov): # Sets the coverage status of {sm} to {iscov}, which should be a list # of two bools. seam_hp_IMP.set_coverage_status(sm, iscov)