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
3d5bdd07
Commit
3d5bdd07
authored
3 years ago
by
Maxime Jacquemin
Committed by
Maxime Jacquemin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[ivette] Handling unique callstack
parent
50ae0edf
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/eva/style.css
+9
-6
9 additions, 6 deletions
ivette/src/frama-c/plugins/eva/style.css
ivette/src/frama-c/plugins/eva/valuetable.tsx
+16
-14
16 additions, 14 deletions
ivette/src/frama-c/plugins/eva/valuetable.tsx
with
25 additions
and
20 deletions
ivette/src/frama-c/plugins/eva/style.css
+
9
−
6
View file @
3d5bdd07
...
...
@@ -106,9 +106,7 @@
.eva-stmt
{
color
:
var
(
--info-text
);
text-select
:
none
;
font-weight
:
normal
;
margin-left
:
0.2em
;
}
/* -------------------------------------------------------------------------- */
...
...
@@ -161,10 +159,6 @@
background-color
:
var
(
--background-alterning-even
);
}
.eva-table
tr
:nth-child
(
3
)
{
font-style
:
italic
;
}
.eva-table-alarm
{
border-bottom
:
thin
solid
var
(
--border
);
}
...
...
@@ -195,6 +189,15 @@
background
:
var
(
--eva-probes-pinned-focused
);
}
.eva-header-after-both
{
display
:
flex
;
justify-content
:
center
;
}
.eva-italic
{
font-style
:
italic
;
}
/* -------------------------------------------------------------------------- */
/* --- Table Callsite Boxes --- */
/* -------------------------------------------------------------------------- */
...
...
This diff is collapsed.
Click to expand it.
ivette/src/frama-c/plugins/eva/valuetable.tsx
+
16
−
14
View file @
3d5bdd07
...
...
@@ -381,9 +381,9 @@ function ProbeDescr(props: ProbeDescrProps): JSX.Element[] {
}
const
both
=
():
JSX
.
Element
=>
<
div
style
=
{
{
display
:
'
flex
'
,
justifyContent
:
'
center
'
}
}
>
<
div
className
=
'eva-header-after-both'
>
{
'
After
'
}
<
div
style
=
{
{
color
:
'
var(--info-text)
'
}
}
>
{
'
(Then|Else)
'
}
</
div
>
<
div
className
=
'eva-stmt'
>
{
'
(Then|Else)
'
}
</
div
>
</
div
>;
const
elements
:
JSX
.
Element
[]
=
[];
...
...
@@ -411,12 +411,13 @@ interface ProbeValuesProps {
status
:
MarkerStatus
;
state
:
StateToDisplay
;
addLoc
:
(
loc
:
Location
)
=>
void
;
selectedClass
?:
string
;
isSelected
:
boolean
;
summaryOnly
:
boolean
;
// selectedClass?: string;
}
function
ProbeValues
(
props
:
ProbeValuesProps
):
Request
<
callstack
,
JSX
.
Element
>
{
const
{
probe
,
summary
,
state
,
selectedClass
=
''
,
addLoc
}
=
props
;
const
className
=
classes
(
'
eva-table-values
'
,
selectedClass
);
const
{
probe
,
summary
,
state
,
addLoc
,
isSelected
,
summaryOnly
}
=
props
;
const
summaryStatus
=
getAlarmStatus
(
summary
.
vBefore
?.
alarms
);
// Building common parts
...
...
@@ -439,6 +440,9 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
return
async
(
callstack
:
callstack
):
Promise
<
JSX
.
Element
>
=>
{
const
evaluation
=
await
probe
.
evaluate
(
callstack
);
const
{
vBefore
,
vAfter
,
vThen
,
vElse
}
=
evaluation
;
const
selected
=
isSelected
&&
callstack
!==
'
Summary
'
?
'
eva-focused
'
:
''
;
const
font
=
summaryOnly
&&
callstack
===
'
Summary
'
?
'
eva-italic
'
:
''
;
const
className
=
classes
(
'
eva-table-values
'
,
selected
,
font
);
function
td
(
e
:
Values
.
evaluation
):
JSX
.
Element
{
const
status
=
getAlarmStatus
(
e
.
alarms
);
const
alarmClass
=
classes
(
'
eva-cell-alarms
'
,
`eva-alarm-
${
status
}
`
);
...
...
@@ -447,15 +451,13 @@ function ProbeValues(props: ProbeValuesProps): Request<callstack, JSX.Element> {
const
align
=
e
.
value
.
includes
(
'
\n
'
)
?
'
left
'
:
'
center
'
;
const
alignClass
=
`eva-table-values-
${
align
}
`
;
const
width
=
summaryStatus
!==
'
none
'
?
'
eva-table-values-alarms
'
:
''
;
const
c
=
classes
(
className
,
alignClass
,
width
);
return
(
<>
<
td
className
=
{
classes
(
className
,
alignClass
,
width
)
}
onContextMenu
=
{
onContextMenu
(
e
)
}
>
<
td
className
=
{
c
}
onContextMenu
=
{
onContextMenu
(
e
)
}
>
<
span
>
{
e
.
value
}
</
span
>
</
td
>
<
td
className
=
{
classes
(
'
eva-table-alarm
'
,
selected
Class
)
}
>
<
td
className
=
{
classes
(
'
eva-table-alarm
'
,
selected
)
}
>
<
Icon
className
=
{
alarmClass
}
size
=
{
10
}
title
=
{
title
}
id
=
"WARNING"
/>
</
td
>
</>
...
...
@@ -509,8 +511,9 @@ async function FunctionSection(props: FunctionProps): Promise<JSX.Element> {
/* Compute relevant callstacks */
const
markers
=
Array
.
from
(
props
.
markers
.
keys
());
const
callstacks
=
byCallstacks
?
(
await
getCS
(
markers
)
??
[])
:
[];
const
summaryOnly
=
callstacks
.
length
===
1
;
interface
Data
{
probe
:
Probe
;
summary
:
Evaluation
;
status
:
MarkerStatus
}
;
interface
Data
{
probe
:
Probe
;
summary
:
Evaluation
;
status
:
MarkerStatus
}
const
entries
=
Array
.
from
(
props
.
markers
.
entries
());
const
probes
=
await
Promise
.
all
(
entries
.
map
(
async
([
target
,
status
])
=>
{
const
probe
=
await
props
.
getProbe
({
target
,
fct
});
...
...
@@ -532,15 +535,14 @@ async function FunctionSection(props: FunctionProps): Promise<JSX.Element> {
const
onClick
=
(
c
:
callstack
):
()
=>
void
=>
()
=>
props
.
selectCallstack
(
c
);
function
build
(
d
:
Data
,
c
:
callstack
):
Promise
<
JSX
.
Element
>
{
const
isSelected
=
isSelectedCallstack
(
c
);
const
selector
=
isSelected
&&
c
!==
'
Summary
'
;
const
selectedClass
=
selector
?
'
eva-focused
'
:
''
;
const
valuesProps
=
{
...
d
,
state
,
addLoc
,
selectedClass
};
const
valuesProps
=
{
...
d
,
state
,
addLoc
,
isSelected
,
summaryOnly
};
return
ProbeValues
(
valuesProps
)(
c
);
}
const
summary
=
await
Promise
.
all
(
probes
.
map
((
d
)
=>
build
(
d
,
'
Summary
'
)));
const
summCall
=
await
CallsiteCell
({
callstack
:
'
Summary
'
,
getCallsites
});
const
values
=
await
Promise
.
all
(
callstacks
.
map
(
async
(
callstack
,
n
)
=>
{
if
(
summaryOnly
)
return
<></>;
const
isSelected
=
isSelectedCallstack
(
callstack
);
const
selector
=
isSelected
&&
callstack
!==
'
Summary
'
;
const
selectedClass
=
selector
?
'
eva-focused
'
:
''
;
...
...
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