edu.byu.ece.edif.core
Class BasicEdifNameClashPolicy

java.lang.Object
  extended by edu.byu.ece.edif.core.BasicEdifNameClashPolicy
All Implemented Interfaces:
EdifNameClashPolicy, java.io.Serializable

public class BasicEdifNameClashPolicy
extends java.lang.Object
implements EdifNameClashPolicy

Defines standard name clashing policies for EDIF name spaces. Clashing rules (according to ngdbuild) for each EDIF name space:

EdifCellInstances in an EdifCell

EdifNets in an EdifCell

  • single-single - warning, auto-rename
  • single-new - none
  • single-old - warning, auto-rename
  • new-new - none
  • old-old - warning, auto-rename
  • old-new - none

    EdifLibraries in an EdifLibraryManager

    EdifCells in an EdifLibrary

    EdifPorts in an EdifCellInterface

    This class is designed to provide a set of policies that can be used for each EDIF namespace. Because of the map implementation of cell instance and net collections, new-new, new-single, and single-single combinations should never be allowed even though ngdbuild allows new-new and single-new duplications for nets. With this taken into account, there are really only two basic policies that need to be used by the EDIF name spaces. They are the anyButOldWithNewClashPolicy (to be used by EdifNets in an EdifCell, EdifCellInstances in an EdifCell, EdifPorts in an EdifCellInterface) and the singleAndNewClashPolicy (to be used by: EdifLibraries in an EdifLibraryManager, EdifCells in an EdifLibrary)

    See Also:
    Serialized Form

    Field Summary
    private  boolean _newClashesNew
               
    private  boolean _oldClashesNew
               
    private  boolean _oldClashesOld
               
    private  boolean _singleClashesNew
               
    private  boolean _singleClashesOld
               
    private  boolean _singleClashesSingle
               
    static EdifNameClashPolicy anyButOldWithNewClashPolicy
              A name clashing policy which causes a clash between any combination of equal names except for a new name with an old name.
    static EdifNameClashPolicy singleAndNewClashPolicy
              A name clashing policy which causes a clash between any combination of single and new names but not with any combination that includes an old name.
     
    Constructor Summary
    BasicEdifNameClashPolicy(boolean singleClashesSingle, boolean singleClashesNew, boolean singleClashesOld, boolean newClashesNew, boolean oldClashesOld, boolean oldClashesNew)
               
     
    Method Summary
     boolean newClashesNew()
               
     boolean oldClashesNew()
               
     boolean oldClashesOld()
               
     boolean singleClashesNew()
               
     boolean singleClashesOld()
               
     boolean singleClashesSingle()
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    anyButOldWithNewClashPolicy

    public static final EdifNameClashPolicy anyButOldWithNewClashPolicy
    A name clashing policy which causes a clash between any combination of equal names except for a new name with an old name.


    singleAndNewClashPolicy

    public static final EdifNameClashPolicy singleAndNewClashPolicy
    A name clashing policy which causes a clash between any combination of single and new names but not with any combination that includes an old name.


    _singleClashesSingle

    private boolean _singleClashesSingle

    _singleClashesNew

    private boolean _singleClashesNew

    _singleClashesOld

    private boolean _singleClashesOld

    _newClashesNew

    private boolean _newClashesNew

    _oldClashesOld

    private boolean _oldClashesOld

    _oldClashesNew

    private boolean _oldClashesNew
    Constructor Detail

    BasicEdifNameClashPolicy

    public BasicEdifNameClashPolicy(boolean singleClashesSingle,
                                    boolean singleClashesNew,
                                    boolean singleClashesOld,
                                    boolean newClashesNew,
                                    boolean oldClashesOld,
                                    boolean oldClashesNew)
    Method Detail

    singleClashesSingle

    public boolean singleClashesSingle()
    Specified by:
    singleClashesSingle in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether a single name equal to another single name should produce a clash

    singleClashesNew

    public boolean singleClashesNew()
    Specified by:
    singleClashesNew in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether a single name equal to another new name should produce a clash

    singleClashesOld

    public boolean singleClashesOld()
    Specified by:
    singleClashesOld in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether a single name equal to another old name should produce a clash

    newClashesNew

    public boolean newClashesNew()
    Specified by:
    newClashesNew in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether a new name equal to another new name should produce a clash

    oldClashesOld

    public boolean oldClashesOld()
    Specified by:
    oldClashesOld in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether an old name equal to another old name should produce a clash

    oldClashesNew

    public boolean oldClashesNew()
    Specified by:
    oldClashesNew in interface EdifNameClashPolicy
    Returns:
    a boolean representing whether an old name equal to another new name should produce a clash