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
f1292d76
Commit
f1292d76
authored
3 years ago
by
Maxime Jacquemin
Committed by
Maxime Jacquemin
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] Some fixes
parent
c0e377bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ivette/src/frama-c/plugins/eva/style.css
+21
-13
21 additions, 13 deletions
ivette/src/frama-c/plugins/eva/style.css
ivette/src/frama-c/plugins/eva/valuetable.tsx
+14
-14
14 additions, 14 deletions
ivette/src/frama-c/plugins/eva/valuetable.tsx
with
35 additions
and
27 deletions
ivette/src/frama-c/plugins/eva/style.css
+
21
−
13
View file @
f1292d76
/* -------------------------------------------------------------------------- */
/* --- General CSS --- */
/* -------------------------------------------------------------------------- */
.eva-focused
{
background
:
var
(
--code-select
);
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* --- Probe Panel --- */
/* --- Probe Panel --- */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
...
@@ -91,13 +83,14 @@
...
@@ -91,13 +83,14 @@
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
.eva-cell-alarms
{
.eva-cell-alarms
{
fill
:
orang
e
;
position
:
relativ
e
;
position
:
absolute
;
float
:
right
;
z-index
:
+
1
;
z-index
:
1
;
margin
:
0px
;
margin
:
0px
;
padding
:
0px
;
padding
:
0px
;
right
:
3px
;
right
:
3px
;
margin-left
:
4px
;
margin-left
:
4px
;
padding-left
:
4px
;
}
}
.eva-alarm-info
{
.eva-alarm-info
{
...
@@ -106,7 +99,7 @@
...
@@ -106,7 +99,7 @@
margin
:
1px
;
margin
:
1px
;
}
}
.eva-alarm-none
{
display
:
none
;
}
.eva-alarm-none
{
fill
:
transparent
;
}
.eva-alarm-True
{
fill
:
var
(
--eva-alarms-true
);
}
.eva-alarm-True
{
fill
:
var
(
--eva-alarms-true
);
}
.eva-alarm-False
{
fill
:
var
(
--eva-alarms-false
);
}
.eva-alarm-False
{
fill
:
var
(
--eva-alarms-false
);
}
.eva-alarm-Unknown
{
fill
:
var
(
--eva-alarms-unknown
);
}
.eva-alarm-Unknown
{
fill
:
var
(
--eva-alarms-unknown
);
}
...
@@ -205,13 +198,13 @@
...
@@ -205,13 +198,13 @@
.eva-table-callsite-box
{
.eva-table-callsite-box
{
width
:
18px
;
width
:
18px
;
min-width
:
18px
;
min-width
:
18px
;
max-width
:
18px
;
background
:
var
(
--background
);
background
:
var
(
--background
);
border
:
0px
;
border
:
0px
;
text-align
:
center
;
text-align
:
center
;
color
:
var
(
--info-text
);
color
:
var
(
--info-text
);
border-left
:
thin
solid
var
(
--border
);
border-left
:
thin
solid
var
(
--border
);
border-bottom
:
thin
solid
var
(
--border
);
border-bottom
:
thin
solid
var
(
--border
);
padding
:
2px
;
}
}
tr
:first-of-type
>
.eva-table-callsite-box
{
tr
:first-of-type
>
.eva-table-callsite-box
{
...
@@ -223,6 +216,7 @@ tr:first-of-type > .eva-table-callsite-box {
...
@@ -223,6 +216,7 @@ tr:first-of-type > .eva-table-callsite-box {
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
.eva-table-values
{
.eva-table-values
{
position
:
relative
;
border
:
0px
;
border
:
0px
;
padding
:
2px
3px
2px
3px
;
padding
:
2px
3px
2px
3px
;
border-left
:
thin
solid
var
(
--border
);
border-left
:
thin
solid
var
(
--border
);
...
@@ -234,6 +228,20 @@ tr:first-of-type > .eva-table-callsite-box {
...
@@ -234,6 +228,20 @@ tr:first-of-type > .eva-table-callsite-box {
height
:
22px
;
height
:
22px
;
min-height
:
22px
;
min-height
:
22px
;
max-height
:
22px
;
max-height
:
22px
;
white-space
:
break-spaces
;
}
.eva-values-position
{
padding-left
:
19px
;
padding-right
:
2px
;
}
/* -------------------------------------------------------------------------- */
/* --- Selected Element Background --- */
/* -------------------------------------------------------------------------- */
.eva-focused
{
background
:
var
(
--code-select
);
}
}
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
This diff is collapsed.
Click to expand it.
ivette/src/frama-c/plugins/eva/valuetable.tsx
+
14
−
14
View file @
f1292d76
...
@@ -92,6 +92,7 @@ function useCallsitesCache(): Request<callstack, Callsite[]> {
...
@@ -92,6 +92,7 @@ function useCallsitesCache(): Request<callstack, Callsite[]> {
interface
CallsiteCellProps
{
interface
CallsiteCellProps
{
callstack
:
callstack
|
'
Header
'
;
callstack
:
callstack
|
'
Header
'
;
index
?:
number
;
getCallsites
:
Request
<
callstack
,
Callsite
[]
>
;
getCallsites
:
Request
<
callstack
,
Callsite
[]
>
;
selectedClass
?:
string
;
selectedClass
?:
string
;
}
}
...
@@ -104,7 +105,7 @@ function makeStackTitle(calls: Callsite[]): string {
...
@@ -104,7 +105,7 @@ function makeStackTitle(calls: Callsite[]): string {
}
}
async
function
CallsiteCell
(
props
:
CallsiteCellProps
):
Promise
<
JSX
.
Element
>
{
async
function
CallsiteCell
(
props
:
CallsiteCellProps
):
Promise
<
JSX
.
Element
>
{
const
{
callstack
:
c
,
getCallsites
,
selectedClass
=
''
}
=
props
;
const
{
callstack
:
c
,
index
,
getCallsites
,
selectedClass
=
''
}
=
props
;
const
callClass
=
classes
(
'
eva-table-callsite-box
'
,
selectedClass
);
const
callClass
=
classes
(
'
eva-table-callsite-box
'
,
selectedClass
);
const
callsites
=
c
!==
'
Header
'
?
await
getCallsites
(
c
)
:
[];
const
callsites
=
c
!==
'
Header
'
?
await
getCallsites
(
c
)
:
[];
const
infos
=
const
infos
=
...
@@ -112,7 +113,7 @@ async function CallsiteCell(props: CallsiteCellProps): Promise<JSX.Element> {
...
@@ -112,7 +113,7 @@ async function CallsiteCell(props: CallsiteCellProps): Promise<JSX.Element> {
c
===
'
Summary
'
?
'
Summary
'
:
makeStackTitle
(
callsites
);
c
===
'
Summary
'
?
'
Summary
'
:
makeStackTitle
(
callsites
);
return
(
return
(
<
td
className
=
{
callClass
}
title
=
{
infos
}
>
<
td
className
=
{
callClass
}
title
=
{
infos
}
>
{
c
===
'
Header
'
?
'
#
'
:
c
===
'
Summary
'
?
'
∑
'
:
c
}
{
c
===
'
Header
'
?
'
#
'
:
c
===
'
Summary
'
?
'
∑
'
:
index
}
</
td
>
</
td
>
);
);
}
}
...
@@ -395,7 +396,7 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
...
@@ -395,7 +396,7 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
return
async
(
callstack
:
callstack
):
Promise
<
JSX
.
Element
>
=>
{
return
async
(
callstack
:
callstack
):
Promise
<
JSX
.
Element
>
=>
{
const
evaluation
=
await
probe
.
evaluate
(
callstack
);
const
evaluation
=
await
probe
.
evaluate
(
callstack
);
const
{
vBefore
,
vAfter
,
vThen
,
vElse
}
=
evaluation
;
const
{
vBefore
,
vAfter
,
vThen
,
vElse
}
=
evaluation
;
function
td
(
e
:
Values
.
evaluation
,
state
:
string
):
JSX
.
Element
{
function
td
(
e
:
Values
.
evaluation
):
JSX
.
Element
{
const
status
=
getAlarmStatus
(
e
.
alarms
);
const
status
=
getAlarmStatus
(
e
.
alarms
);
const
alarmClass
=
classes
(
'
eva-cell-alarms
'
,
`eva-alarm-
${
status
}
`
);
const
alarmClass
=
classes
(
'
eva-cell-alarms
'
,
`eva-alarm-
${
status
}
`
);
const
kind
=
callstack
===
'
Summary
'
?
'
one
'
:
'
this
'
;
const
kind
=
callstack
===
'
Summary
'
?
'
one
'
:
'
this
'
;
...
@@ -405,21 +406,19 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
...
@@ -405,21 +406,19 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
className
=
{
className
}
className
=
{
className
}
onContextMenu
=
{
onContextMenu
(
e
)
}
onContextMenu
=
{
onContextMenu
(
e
)
}
>
>
<
div
style
=
{
{
position
:
'
relative
'
}
}
>
<
span
className
=
{
'
eva-values-position
'
}
>
{
e
.
value
}
</
span
>
<
span
className
=
{
`eva-state-
${
state
}
`
}
>
{
e
.
value
}
</
span
>
<
Icon
className
=
{
alarmClass
}
size
=
{
10
}
title
=
{
title
}
id
=
"WARNING"
/>
<
Icon
className
=
{
alarmClass
}
size
=
{
10
}
title
=
{
title
}
id
=
"WARNING"
/>
</
div
>
</
td
>
</
td
>
);
);
}
}
if
(
state
===
'
Before
'
&&
vBefore
)
return
td
(
vBefore
,
'
Before
'
);
if
(
state
===
'
Before
'
&&
vBefore
)
return
td
(
vBefore
);
if
(
state
===
'
After
'
&&
vAfter
)
return
td
(
vAfter
,
'
After
'
);
if
(
state
===
'
After
'
&&
vAfter
)
return
td
(
vAfter
);
if
(
state
===
'
After
'
&&
vThen
&&
vElse
)
if
(
state
===
'
After
'
&&
vThen
&&
vElse
)
return
<>
{
td
(
vThen
,
'
Then
'
)
}{
td
(
vElse
,
'
Else
'
)
}
</>;
return
<>
{
td
(
vThen
)
}{
td
(
vElse
)
}
</>;
if
(
state
===
'
Both
'
&&
vBefore
&&
vAfter
)
if
(
state
===
'
Both
'
&&
vBefore
&&
vAfter
)
return
<>
{
td
(
vBefore
,
'
Before
'
)
}{
td
(
vAfter
,
'
After
'
)
}
</>;
return
<>
{
td
(
vBefore
)
}{
td
(
vAfter
)
}
</>;
if
(
state
===
'
Both
'
&&
vBefore
&&
vThen
&&
vElse
)
if
(
state
===
'
Both
'
&&
vBefore
&&
vThen
&&
vElse
)
return
<>
{
td
(
vBefore
,
'
Before
'
)
}{
td
(
vThen
,
'
Then
'
)
}{
td
(
vElse
,
'
Else
'
)
}
</>;
return
<>
{
td
(
vBefore
)
}{
td
(
vThen
)
}{
td
(
vElse
)
}
</>;
return
<></>;
return
<></>;
};
};
}
}
...
@@ -476,11 +475,12 @@ async function FunctionSection(props: FunctionProps): Promise<JSX.Element> {
...
@@ -476,11 +475,12 @@ async function FunctionSection(props: FunctionProps): Promise<JSX.Element> {
return
ProbeHeader
({
probe
,
status
,
state
,
...
fcts
});
return
ProbeHeader
({
probe
,
status
,
state
,
...
fcts
});
}));
}));
const
values
=
await
Promise
.
all
(
callstacks
.
map
(
async
(
callstack
)
=>
{
const
values
=
await
Promise
.
all
(
callstacks
.
map
(
async
(
callstack
,
index
)
=>
{
const
isSelected
=
isSelectedCallstack
(
callstack
);
const
isSelected
=
isSelectedCallstack
(
callstack
);
const
selector
=
isSelected
&&
callstack
!==
'
Summary
'
;
const
selector
=
isSelected
&&
callstack
!==
'
Summary
'
;
const
selectedClass
=
selector
?
'
eva-focused
'
:
''
;
const
selectedClass
=
selector
?
'
eva-focused
'
:
''
;
const
call
=
await
CallsiteCell
({
selectedClass
,
getCallsites
,
callstack
});
const
callProps
=
{
selectedClass
,
getCallsites
};
const
call
=
await
CallsiteCell
({
index
,
callstack
,
...
callProps
});
const
onClick
=
():
void
=>
props
.
selectCallstack
(
callstack
);
const
onClick
=
():
void
=>
props
.
selectCallstack
(
callstack
);
const
vs
=
await
Promise
.
all
(
probes
.
map
(
async
([
promise
,
status
])
=>
{
const
vs
=
await
Promise
.
all
(
probes
.
map
(
async
([
promise
,
status
])
=>
{
const
probe
=
await
promise
;
const
probe
=
await
promise
;
...
...
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