Skip to content
Snippets Groups Projects
Unverified Commit 544ad3ca authored by Andrea Franchini's avatar Andrea Franchini
Browse files

Add flag to skip common requirements check

parent 092ea562
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
......@@ -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) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment