Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
5b54ebb0
Commit
5b54ebb0
authored
1 year ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[ivette/wp] view labels & titles
parent
a69df239
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
ivette/src/frama-c/plugins/wp/index.tsx
+12
-10
12 additions, 10 deletions
ivette/src/frama-c/plugins/wp/index.tsx
ivette/src/frama-c/plugins/wp/tip.tsx
+6
-5
6 additions, 5 deletions
ivette/src/frama-c/plugins/wp/tip.tsx
with
18 additions
and
15 deletions
ivette/src/frama-c/plugins/wp/index.tsx
+
12
−
10
View file @
5b54ebb0
...
...
@@ -47,17 +47,19 @@ type Goal = WP.goal | undefined;
function
WPGoals
():
JSX
.
Element
{
const
[
scoped
,
flipScoped
]
=
Dome
.
useFlipSettings
(
'
frama-c.wp.goals.scoped
'
);
const
[
failed
,
flipFailed
]
=
Dome
.
useFlipSettings
(
'
frama-c.wp.goals.failed
'
);
const
[
displayT
ip
,
setTip
]
=
React
.
useState
(
false
);
const
[
t
ip
,
setTip
]
=
React
.
useState
(
false
);
const
[
current
,
setCurrent
]
=
React
.
useState
<
Goal
>
(
undefined
);
Server
.
useShutdown
(()
=>
{
setTip
(
false
);
setCurrent
(
undefined
);
});
const
scope
=
States
.
useCurrentScope
();
const
[
goals
,
setGoals
]
=
React
.
useState
(
0
);
const
[
total
,
setTotal
]
=
React
.
useState
(
0
);
const
hasGoals
=
total
>
0
;
const
hasSelection
=
current
!==
WP
.
goalDefault
;
return
(
<>
<
Ivette
.
TitleBar
>
<
Ivette
.
TitleBar
label
=
{
tip
?
'
WP — TIP
'
:
'
WP — Goals
'
}
title
=
{
tip
?
'
Interactive Proof Transformer
'
:
'
Generated Goals
'
}
>
<
Label
display
=
{
goals
<
total
}
>
{
goals
}
/
{
total
}
</
Label
>
...
...
@@ -73,14 +75,14 @@ function WPGoals(): JSX.Element {
selected
=
{
failed
}
onClick
=
{
flipFailed
}
/>
<
IconButton
icon
=
{
displayT
ip
?
'
ITEMS.LIST
'
:
'
MEDIA.PLAY
'
}
kind
=
{
displayT
ip
?
'
warning
'
:
'
positive
'
}
title
=
'Goal Resolution'
enabled
=
{
hasSelection
}
onClick
=
{
()
=>
setTip
(
!
displayT
ip
)
}
/>
icon
=
{
t
ip
?
'
ITEMS.LIST
'
:
'
MEDIA.PLAY
'
}
kind
=
{
t
ip
?
'
warning
'
:
'
positive
'
}
title
=
{
tip
?
'
Back to Goals
'
:
'
Interactive Proof Transformer
'
}
enabled
=
{
!!
current
}
onClick
=
{
()
=>
setTip
(
!
t
ip
)
}
/>
</
Ivette
.
TitleBar
>
<
GoalTable
display
=
{
!
displayT
ip
}
display
=
{
!
t
ip
}
scope
=
{
scope
}
failed
=
{
failed
}
current
=
{
current
}
...
...
@@ -90,7 +92,7 @@ function WPGoals(): JSX.Element {
setTotal
=
{
setTotal
}
/>
<
TIPView
display
=
{
displayT
ip
}
display
=
{
t
ip
}
goal
=
{
current
}
/>
</>
);
...
...
This diff is collapsed.
Click to expand it.
ivette/src/frama-c/plugins/wp/tip.tsx
+
6
−
5
View file @
5b54ebb0
...
...
@@ -22,7 +22,8 @@
import
React
from
'
react
'
;
import
{
Cell
}
from
'
dome/controls/labels
'
;
import
{
Vfill
,
Hbox
}
from
'
dome/layout/boxes
'
;
import
{
ToolBar
}
from
'
dome/frame/toolbars
'
;
import
{
Vfill
}
from
'
dome/layout/boxes
'
;
import
{
MarkDecoration
,
Decorations
,
TextView
}
from
'
dome/text/richtext
'
;
import
*
as
States
from
'
frama-c/states
'
;
import
*
as
RichText
from
'
frama-c/richtext
'
;
...
...
@@ -145,16 +146,16 @@ export function TIPView(props: TIPProps): JSX.Element {
const
{
current
,
index
,
pending
}
=
useProofState
(
goal
);
return
(
<
Vfill
display
=
{
display
}
>
<
Hbox
>
<
ToolBar
>
<
Cell
icon
=
'HOME'
label
=
{
infos
.
wpo
}
title
=
'Goal identifier'
/>
<
Cell
icon
=
'CODE'
display
=
{
0
<=
index
&&
index
<
pending
}
label
=
{
`
${
index
}
/
${
pending
}
`
}
title
=
'Pending proof nodes'
/>
display
=
{
0
<=
index
&&
index
<
pending
&&
1
<
pending
}
label
=
{
`
${
index
+
1
}
/
${
pending
}
`
}
title
=
'Pending proof nodes'
/>
<
Cell
{
...
getStatus
(
infos
)
}
/>
</
Hbox
>
</
ToolBar
>
<
GoalView
node
=
{
current
}
/>
</
Vfill
>
);
...
...
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