Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WSymb
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
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OTAWA-plugins
WSymb
Commits
12118089
Commit
12118089
authored
5 years ago
by
Forget Julien
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.cristal.univ-lille.fr:otawa-plugins/cftreeextractor
parents
9486da73
12ddaf5d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
PWCET.c
+23
-0
23 additions, 0 deletions
PWCET.c
include/PWCET.h
+1
-0
1 addition, 0 deletions
include/PWCET.h
pwcet/include/pwcet-runtime.h
+3
-1
3 additions, 1 deletion
pwcet/include/pwcet-runtime.h
with
27 additions
and
1 deletion
PWCET.c
+
23
−
0
View file @
12118089
...
...
@@ -72,6 +72,16 @@ void compute_node(evalctx_t * ctx, formula_t * f)
awcet_ann
(
ctx
,
&
f
->
children
->
aw
,
f
);
#ifdef DEBUG
printf
(
"compute_node: end processing ANN node
\n
"
);
#endif
break
;
case
KIND_INTMULT
:
#ifdef DEBUG
printf
(
"compute_node: start processing INTMULT node
\n
"
);
#endif
compute_node
(
ctx
,
&
f
->
children
[
0
]);
awcet_intmult
(
ctx
,
&
f
->
children
->
aw
,
f
);
#ifdef DEBUG
printf
(
"compute_node: end processing ANN node
\n
"
);
#endif
break
;
case
KIND_AWCET
:
...
...
@@ -236,6 +246,15 @@ void awcet_loop(evalctx_t * ctx, awcet_t * source, formula_t * dest)
}
}
void
awcet_intmult
(
evalctx_t
*
ctx
,
awcet_t
*
source
,
formula_t
*
dest
)
{
int
i
;
(
void
)(
ctx
);
for
(
i
=
0
;
i
<
source
->
eta_count
;
i
++
)
{
dest
->
aw
.
eta
[
i
]
=
source
->
eta
[
i
]
*
dest
->
opdata
.
coef
;
}
dest
->
aw
.
others
=
source
->
others
*
dest
->
opdata
.
coef
;
}
void
awcet_ann
(
evalctx_t
*
ctx
,
awcet_t
*
source
,
formula_t
*
dest
)
{
...
...
@@ -314,6 +333,10 @@ long long evaluate(formula_t *f, loopinfo_t *li, param_valuation_t pv, void *dat
void
compute_eta_count
(
formula_t
*
f
)
{
switch
(
f
->
kind
)
{
case
KIND_INTMULT
:
compute_eta_count
(
f
->
children
);
f
->
aw
.
eta_count
=
f
->
children
[
0
].
aw
.
eta_count
;
break
;
case
KIND_ANN
:
compute_eta_count
(
f
->
children
);
f
->
aw
.
eta_count
=
f
->
opdata
.
ann
.
count
;
...
...
This diff is collapsed.
Click to expand it.
include/PWCET.h
+
1
−
0
View file @
12118089
...
...
@@ -44,6 +44,7 @@ void awcet_alt(evalctx_t * ctx, int source_count, formula_t * source,
awcet_t
*
dest
);
void
awcet_loop
(
evalctx_t
*
ctx
,
awcet_t
*
source
,
formula_t
*
dest
);
void
awcet_ann
(
evalctx_t
*
ctx
,
awcet_t
*
source
,
formula_t
*
dest
);
void
awcet_intmult
(
evalctx_t
*
ctx
,
awcet_t
*
source
,
formula_t
*
dest
);
void
writeC
(
formula_t
*
f
,
FILE
*
out
,
int
indent
);
...
...
This diff is collapsed.
Click to expand it.
pwcet/include/pwcet-runtime.h
+
3
−
1
View file @
12118089
...
...
@@ -54,6 +54,7 @@ union opdata_u {
int
children_count
;
/* Number of children for Alt and Seq operators */
int
loop_id
;
/* Loop bound for Loop operators */
annotation_t
ann
;
/* Annotation for Ann operators */
int
coef
;
/* Coefficient for Multiply by Integer */
};
typedef
union
opdata_u
opdata_t
;
...
...
@@ -64,6 +65,7 @@ typedef union opdata_u opdata_t;
#define KIND_ANN 3
#define KIND_CONST 4
#define KIND_AWCET 5
#define KIND_INTMULT 6
#define IDENT_NONE 0
...
...
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