specware 1.3.7__tar.gz → 1.3.8__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: specware
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: Provides utilities to specify software.
5
5
  Keywords: certification,documentation,markdown,qualification,requirements-management,traceability
6
6
  Author: The specware Authors
@@ -4,7 +4,7 @@
4
4
 
5
5
  [project]
6
6
  name = "specware"
7
- version = "1.3.7"
7
+ version = "1.3.8"
8
8
  description = "Provides utilities to specify software."
9
9
  authors = [
10
10
  {name = "The specware Authors", email = "specthings@embedded-brains.de"}
@@ -78,9 +78,15 @@ def _get_domains(item: Item) -> set[str]:
78
78
  return domains
79
79
 
80
80
 
81
+ def _is_hosted_in_second_domain(item: Item) -> bool:
82
+ return any(True for _ in item.links_to_children("interface-host")) or (
83
+ bool(get_register_block_hosts(item))
84
+ and any(True for _ in item.parents("interface-placement")))
85
+
86
+
81
87
  def _get_ingroups_of_node(item: Item, domain: Item) -> _ItemMap:
82
88
  ingroups = _get_ingroups(item)
83
- if get_register_block_hosts(item):
89
+ if _is_hosted_in_second_domain(item):
84
90
  return {
85
91
  uid: group
86
92
  for uid, group in ingroups.items()
@@ -700,8 +706,10 @@ class _Node:
700
706
  ctx.regs[name] = {}
701
707
  ctx.regs[name]["size"] = link.item["register-block-size"]
702
708
  ctx.regs[name]["type"] = link.item["name"]
709
+ host = self.header_file.get_host(
710
+ link.item) if _is_hosted_in_second_domain(link.item) else None
703
711
  ctx.regs[name]["group"] = get_register_block_identifier(
704
- link.item, self.header_file.get_host(link.item))
712
+ link.item, host)
705
713
 
706
714
  def _get_register_member_info(self, ctx: _RegisterMemberContext) -> None:
707
715
  offset = -1
@@ -56,12 +56,6 @@ _ENABLEMENT_CHILD_ROLES = ("interface-host", "interface-group-member",
56
56
  "register-block-base", "register-block-host",
57
57
  "register-block-include")
58
58
 
59
- # A host of an interface with a placement does not decide its enablement. The
60
- # placement serves the domain of the placement whatever the hosts are.
61
- _ENABLEMENT_PLACED_CHILD_ROLES = tuple(role for role in _ENABLEMENT_CHILD_ROLES
62
- if role not in ("interface-host",
63
- "register-block-host"))
64
-
65
59
 
66
60
  def recursive_is_enabled(enabled_set: EnabledSet, item: Item) -> bool:
67
61
  """
@@ -71,13 +65,10 @@ def recursive_is_enabled(enabled_set: EnabledSet, item: Item) -> bool:
71
65
  if not item.is_enabled(enabled_set):
72
66
  return False
73
67
  result = True
74
- if any(True for _ in item.parents("interface-placement")):
75
- child_roles = _ENABLEMENT_PLACED_CHILD_ROLES
76
- else:
77
- child_roles = _ENABLEMENT_CHILD_ROLES
78
68
  for parent in itertools.chain(
79
69
  item.parents(_ENABLEMENT_ROLES, is_link_enabled=link_is_enabled),
80
- item.children(child_roles, is_link_enabled=link_is_enabled)):
70
+ item.children(_ENABLEMENT_CHILD_ROLES,
71
+ is_link_enabled=link_is_enabled)):
81
72
  if recursive_is_enabled(enabled_set, parent):
82
73
  return True
83
74
  result = False
File without changes
File without changes
File without changes
File without changes