public class VariableNameProposer extends java.lang.Object implements InstantiationProposer
Modifier and Type | Field and Description |
---|---|
static VariableNameProposer |
DEFAULT
An instance of VariableNameProposer.
|
private static java.lang.String |
GENERALNAMECOUNTER_PREFIX |
private static java.lang.String |
LABEL_NAME_PREFIX |
private static java.lang.String |
LABELCOUNTER_NAME |
private static java.lang.String |
SKOLEMTERM_VARIABLE_NAME_POSTFIX |
private static java.lang.String |
SKOLEMTERMVARCOUNTER_PREFIX |
Constructor and Description |
---|
VariableNameProposer() |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
createBaseNameProposalBasedOnCorrespondence(TacletApp p_app,
SchemaVariable p_var,
Services services)
Find a name for the variable
p_var , based on the result
of Taclet.getNameCorrespondent |
java.lang.String |
getNameProposal(java.lang.String basename,
Services services,
Node undoAnchor) |
private java.lang.String |
getNameProposalForLabel(TacletApp app,
SchemaVariable var,
Services services,
Node undoAnchor,
ImmutableList<java.lang.String> previousProposals)
Generates a proposal for the instantiation of the given
schema variable, which is of sort label.
|
private java.lang.String |
getNameProposalForSkolemTermVariable(java.lang.String name,
Services services,
Node undoAnchor,
ImmutableList<java.lang.String> previousProposals) |
private java.lang.String |
getNameProposalForSkolemTermVariable(TacletApp p_app,
SchemaVariable p_var,
Services services,
Node undoAnchor,
ImmutableList<java.lang.String> previousProposals)
Generates a proposal for the instantiation of the given term
schema variable, which is declared as skolem term SV.
|
private java.lang.String |
getNameProposalForVariableSV(TacletApp app,
SchemaVariable var,
TermServices services,
ImmutableList<java.lang.String> previousProposals)
Generates a proposal for the instantiation of the given
schema variable, which is a variable SV.
|
Name |
getNewName(Services services,
Name baseName)
Warning: this method is buggy.
|
java.lang.String |
getProposal(TacletApp app,
SchemaVariable var,
Services services,
Node undoAnchor,
ImmutableList<java.lang.String> previousProposals)
Returns an instantiation proposal for the schema variable var.
|
public static final VariableNameProposer DEFAULT
private static final java.lang.String SKOLEMTERM_VARIABLE_NAME_POSTFIX
private static final java.lang.String LABEL_NAME_PREFIX
private static final java.lang.String GENERALNAMECOUNTER_PREFIX
private static final java.lang.String SKOLEMTERMVARCOUNTER_PREFIX
private static final java.lang.String LABELCOUNTER_NAME
public java.lang.String getProposal(TacletApp app, SchemaVariable var, Services services, Node undoAnchor, ImmutableList<java.lang.String> previousProposals)
getProposal
in interface InstantiationProposer
app
- the taclet appvar
- the schema variable to be instantiatedservices
- pointer to services objectundoAnchor
- node to be used as undo anchorpreviousProposals
- a list of other proposals which should be taken
into account (e.g. for name uniqueness), or nullpublic Name getNewName(Services services, Name baseName)
private java.lang.String getNameProposalForSkolemTermVariable(TacletApp p_app, SchemaVariable p_var, Services services, Node undoAnchor, ImmutableList<java.lang.String> previousProposals)
protected static java.lang.String createBaseNameProposalBasedOnCorrespondence(TacletApp p_app, SchemaVariable p_var, Services services)
p_var
, based on the result
of Taclet.getNameCorrespondent
private java.lang.String getNameProposalForSkolemTermVariable(java.lang.String name, Services services, Node undoAnchor, ImmutableList<java.lang.String> previousProposals)
public java.lang.String getNameProposal(java.lang.String basename, Services services, Node undoAnchor)
private java.lang.String getNameProposalForVariableSV(TacletApp app, SchemaVariable var, TermServices services, ImmutableList<java.lang.String> previousProposals)
private java.lang.String getNameProposalForLabel(TacletApp app, SchemaVariable var, Services services, Node undoAnchor, ImmutableList<java.lang.String> previousProposals)
previousProposals
-