Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
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
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
7284fc2d
Commit
7284fc2d
authored
9 months ago
by
Leandre Lacourt
Browse files
Options
Downloads
Patches
Plain Diff
first version to get the task list
parent
b060cdc8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/socNameC.ml
+31
-0
31 additions, 0 deletions
lib/socNameC.ml
with
31 additions
and
0 deletions
lib/socNameC.ml
+
31
−
0
View file @
7284fc2d
...
...
@@ -164,3 +164,34 @@ let get_instances : Soc.t -> instance_type list = fun soc ->
let
res
=
List
.
mapi
gao_to_instance_type
gaol
in
(* List.iter print_instance_type res; *)
res
let
get_tasks
:
Soc
.
t
->
task
list
=
fun
soc
->
(*let gaol = get_gaol soc in*)
let
task_list
=
soc
.
tasks
in
task_list
(*let ltbl = Hashtbl.create 2 in
let node_cpt_ref = ref (-1) in
let all_vars = (get_inputs_assoc soc) @ (get_outputs_assoc soc) @ (get_variables_assoc soc) in
let gao_to_tasks i gao =
match gao with
| Call(_,Assign,_,_) -> assert false
| Call(args_out, Method((_,k), _,_), args_in, _)
| Call(args_out, Procedure (k,_) , args_in, _) ->
let node_cpt, _inst_cpt = match Hashtbl.find_opt ltbl k with
| None -> incr node_cpt_ref; Hashtbl.add ltbl k (!node_cpt_ref, 0); !node_cpt_ref, 0
| Some (node_cpt, inst_cpt) ->
let inst_cpt = inst_cpt+1 in
Hashtbl.add ltbl k (node_cpt, inst_cpt);
node_cpt, inst_cpt
in
{
id = i+1;
node = node_cpt;
var_in = List.map (var_expr_to_index all_vars) args_in;
var_out = List.map (var_expr_to_index all_vars) args_out
}
| Case(_, _,_) -> assert false
in
let res = List.mapi gao_to_tasks gaol in
(* List.iter print_instance_type res; *)
res*)
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