Skip to content

Commit 0f992a3

Browse files
dopamaneRaoulSchaffranekrv-jenkins
authored
Remove Semantics of K references in Syntax modules (#2783)
* update And syntax documentation * update syntax docs to refer to kore-syntax.md#patterns * fix links, updating docs * add links to kore-syntax.md, update docs * refer to kore-syntax * reference kore-syntax.md * escape backslash * update comments on unified constructs * Update docs/glossary.md Co-authored-by: Raoul <[email protected]> * fix link to kore-syntax.md#patterns * use haddock hyperlinks when possible Co-authored-by: Raoul <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
1 parent 96da945 commit 0f992a3

28 files changed

+94
-145
lines changed

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
1. (noun)
4242
A syntactic element constructed according to the rules described in the
43-
semantics-of-k document.
43+
[kore-syntax document](http://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns).
4444
2. (noun)
4545
The internal representation of such a syntactic element. It may have
4646
constructs which cannot be represented directly into syntactic elements

kore/src/Kore/AST/Common.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ the syntactic categories of a Kore definition that do not need unified
77
constructs.
88
99
Unified constructs are those that represent both meta and object versions of
10-
an AST term in a single data type (e.g. 'UnifiedSort' that can be either
11-
'Sort' or 'Sort')
10+
an AST term in a single data type (e.g. 'SymbolOrAlias' that can be either
11+
'Symbol' or 'Alias')
1212
13-
Please refer to Section 9 (The Kore Language) of the
14-
<http://github.com/kframework/kore/blob/master/docs/semantics-of-k.pdf Semantics of K>.
13+
Please refer to
14+
<http://github.com/kframework/kore/blob/master/docs/kore-syntax.md kore-syntax.md>.
1515
-}
1616
module Kore.AST.Common (
1717
MLPatternType (..),
@@ -28,7 +28,7 @@ import GHC.Generics (
2828
import Kore.Unparser
2929
import Prelude.Kore
3030

31-
-- |Enumeration of patterns starting with @\@
31+
-- |Enumeration of patterns starting with @\\@
3232
data MLPatternType
3333
= AndPatternType
3434
| BottomPatternType

kore/src/Kore/Sort.hs

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{- |
22
Copyright : (c) Runtime Verification, 2018-2021
33
4-
Please refer to Section 9 (The Kore Language) of the
5-
<http://github.com/kframework/kore/blob/master/docs/semantics-of-k.pdf Semantics of K>.
4+
Please refer to
5+
<http://github.com/kframework/kore/blob/master/docs/kore-syntax.md kore-syntax.md>.
66
-}
77
module Kore.Sort (
88
SortVariable (..),
@@ -56,10 +56,9 @@ import Kore.Unparser
5656
import Prelude.Kore
5757
import qualified Pretty
5858

59-
{- | @SortVariable@ is a Kore sort variable.
59+
{- | 'SortVariable' is a Kore sort variable.
6060
61-
@SortVariable@ corresponds to the @sort-variable@ syntactic category from the
62-
Semantics of K, Section 9.1.2 (Sorts).
61+
'SortVariable' corresponds to the @sort-variable@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#sorts kore-syntax.md#sorts>.
6362
-}
6463
newtype SortVariable = SortVariable
6564
{getSortVariable :: Id}
@@ -73,9 +72,8 @@ instance Unparse SortVariable where
7372
unparse = unparse . getSortVariable
7473
unparse2 SortVariable{getSortVariable} = unparse2 getSortVariable
7574

76-
{- |'SortActual' corresponds to the @sort-constructor{sort-list}@ branch of the
77-
@object-sort@ and @meta-sort@ syntactic categories from the Semantics of K,
78-
Section 9.1.2 (Sorts).
75+
{- |'SortActual' corresponds to the @sort-identifier{sorts}@ branch of the
76+
@sort@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#sorts kore-syntax.md#sorts>.
7977
-}
8078
data SortActual = SortActual
8179
{ sortActualName :: !Id
@@ -100,9 +98,8 @@ instance Unparse SortActual where
10098
<> parameters2 sortActualSorts
10199
<> ")"
102100

103-
{- |'Sort' corresponds to the @object-sort@ and
104-
@meta-sort@ syntactic categories from the Semantics of K,
105-
Section 9.1.2 (Sorts).
101+
{- |'Sort' corresponds to the @sort@ syntactic category from
102+
<https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#sorts kore-syntax.md#sorts>.
106103
-}
107104
data Sort
108105
= SortVariableSort !SortVariable
@@ -173,10 +170,7 @@ substituteSortVariables substitution sort =
173170
substituteSortVariables substitution <$> sortActualSorts
174171
}
175172

176-
{- |'MetaSortType' corresponds to the @meta-sort-constructor@ syntactic category
177-
from the Semantics of K, Section 9.1.2 (Sorts).
178-
179-
Ths is not represented directly in the AST, we're using the string
173+
{- | Ths is not represented directly in the AST, we're using the string
180174
representation instead.
181175
-}
182176
data MetaSortType

kore/src/Kore/Syntax/And.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import Kore.Unparser
1616
import Prelude.Kore
1717
import qualified Pretty
1818

19-
{- |'And' corresponds to the @\and@ branches of the @object-pattern@ and
20-
@meta-pattern@ syntactic categories from the Semantics of K,
21-
Section 9.1.4 (Patterns).
19+
{- |'And' corresponds to the @\\and@ branch of the @matching-logic-pattern@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
2220
2321
'andSort' is both the sort of the operands and the sort of the result.
2422

kore/src/Kore/Syntax/Application.hs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ the syntactic categories of a Kore definition that do not need unified
77
constructs.
88
99
Unified constructs are those that represent both meta and object versions of
10-
an AST term in a single data type (e.g. 'UnifiedSort' that can be either
11-
'Sort' or 'Sort')
10+
an AST term in a single data type (e.g. 'SymbolOrAlias' that can be either
11+
'Kore.Syntax.Sentence.Symbol' or 'Kore.Syntax.Sentence.Alias')
1212
13-
Please refer to Section 9 (The Kore Language) of the
14-
<http://github.com/kframework/kore/blob/master/docs/semantics-of-k.pdf Semantics of K>.
13+
Please refer to
14+
<http://github.com/kframework/kore/blob/master/docs/kore-syntax.md kore-syntax.md>.
1515
-}
1616
module Kore.Syntax.Application (
1717
SymbolOrAlias (..),
@@ -28,9 +28,8 @@ import Kore.Unparser
2828
import Prelude.Kore
2929
import qualified Pretty
3030

31-
{- |'SymbolOrAlias' corresponds to the @head{sort-list}@ branch of the
32-
@head@ syntactic category from the Semantics of K,
33-
Section 9.1.3 (Heads).
31+
{- |'SymbolOrAlias' corresponds to the @symbol-or-alias@ syntactic category from
32+
<https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#sentences kore-syntax.md#sentences>
3433
-}
3534
data SymbolOrAlias = SymbolOrAlias
3635
{ symbolOrAliasConstructor :: !Id
@@ -55,8 +54,9 @@ instance Unparse SymbolOrAlias where
5554
instance From SymbolOrAlias SymbolOrAlias where
5655
from = id
5756

58-
{- |'Application' corresponds to the @head(pattern-list)@ branches of the
59-
@pattern@ syntactic category from the Semantics of K, Section 9.1.4 (Patterns).
57+
{- |'Application' corresponds to the @application-pattern@ branch of the
58+
@pattern@ syntactic category from
59+
<https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
6060
6161
This represents the @σ(φ1, ..., φn)@ symbol patterns in Matching Logic.
6262
-}

kore/src/Kore/Syntax/Bottom.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import Kore.Sort
1515
import Kore.Unparser
1616
import Prelude.Kore
1717

18-
{- | 'Bottom' corresponds to the @\bottom@ branches of the @pattern@ syntactic
19-
category from the Semantics of K, Section 9.1.4 (Patterns).
18+
{- | 'Bottom' corresponds to the @\\bottom@ branch of the @matching-logic-pattern@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
2019
2120
'bottomSort' is the sort of the result.
2221
-}

kore/src/Kore/Syntax/Ceil.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import Kore.Unparser
1616
import Prelude.Kore
1717
import qualified Pretty
1818

19-
{- |'Ceil' corresponds to the @\ceil@ branches of the @object-pattern@ and
20-
@meta-pattern@ syntactic categories from the Semantics of K,
21-
Section 9.1.4 (Patterns).
19+
{- |'Ceil' corresponds to the @\\ceil@ branch of the @matching-logic-pattern@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
2220
2321
'ceilOperandSort' is the sort of the operand.
2422

kore/src/Kore/Syntax/Definition.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import qualified Pretty
2929
{- | Currently, a 'Definition' consists of some 'Attributes' and a 'Module'
3030
3131
Because there are plans to extend this to a list of 'Module's, the @definition@
32-
syntactic category from the Semantics of K, Section 9.1.6
33-
(Declaration and Definitions) is splitted here into 'Definition' and 'Module'.
32+
syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#definition-modules kore-syntax.md#definition-modules>
33+
(Declaration and Definitions) is split here into 'Definition' and 'Module'.
3434
3535
'definitionAttributes' corresponds to the first non-terminal of @definition@,
3636
while the remaining three are grouped into 'definitionModules'.

kore/src/Kore/Syntax/DomainValue.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ import Kore.Unparser
1717
import Prelude.Kore
1818
import qualified Pretty
1919

20-
{- |'DomainValue' corresponds to the @\dv@ branch of the @object-pattern@
21-
syntactic category, which are not yet in the Semantics of K document,
22-
but they should appear in Section 9.1.4 (Patterns) at some point.
20+
{- |'DomainValue' corresponds to the @\\dv@ branch of the @matching-logic-pattern@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
2321
2422
'domainValueSort' is the sort of the result.
2523
2624
This represents the encoding of an object constant, e.g. we may use
27-
\dv{Int{}}{"123"} instead of a representation based on constructors,
28-
e.g. succesor(succesor(...succesor(0)...))
25+
@\\dv{Int{}}{"123"}@ instead of a representation based on constructors,
26+
e.g. @succesor(succesor(...succesor(0)...))@
2927
-}
3028
data DomainValue sort child = DomainValue
3129
{ domainValueSort :: !sort

kore/src/Kore/Syntax/Equals.hs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ import Pretty (
1919
)
2020
import qualified Pretty
2121

22-
{- |'Equals' corresponds to the @\equals@ branches of the @object-pattern@ and
23-
@meta-pattern@ syntactic categories from the Semantics of K,
24-
Section 9.1.4 (Patterns).
22+
{- |'Equals' corresponds to the @\\equals@ branch of the @matching-logic-pattern@ syntactic category from <https://github.com/kframework/kore/blob/master/docs/kore-syntax.md#patterns kore-syntax.md#patterns>.
2523
2624
'equalsOperandSort' is the sort of the operand.
2725

0 commit comments

Comments
 (0)