Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Proof Assistant with Solver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zhang, Jenny
Proof Assistant with Solver
Commits
968832f4
Commit
968832f4
authored
9 months ago
by
Jenny Zhang
Browse files
Options
Downloads
Patches
Plain Diff
recover generateProofTreeHTML function in sequentAst.js for possible future functionality
parent
e16bd46f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/App.vue
+0
-1
0 additions, 1 deletion
src/App.vue
src/utils/sequentAst.js
+29
-0
29 additions, 0 deletions
src/utils/sequentAst.js
with
29 additions
and
1 deletion
src/App.vue
+
0
−
1
View file @
968832f4
...
@@ -173,7 +173,6 @@ export default {
...
@@ -173,7 +173,6 @@ export default {
handleSubmitAnswer
(
input
)
{
handleSubmitAnswer
(
input
)
{
const
topsStrings
=
input
.
standardAnswer
;
const
topsStrings
=
input
.
standardAnswer
;
const
rule
=
this
.
ruleToLatex
(
input
.
rule
);
const
rule
=
this
.
ruleToLatex
(
input
.
rule
);
...
...
This diff is collapsed.
Click to expand it.
src/utils/sequentAst.js
+
29
−
0
View file @
968832f4
...
@@ -37,6 +37,34 @@ function generateNodeHTML(node) {
...
@@ -37,6 +37,34 @@ function generateNodeHTML(node) {
}
}
// top is empty list
function
generateProofTreeHTML
(
node
)
{
if
(
!
node
)
return
''
;
// Generate a unique id
const
uniqueId
=
`tops-
${
nodeIdCounter
++
}
`
;
// Generate HTML for the current node
let
html
=
`<div class="node" original-input-string="
${
node
.
bottomString
}
">`
;
html
+=
`<div class="topsLatex" id="
${
uniqueId
}
">`
;
// If the node has a rule, display the rule, the bar and the children nodes
if
(
node
.
rule
)
{
// Recursively process prerequisite nodes
node
.
topsLatex
.
forEach
(
childNode
=>
{
html
+=
generateProofTreeHTML
(
childNode
);
});
html
+=
`<div class="bar"><div class="rule">
\\
(
${
node
.
rule
}
\\
)</div></div>`
;
}
html
+=
'
</div>
'
;
html
+=
`<div class="bottomLatex"><span class="math">
\\
(
${
node
.
bottomLatex
}
\\
)</span></div>`
;
}
...
@@ -70,5 +98,6 @@ module.exports = {
...
@@ -70,5 +98,6 @@ module.exports = {
isSequentNode
,
isSequentNode
,
linkSequentNode
,
linkSequentNode
,
generateNodeHTML
,
generateNodeHTML
,
generateProofTreeHTML
,
addRule
,
addRule
,
};
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment