Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
cda2fcc8
Commit
cda2fcc8
authored
7 years ago
by
Pierre Loic Garoche
Browse files
Options
Downloads
Patches
Plain Diff
[lustret] When generating MC/DC conditions, produce them as EMF XML output
parent
a1230f68
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
src/main_lustre_testgen.ml
+19
-4
19 additions, 4 deletions
src/main_lustre_testgen.ml
with
19 additions
and
4 deletions
src/main_lustre_testgen.ml
+
19
−
4
View file @
cda2fcc8
...
...
@@ -45,7 +45,6 @@ let testgen_source dirname basename extension =
(* Parsing source *)
let
prog
=
parse_source
source_name
in
let
prog
,
dependencies
=
Compiler_stages
.
stage1
prog
dirname
basename
in
(* Two cases
...
...
@@ -55,16 +54,32 @@ let testgen_source dirname basename extension =
if
!
Options
.
gen_mcdc
then
(
let
prog_mcdc
=
PathConditions
.
mcdc
prog
in
(* We re-type the fresh equations *)
let
_
,
type_env
,
_
=
import_dependencies
prog_mcdc
in
let
_
=
type_decls
type_env
prog_mcdc
in
let
destname
=
!
Options
.
dest_dir
^
"/"
^
basename
in
let
source_file
=
destname
^
".mcdc.lus"
in
(* Could be changed *)
let
source_out
=
open_out
source_file
in
let
source_file
=
destname
^
".mcdc"
in
(* Could be changed *)
(* Modified Lustre is produced in fresh .lus file *)
let
source_lus
=
source_file
^
".lus"
in
let
source_out
=
open_out
source_lus
in
let
fmt
=
formatter_of_out_channel
source_out
in
Printers
.
pp_prog
fmt
prog_mcdc
;
Format
.
fprintf
fmt
"@.@?"
;
(* Prog is
(1) cleaned from initial equations TODO
(2) produced as EMF
*)
Options
.
output
:=
"emf"
;
let
prog_mcdc
=
Normalization
.
normalize_prog
~
backend
:
"emf"
prog_mcdc
in
let
machine_code
=
Compiler_stages
.
stage2
prog_mcdc
in
let
source_emf
=
source_file
^
".emf"
in
let
source_out
=
open_out
source_emf
in
let
fmt
=
formatter_of_out_channel
source_out
in
EMF_backend
.
translate
fmt
basename
prog_mcdc
machine_code
;
exit
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