specware 1.2.25__tar.gz → 1.2.26__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {specware-1.2.25 → specware-1.2.26}/PKG-INFO +1 -1
- {specware-1.2.25 → specware-1.2.26}/pyproject.toml +1 -1
- {specware-1.2.25 → specware-1.2.26}/src/specware/applconfig.py +1 -1
- {specware-1.2.25 → specware-1.2.26}/src/specware/cliview.py +35 -15
- {specware-1.2.25 → specware-1.2.26}/src/specware/interfacemapper.py +4 -4
- {specware-1.2.25 → specware-1.2.26}/src/specware/rtems.py +8 -3
- {specware-1.2.25 → specware-1.2.26}/src/specware/spec.pickle +0 -0
- {specware-1.2.25 → specware-1.2.26}/README.md +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/__init__.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/build.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/cliexport.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/cliexportheader.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/clifind.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/contentc.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/interface.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/interfacedoc.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/py.typed +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/transitionmap.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/util.py +0 -0
- {specware-1.2.25 → specware-1.2.26}/src/specware/validation.py +0 -0
|
@@ -308,7 +308,7 @@ def _get_value_doxygen_url(
|
|
|
308
308
|
ctx: ItemGetValueContext,
|
|
309
309
|
get_value: Callable[[ItemGetValueContext],
|
|
310
310
|
str] = _get_value) -> Optional[str]:
|
|
311
|
-
for ref in ctx.item
|
|
311
|
+
for ref in ctx.item.get("references", []):
|
|
312
312
|
if ref["type"] == "url":
|
|
313
313
|
return f"<a href=\"{ref['identifier']}\">{get_value(ctx)}</a>"
|
|
314
314
|
return None
|
|
@@ -97,14 +97,23 @@ def _substitute(item: Item, mapper: ItemMapper, prefix: str,
|
|
|
97
97
|
_substitute(item, mapper, f"{prefix}[{index}]", element)
|
|
98
98
|
|
|
99
99
|
|
|
100
|
+
def _link_info(link: Optional[Link]) -> str:
|
|
101
|
+
if link is None:
|
|
102
|
+
return ""
|
|
103
|
+
info = f", role={link.role}"
|
|
104
|
+
for key in sorted(key for key in link.data if key not in ("role", "uid")):
|
|
105
|
+
info += f", {key}={link[key]}"
|
|
106
|
+
return info
|
|
107
|
+
|
|
108
|
+
|
|
100
109
|
def _visit_item(item: Item, mapper: ItemMapper, level: int,
|
|
101
|
-
|
|
110
|
+
link: Optional[Link], validated_filter: str) -> bool:
|
|
102
111
|
validated = item.view.get("validated", True)
|
|
103
112
|
if validated_filter == "yes" and not validated:
|
|
104
113
|
return False
|
|
105
114
|
if validated_filter == "no" and validated:
|
|
106
115
|
return False
|
|
107
|
-
role_info =
|
|
116
|
+
role_info = _link_info(link)
|
|
108
117
|
print(
|
|
109
118
|
f"{' ' * level}{item.uid} (type={item.type}{role_info}{_info(item)})")
|
|
110
119
|
_substitute(item, mapper, "", item.data)
|
|
@@ -114,29 +123,40 @@ def _visit_item(item: Item, mapper: ItemMapper, level: int,
|
|
|
114
123
|
def _view_interface_placment(item: Item, mapper: ItemMapper, level: int,
|
|
115
124
|
validated_filter: str) -> None:
|
|
116
125
|
for link in item.links_to_children("interface-placement"):
|
|
117
|
-
if _visit_item(link.item, mapper, level, link
|
|
126
|
+
if _visit_item(link.item, mapper, level, link, validated_filter):
|
|
118
127
|
_view_interface_placment(link.item, mapper, level + 1,
|
|
119
128
|
validated_filter)
|
|
120
129
|
|
|
121
130
|
|
|
122
|
-
def _view(item: Item, mapper: ItemMapper, level: int,
|
|
131
|
+
def _view(item: Item, mapper: ItemMapper, level: int, link: Optional[Link],
|
|
123
132
|
validated_filter: str) -> None:
|
|
124
|
-
if not _visit_item(item, mapper, level,
|
|
133
|
+
if not _visit_item(item, mapper, level, link, validated_filter):
|
|
125
134
|
return
|
|
126
|
-
for
|
|
127
|
-
_visit_item(
|
|
128
|
-
for
|
|
129
|
-
|
|
130
|
-
|
|
135
|
+
for link_2 in item.links_to_children("validation"):
|
|
136
|
+
_visit_item(link_2.item, mapper, level + 1, link_2, validated_filter)
|
|
137
|
+
for link_3 in link_2.item.links_to_children(
|
|
138
|
+
"runtime-measurement-request"):
|
|
139
|
+
_visit_item(link_3.item, mapper, level + 2, link_3,
|
|
140
|
+
validated_filter)
|
|
141
|
+
for link_2 in item.links_to_children("requirement-disposition"):
|
|
142
|
+
_visit_item(link_2.item, mapper, level + 1, link_2, validated_filter)
|
|
143
|
+
# The cited work appears under the requirement which references it. A
|
|
144
|
+
# refinement of the requirement places it in the tree.
|
|
145
|
+
for link_2 in item.links_to_parents("reference"):
|
|
146
|
+
_visit_item(link_2.item, mapper, level + 1, link_2, validated_filter)
|
|
131
147
|
_view_interface_placment(item, mapper, level + 1, validated_filter)
|
|
132
|
-
for
|
|
133
|
-
_view(
|
|
134
|
-
for
|
|
135
|
-
_view(
|
|
148
|
+
for link_2 in item.links_to_children(_CHILD_ROLES):
|
|
149
|
+
_view(link_2.item, mapper, level + 1, link_2, validated_filter)
|
|
150
|
+
for link_2 in item.links_to_parents(_PARENT_ROLES):
|
|
151
|
+
_view(link_2.item, mapper, level + 1, link_2, validated_filter)
|
|
136
152
|
|
|
137
153
|
|
|
138
154
|
def _validation_count(item: Item) -> int:
|
|
139
|
-
|
|
155
|
+
""" Count the evidence items of an item. """
|
|
156
|
+
return len(
|
|
157
|
+
list(
|
|
158
|
+
itertools.chain(item.children("validation"),
|
|
159
|
+
item.children("requirement-disposition"))))
|
|
140
160
|
|
|
141
161
|
|
|
142
162
|
def _no_enforcement(item_cache: ItemCache) -> None:
|
|
@@ -65,7 +65,7 @@ def _get_value_sphinx_ref(ctx: ItemGetValueContext,
|
|
|
65
65
|
get_value: ItemGetValue,
|
|
66
66
|
postfix: str = "",
|
|
67
67
|
prefix: str = "") -> str:
|
|
68
|
-
for ref in ctx.item
|
|
68
|
+
for ref in ctx.item.get("references", []):
|
|
69
69
|
ref_type = ref["type"]
|
|
70
70
|
identifier = ref["identifier"]
|
|
71
71
|
name_ref = f"`{prefix}{ctx.value[ctx.key]}{postfix} <{identifier}>`"
|
|
@@ -85,7 +85,7 @@ def _get_value_sphinx_unspecified_function(ctx: ItemGetValueContext) -> str:
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
def _get_value_sphinx_unspecified_group(ctx: ItemGetValueContext) -> str:
|
|
88
|
-
for ref in ctx.item
|
|
88
|
+
for ref in ctx.item.get("references", []):
|
|
89
89
|
ref_type = ref["type"]
|
|
90
90
|
identifier = ref["identifier"]
|
|
91
91
|
if ref_type == "document" and ref["name"] == "c-user":
|
|
@@ -213,7 +213,7 @@ def _get_value_markdown_ref(ctx: ItemGetValueContext,
|
|
|
213
213
|
get_value: ItemGetValue,
|
|
214
214
|
postfix: str = "",
|
|
215
215
|
prefix: str = "") -> str:
|
|
216
|
-
for ref in ctx.item
|
|
216
|
+
for ref in ctx.item.get("references", []):
|
|
217
217
|
ref_type = ref["type"]
|
|
218
218
|
identifier = ref["identifier"]
|
|
219
219
|
name = f"{prefix}{ctx.value[ctx.key]}{postfix}"
|
|
@@ -233,7 +233,7 @@ def _get_value_markdown_unspecified_function(ctx: ItemGetValueContext) -> str:
|
|
|
233
233
|
|
|
234
234
|
|
|
235
235
|
def _get_value_markdown_unspecified_group(ctx: ItemGetValueContext) -> str:
|
|
236
|
-
for ref in ctx.item
|
|
236
|
+
for ref in ctx.item.get("references", []):
|
|
237
237
|
ref_type = ref["type"]
|
|
238
238
|
identifier = ref["identifier"]
|
|
239
239
|
if ref_type == "document" and ref["name"] == "c-user":
|
|
@@ -109,12 +109,16 @@ _CONTAINER_TYPE = ("interface/domain", "interface/header-file",
|
|
|
109
109
|
# placements would lead to an infinite recursion in _validate_tree(). In the
|
|
110
110
|
# second pass using _validate_containers() the interface domain and header file
|
|
111
111
|
# validations are fixed.
|
|
112
|
+
#
|
|
113
|
+
# A disposition states the evidence of its requirement and needs none of its
|
|
114
|
+
# own.
|
|
112
115
|
_VALIDATION_LEAF = tuple(
|
|
113
|
-
itertools.chain(_VALIDATION_METHOD.keys(), _CONTAINER_TYPE
|
|
116
|
+
itertools.chain(_VALIDATION_METHOD.keys(), _CONTAINER_TYPE,
|
|
117
|
+
("requirement-disposition", )))
|
|
114
118
|
|
|
115
119
|
_CHILD_ROLES = ("requirement-refinement", "interface-ingroup",
|
|
116
120
|
"interface-ingroup-hidden", "interface-function", "test-case",
|
|
117
|
-
"validation")
|
|
121
|
+
"validation", "requirement-disposition")
|
|
118
122
|
|
|
119
123
|
_PARENT_ROLES = ("function-implementation", "interface-enumerator",
|
|
120
124
|
"performance-runtime-limits")
|
|
@@ -151,7 +155,8 @@ def gather_related_items(root: Item) -> list[Item]:
|
|
|
151
155
|
# file which contains a member of that group. The application configuration
|
|
152
156
|
# aggregates the members of its groups, it descends on its own.
|
|
153
157
|
_EXPORT_CHILD_ROLES = ("interface-function", "interface-placement",
|
|
154
|
-
"requirement-
|
|
158
|
+
"requirement-disposition", "requirement-refinement",
|
|
159
|
+
"test-case", "validation")
|
|
155
160
|
|
|
156
161
|
_EXPORT_PARENT_ROLES = _PARENT_ROLES + ("constraint", "errno",
|
|
157
162
|
"register-block-include")
|
|
index 7b64ea2..a9a8cdb 100644
|
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|