mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-09 19:00:48 +00:00
Display inference tree in view
This commit is contained in:
parent
7bf691a693
commit
0d3d806e9c
@ -57,7 +57,7 @@ public class LatexCreator implements StepVisitor, TermVisitor, TypeVisitor {
|
||||
|
||||
|
||||
|
||||
|
||||
private final TypeInfererInterface typeInferer;
|
||||
private final StringBuilder tree;
|
||||
private final boolean stepLabels;
|
||||
|
||||
@ -81,18 +81,18 @@ public class LatexCreator implements StepVisitor, TermVisitor, TypeVisitor {
|
||||
}
|
||||
|
||||
protected LatexCreator(TypeInfererInterface typeInferer, boolean stepLabels) {
|
||||
this.typeInferer = typeInferer;
|
||||
this.tree = new StringBuilder();
|
||||
this.stepLabels = stepLabels;
|
||||
|
||||
// typeInferer.getFirstInferenceStep().accept(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the LaTeX-code for the proof tree
|
||||
*/
|
||||
protected String getTree() {
|
||||
return "the $\\LaTeX$ inference tree should be here ";
|
||||
} // todo implement
|
||||
typeInferer.getFirstInferenceStep().accept(this);
|
||||
return TREE_BEGIN + tree.toString() + TREE_END;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the LaTeX-code for constraints nad unification
|
||||
|
@ -21,9 +21,9 @@ public class TypeInferenceView extends VerticalLayout
|
||||
|
||||
private MathjaxUnification unification;
|
||||
private MathjaxProofTree tree;
|
||||
private TypeInfererInterface typeInferer;
|
||||
private Div content;
|
||||
private ControlPanel controlPanel;
|
||||
private final transient TypeInfererInterface typeInferer;
|
||||
private final Div content;
|
||||
private final ControlPanel controlPanel;
|
||||
|
||||
public TypeInferenceView() {
|
||||
typeInferer = ComponentUtil.getData(UI.getCurrent(), TypeInfererInterface.class);
|
||||
|
@ -1,9 +1,7 @@
|
||||
/**
|
||||
* This package contains the needed classes for displaying the type inference algorithm step-by-step.
|
||||
*/
|
||||
@NonNullFields
|
||||
@NonNullApi
|
||||
package edu.kit.typicalc.view.content.typeinferencecontent;
|
||||
|
||||
import org.springframework.lang.NonNullApi;
|
||||
import org.springframework.lang.NonNullFields;
|
||||
import org.springframework.lang.NonNullApi;
|
Loading…
Reference in New Issue
Block a user