Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion normative-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is a Normative Rule?

Normative rules specify the behaviors an implementation must meet in order to be compliant with the standard. Each normative rule can be thought of as a complete individually testable behavior. In some cases, a normative rule allows multiple acceptable implementation behaviors. These are called "parameters" and can be thought of as a special case of a normative rule.
Normative rules specify the behaviors an implementation must meet in order to be compliant with the standard. Each normative rule can be thought of as a complete architecturally-visible behavior. In some cases, a normative rule allows multiple acceptable implementation behaviors. These are called "parameters" and can be thought of as a special case of a normative rule.

### Examples of Normative Rules:
| ISA Manual Text |
Expand Down
50 changes: 25 additions & 25 deletions tests/norm-rule/expected/test-norm-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,50 @@
]
},
{
"name": "inline-anchors-in-paragraph",
"name": "paragraph-with-a-really-wide-rule-name",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"description": "Here's a description.\nIt's got 2 lines.\n",
"tags": [
{
"name": "norm:paragraph:no-inline-anchors",
"text": "Paragraph without inline anchors",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "inline-anchors-in-paragraph-entire",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:paragraph:inline-anchors-in-paragraph",
"name": "norm:paragraph:inline-anchors:entire",
"text": "Paragraph with inline anchor and something.",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "inline-anchors-in-tagged-paragraph",
"name": "inline-anchors-in-paragraph-inline-anchor",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:paragraph:inline-anchors-in-paragraph:inline-anchors",
"name": "norm:paragraph:inline-anchors:inline-anchor",
"text": "inline anchor",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "paragraph-with-a-really-wide-rule-name",
"name": "rule_with_newlines",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"description": "Here's a description.\nIt's got 2 lines.\n",
"tags": [
{
"name": "norm:paragraph:no-inline-anchors-in-paragraph",
"text": "Paragraph without inline anchors",
"name": "norm:paragraph:tag_with_newlines",
"text": "Here’s the first line. Here’s the second line.",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand Down Expand Up @@ -86,7 +98,7 @@
"tags": [
{
"name": "norm:unordered-list:anchors-in-items:entire-list",
"text": "Unordered List with anchors:",
"text": "Item 1\n Item 2\nItem 3",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand Down Expand Up @@ -120,12 +132,12 @@
"tags": [
{
"name": "norm:description-list:anchors-in-items:item1",
"text": "Description Item 1",
"text": "Item 1",
"tag_filename": "/build/test-norm-tags.json"
},
{
"name": "norm:description-list:anchors-in-items:item3",
"text": "Description Item 3",
"text": "Item 3",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand All @@ -137,24 +149,12 @@
"tags": [
{
"name": "norm:description-list:anchors-in-items:item1",
"text": "Description Item 1",
"text": "Item 1",
"tag_filename": "/build/test-norm-tags.json"
},
{
"name": "norm:description-list:anchors-in-items:item3",
"text": "Description Item 3",
"tag_filename": "/build/test-norm-tags.json"
}
]
},
{
"name": "rule_with_newlines",
"def_filename": "tests/norm-rule/test.yaml",
"chapter_name": "my-chapter_name",
"tags": [
{
"name": "norm:tag_with_newlines",
"text": "Here’s the first line. Here’s the second line.",
"text": "Item 3",
"tag_filename": "/build/test-norm-tags.json"
}
]
Expand Down
Binary file modified tests/norm-rule/expected/test-norm-rules.xlsx
Binary file not shown.
56 changes: 29 additions & 27 deletions tests/norm-rule/expected/test-norm-tags.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
{
"tags": {
"norm:inline": "inside inline",
"norm:tag_with_newlines": "Here’s the first line. Here’s the second line.",
"norm:paragraph:no-inline-anchors-in-paragraph": "Paragraph without inline anchors",
"norm:paragraph:inline-anchors-in-paragraph:inline-anchors": "inline anchor",
"norm:paragraph:inline-anchors-in-paragraph": "Paragraph with inline anchor and something.",
"norm:paragraph:no-inline-anchors": "Paragraph without inline anchors",
"norm:paragraph:inline-anchors:inline-anchor": "inline anchor",
"norm:paragraph:inline-anchors:entire": "Paragraph with inline anchor and something.",
"norm:paragraph:tag_with_newlines": "Here’s the first line. Here’s the second line.",
"norm:table:no-anchors-in-cells:entire-table": "Header 1|Header 2\n===\nCell in column 1, row 1|Cell in column 2, row 1\nCell in column 1, row 2|Cell in column 2, row 2\n===",
"norm:table:anchors-in-cells:cell": "",
"norm:table:anchors-in-cells:entire-table": "===\n cell with anchor\ncell without anchor\n===",
"norm:table:no-anchors-in-cells:entire-table": "Header 1|Header 2\n===\nCell in column 1, row 1|Cell in column 2, row 1\nCell in column 1, row 2|Cell in column 2, row 2\n===",
"norm:unordered-list:anchors-in-items:entire-list": "Unordered List with anchors:",
"norm:unordered-list:no-anchors-in-items:entire-list": "Item A\nItem B\nItem C",
"norm:unordered-list:anchors-in-items:item1": "",
"norm:unordered-list:anchors-in-items:item2": "",
"norm:unordered-list:no-anchors-in-items:entire-list": "Unordered List without anchors:",
"norm:unordered-list:anchors-in-items:entire-list": "Item 1\n Item 2\nItem 3",
"norm:unordered-list:multiple-levels": "Zca and not F\nZca, Zcf and F (but not D) is specified (RV32 only)\nZca, Zcf and Zcd if D is specified (RV32 only)\n\nthis configuration excludes Zcmp, Zcmt\nZca, Zcd if D is specified (RV64 only)\n\nthis configuration excludes Zcmp, Zcmt",
"norm:ordered-list:anchors-in-items:entire-list": "Ordered List with anchors:",
"norm:ordered-list:no-anchors-in-items:entire-list": "Item A\nItem B\nItem C",
"norm:ordered-list:anchors-in-items:item1": "",
"norm:ordered-list:anchors-in-items:item2": "",
"norm:ordered-list:no-anchors-in-items:entire-list": "Ordered List without anchors:",
"norm:description-list:anchors-in-items:item1": "Description Item 1",
"norm:description-list:anchors-in-items:item3": "Description Item 3",
"norm:description-list:no-anchors-in-items:entire-list": "Description List without anchors in items:",
"norm:ordered-list:anchors-in-items:entire-list": "Item 1\n Item 2\nItem 3",
"norm:description-list:no-anchors-in-items:entire-list": "Description-A\nItem A\nDescription-B\nItem B\nDescription-C\nItem C",
"norm:description-list:anchors-in-items:entire-list": "Description-1",
"norm:description-list:anchors-in-items:item1": "Item 1",
"norm:description-list:anchors-in-items:item3": "Item 3",
"norm:admonition:single-paragraph-note": "",
"norm:admonition:no-anchors-in-notes:entire-note": "Paragraph A\n\nParagraph B\n\nParagraph C",
"norm:admonition:anchors-in-notes:note1": "Paragraph 1",
"norm:admonition:anchors-in-notes:note3": "Paragraph 3",
"norm:admonition:anchors-in-notes:entire-note": "Paragraph 1\n\nParagraph 2\n\nParagraph 3",
"norm:admonition:no-anchors-in-notes:entire-note": "Paragraph 1\n\nParagraph 2\n\nParagraph 3",
"norm:admonition:only-anchors-in-notes:note1": "Paragraph 1",
"norm:admonition:only-anchors-in-notes:note3": "Paragraph 3"
},
Expand All @@ -41,28 +42,28 @@
"id": "_chapter_1_1_inline_tagging",
"children": [],
"tags": [
"norm:inline",
"norm:tag_with_newlines"
"norm:inline"
]
},
{
"title": "Chapter 1.2 - Paragraph Tagging",
"id": "_chapter_1_2_paragraph_tagging",
"children": [],
"tags": [
"norm:paragraph:no-inline-anchors-in-paragraph",
"norm:paragraph:inline-anchors-in-paragraph:inline-anchors",
"norm:paragraph:inline-anchors-in-paragraph"
"norm:paragraph:no-inline-anchors",
"norm:paragraph:inline-anchors:inline-anchor",
"norm:paragraph:inline-anchors:entire",
"norm:paragraph:tag_with_newlines"
]
},
{
"title": "Chapter 2 - Table Tagging",
"id": "_chapter_2_table_tagging",
"children": [],
"tags": [
"norm:table:no-anchors-in-cells:entire-table",
"norm:table:anchors-in-cells:cell",
"norm:table:anchors-in-cells:entire-table",
"norm:table:no-anchors-in-cells:entire-table"
"norm:table:anchors-in-cells:entire-table"
]
}
],
Expand All @@ -73,10 +74,10 @@
"id": "_chapter_3_tagging_unordered_lists",
"children": [],
"tags": [
"norm:unordered-list:anchors-in-items:entire-list",
"norm:unordered-list:no-anchors-in-items:entire-list",
"norm:unordered-list:anchors-in-items:item1",
"norm:unordered-list:anchors-in-items:item2",
"norm:unordered-list:no-anchors-in-items:entire-list",
"norm:unordered-list:anchors-in-items:entire-list",
"norm:unordered-list:multiple-levels"
]
},
Expand All @@ -85,20 +86,21 @@
"id": "_chapter_4_tagging_ordered_lists",
"children": [],
"tags": [
"norm:ordered-list:anchors-in-items:entire-list",
"norm:ordered-list:no-anchors-in-items:entire-list",
"norm:ordered-list:anchors-in-items:item1",
"norm:ordered-list:anchors-in-items:item2",
"norm:ordered-list:no-anchors-in-items:entire-list"
"norm:ordered-list:anchors-in-items:entire-list"
]
},
{
"title": "Chapter 5 - Tagging Description Lists",
"id": "_chapter_5_tagging_description_lists",
"children": [],
"tags": [
"norm:description-list:no-anchors-in-items:entire-list",
"norm:description-list:anchors-in-items:entire-list",
"norm:description-list:anchors-in-items:item1",
"norm:description-list:anchors-in-items:item3",
"norm:description-list:no-anchors-in-items:entire-list"
"norm:description-list:anchors-in-items:item3"
]
},
{
Expand All @@ -107,10 +109,10 @@
"children": [],
"tags": [
"norm:admonition:single-paragraph-note",
"norm:admonition:no-anchors-in-notes:entire-note",
"norm:admonition:anchors-in-notes:note1",
"norm:admonition:anchors-in-notes:note3",
"norm:admonition:anchors-in-notes:entire-note",
"norm:admonition:no-anchors-in-notes:entire-note",
"norm:admonition:only-anchors-in-notes:note1",
"norm:admonition:only-anchors-in-notes:note3"
]
Expand Down
Loading