Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DOML Model Checker
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
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PIACERE
public
The Platform
DOML Model Checker
Commits
544ad3ca
Unverified
Commit
544ad3ca
authored
2 years ago
by
Andrea Franchini
Browse files
Options
Downloads
Patches
Plain Diff
Add flag to skip common requirements check
parent
092ea562
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mc_openapi/__main__.py
+5
-3
5 additions, 3 deletions
mc_openapi/__main__.py
mc_openapi/doml_mc/mc.py
+6
-1
6 additions, 1 deletion
mc_openapi/doml_mc/mc.py
with
11 additions
and
4 deletions
mc_openapi/__main__.py
+
5
−
3
View file @
544ad3ca
...
...
@@ -11,7 +11,8 @@ parser = argparse.ArgumentParser()
parser
.
add_argument
(
"
-d
"
,
"
--doml
"
,
dest
=
"
doml
"
,
help
=
"
the DOMLX file to check
"
)
parser
.
add_argument
(
"
-V
"
,
"
--doml-version
"
,
dest
=
"
doml_version
"
,
default
=
"
V2_0
"
,
help
=
"
(optional) the version used by the DOMLX file
"
)
parser
.
add_argument
(
"
-r
"
,
"
--requirements
"
,
dest
=
"
requirements
"
,
help
=
"
the user-specified requirements file to check
"
)
parser
.
add_argument
(
"
-c
"
,
"
--check-consistency
"
,
dest
=
"
consistency
"
,
action
=
'
store_true
'
,
help
=
"
check additional built-in consistency requirements
"
)
parser
.
add_argument
(
"
-c
"
,
"
--check-consistency
"
,
dest
=
"
consistency
"
,
action
=
'
store_true
'
,
help
=
"
check on additional built-in consistency requirements
"
)
parser
.
add_argument
(
"
-S
"
,
"
--skip-common-checks
"
,
dest
=
"
skip_common
"
,
action
=
'
store_true
'
,
help
=
"
skip check on common built-in requirements
"
)
parser
.
add_argument
(
"
-t
"
,
"
--threads
"
,
dest
=
"
threads
"
,
type
=
int
,
default
=
2
,
help
=
"
number of threads used by the model checker
"
)
args
=
parser
.
parse_args
()
...
...
@@ -49,7 +50,8 @@ else:
results
=
dmc
.
check_requirements
(
threads
=
args
.
threads
,
user_requirements
=
user_reqs
,
consistency_checks
=
args
.
consistency
consistency_checks
=
args
.
consistency
,
skip_common_requirements
=
args
.
skip_common
)
res
,
msg
=
results
.
summarize
()
...
...
This diff is collapsed.
Click to expand it.
mc_openapi/doml_mc/mc.py
+
6
−
1
View file @
544ad3ca
...
...
@@ -27,11 +27,16 @@ class ModelChecker:
self
,
threads
:
int
=
1
,
user_requirements
:
Optional
[
str
]
=
None
,
skip_common_requirements
:
bool
=
False
,
consistency_checks
:
bool
=
False
,
timeout
:
Optional
[
int
]
=
None
)
->
MCResults
:
assert
self
.
metamodel
and
self
.
inv_assoc
req_store
=
CommonRequirements
[
self
.
doml_version
]
req_store
=
RequirementStore
([])
if
not
skip_common_requirements
:
req_store
+=
CommonRequirements
[
self
.
doml_version
]
if
consistency_checks
:
req_store
=
req_store
\
+
get_attribute_type_reqs
(
self
.
metamodel
)
\
...
...
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