Skip to content

Commit

Permalink
made the tree visualisers a little less shouty
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcondon committed Aug 2, 2024
1 parent 561d45e commit 40b5a49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
{
var childNodeLabel = childNodeKey switch
{
DiscriminationTreeConstantNodeKey constantNodeKey => $"FUNCTION: {constantNodeKey.Identifier} (ARITY {constantNodeKey.ChildElementCount})",
DiscriminationTreeFunctionNodeKey functionNodeKey => $"FUNCTION: {functionNodeKey.Identifier} (ARITY {functionNodeKey.ChildElementCount})",
DiscriminationTreeVariableNodeKey variableNodeKey => $"VARIABLE: {variableNodeKey.Ordinal}",
DiscriminationTreeConstantNodeKey constantNodeKey => $"function: {constantNodeKey.Identifier} (arity {constantNodeKey.ChildElementCount})",
DiscriminationTreeFunctionNodeKey functionNodeKey => $"function: {functionNodeKey.Identifier} (arity {functionNodeKey.ChildElementCount})",
DiscriminationTreeVariableNodeKey variableNodeKey => $"variable: #{variableNodeKey.Ordinal}",
_ => throw new ArgumentException(nameof(node))
};

Expand All @@ -85,7 +85,7 @@
try
{
value = node.Value;
<li>VALUE: @value</li>
<li>value: @value</li>
}
catch
{
Expand All @@ -99,14 +99,14 @@

<ul class="mt-4">
@{
RenderDiscriminationTreeNode("ROOT", discriminationTreeRootNode);
RenderDiscriminationTreeNode("(root node)", discriminationTreeRootNode);
}
</ul>

@code {
private DiscriminationTreeDictionaryNode<Term> discriminationTreeRootNode;
private DiscriminationTree discriminationTree;
private FormData formData = new FormData("u, v, w, x, y, z", "");
private FormData formData = new FormData("u, v, w, x, y, z", string.Empty);

public DiscriminationTreeVisualiser()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
{
var childNodeLabel = childNodeKey switch
{
PathTreeConstantNodeKey constantNodeKey => $"FUNCTION: {constantNodeKey.Identifier} (ARITY {constantNodeKey.ChildElementCount})",
PathTreeFunctionNodeKey functionNodeKey => $"FUNCTION: {functionNodeKey.Identifier} (ARITY {functionNodeKey.ChildElementCount})",
PathTreeVariableNodeKey variableNodeKey => $"VARIABLE: {variableNodeKey.Ordinal}",
PathTreeConstantNodeKey constantNodeKey => $"function: {constantNodeKey.Identifier} (arity {constantNodeKey.ChildElementCount})",
PathTreeFunctionNodeKey functionNodeKey => $"function: {functionNodeKey.Identifier} (arity {functionNodeKey.ChildElementCount})",
PathTreeVariableNodeKey variableNodeKey => $"variable: #{variableNodeKey.Ordinal}",
_ => throw new ArgumentException(nameof(node))
};

Expand All @@ -92,14 +92,14 @@
{
for (int i = 0; i < node.Children.Count; i++)
{
RenderPathTreeParameterNode($"ARG {i}", node.Children[i]);
RenderPathTreeParameterNode($"argument #{i}", node.Children[i]);
}
}
else
{
foreach (var (key, value) in node.Values)
{
<li>VALUE: @value</li>
<li>value: @value</li>
}
}
</ul>
Expand All @@ -109,14 +109,14 @@

<ul class="mt-4">
@{
RenderPathTreeParameterNode("ROOT", pathTreeRootNode);
RenderPathTreeParameterNode("(root node)", pathTreeRootNode);
}
</ul>

@code {
private PathTreeDictionaryNode<Term> pathTreeRootNode;
private PathTree pathTree;
private FormData formData = new FormData("u, v, w, x, y, z", "");
private FormData formData = new FormData("u, v, w, x, y, z", string.Empty);

public PathTreeVisualiser()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public static IEnumerable<Term> FindNormalisationTerms(params CNFClause[] clause

/// <summary>
/// Returns an enumerable of all of the Terms created by the normalisation process (as opposed to featuring in the original sentences).
/// That is, standardised variables and Skolem functions. Intended to be useful in creating a "legend" of such terms.
/// That is, standardised variables (whose identifier is a <see cref="StandardisedVariableIdentifier"/> instance) and Skolem functions
/// (whose identifier is a <see cref="SkolemFunctionIdentifier"/> instance). Intended to be useful in creating a "legend" of such terms.
/// </summary>
/// <returns>An enumerable of the (distinct) standardised variable references and Skolem functions found within the clauses.</returns>
public static IEnumerable<Term> FindNormalisationTerms(IEnumerable<Predicate> predicates)
Expand Down

0 comments on commit 40b5a49

Please sign in to comment.