From 71375b8005d0f9cd643aabe191cf8b74833f1632 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Thu, 23 Nov 2023 15:03:21 +0100 Subject: [PATCH] Add more tags --- building/tooling/analyzers/tags.md | 172 +++++++++++++++++------------ 1 file changed, 103 insertions(+), 69 deletions(-) diff --git a/building/tooling/analyzers/tags.md b/building/tooling/analyzers/tags.md index ab18e945..7fe5a594 100644 --- a/building/tooling/analyzers/tags.md +++ b/building/tooling/analyzers/tags.md @@ -14,8 +14,8 @@ A tag is a string that is formatted as: `:`. We support four different categories, going from highest to lowest level: -| Category | Description | Specificity | Examples | -| ----------- | ----------------------------------------------- | ---------------------------------------- | --------------------------- | +| Category | Description | Specificity | Examples | +| ----------- | ----------------------------------------------- | ---------------------------------------- | ------------------------------------- | | `paradigm` | A [programming paradigm][programming-paradigms] | Very high-level, not track-specific | `imperative`, `functional` | | `technique` | A technique being used | High-level, most won't be track-specific | `recursion`, `immutability` | | `construct` | A language construct | Many won't be track-specific | `bitwise-and`, `for-loop` | @@ -46,20 +46,21 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra | `paradigm:object-oriented` | Uses [object-oriented programming][object-oriented-programming]. | | `paradigm:procedural` | Uses [procedural programming][procedural-programming]. | | `paradigm:reflective` | Uses [reflective programming][reflective-programming]. | +| `paradigm:stack-oriented` | Uses [stack-oriented programming][stack-oriented-programming]. | ### Techniques | Tag | Description | | ---------------------------------- | ------------------------------------------------------------------------------ | | `technique:bit-manipulation` | Manipulating bits, usually via bitwise operators (e.g. AND, XOR or left shift) | -| `technique:bit-shifting` | Using bit shifting (special case of `technique:bit-manipulation`) | +| `technique:bit-shifting` | Using bit shifting (special case of `technique:bit-manipulation`) | | `technique:boolean-logic` | Using boolean logic (AND, OR, NOT) | | `technique:concurrency` | Using concurrency | | `technique:enumeration` | Enumerating over values | | `technique:exceptions` | Working with exceptions | | `technique:higher-order-functions` | Using higher-order functions | | `technique:immutability` | Using immutability | -| `technique:immutable-collection` | Using immutable collections (special case of `technique:immutability`) | +| `technique:immutable-collection` | Using immutable collections (special case of `technique:immutability`) | | `technique:inheritance` | Using inheritance | | `technique:laziness` | Using laziness, where values are produced only when needed | | `technique:locks` | Using locks to get exclusive access to resources | @@ -71,53 +72,64 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra | `technique:randomness` | Using randomness | | `technique:recursion` | Using recursion | | `technique:regular-expression` | Using regular expressions | -| `technique:sorted-collection` | Using sorted collections (special case of `technique:sorting`) | +| `technique:short-circuiting` | Use short-circuiting to prevent unnecessary evaluation | +| `technique:sorted-collection` | Using sorted collections (special case of `technique:sorting`) | | `technique:sorting` | Sorting data | | `technique:type-conversion` | Converting values from one type to another type | | `technique:unsafe` | Using unsafe code, e.g. pointer arithmetic | ### Constructs -| Tag | Description | -| -------------------------------- | --------------------------------------------------------------- | -| `construct:assignment` | Assif | -| `construct:catch` | Catch an exception | -| `construct:constant` | A constant (immutable) value | -| `construct:constructor` | A constructor | -| `construct:explicit-conversion` | Exlicitly convert from one type to another type (aka "casting") | -| `construct:extension-method` | An extension method | -| `construct:field` | A field | -| `construct:generic-method` | A method that is parameterized with one or more types | -| `construct:generic-type` | A type that is parameterized with one or more types | -| `construct:getter` | A getter | -| `construct:implicit-conversion` | Implicitly convert from one type to another type | -| `construct:indexer` | An indexer | -| `construct:invocation` | An invocation of a method/function | -| `construct:lambda` | A lambda (aka an "anonymous function") | -| `construct:nested-function` | A nested function | -| `construct:logical-and` | A logical AND | -| `construct:logical-not` | A logical NOT | -| `construct:logical-or` | A logical OR | -| `construct:method` | A method | -| `construct:method-overloading` | Method overloading | -| `construct:module` | A module (grouping of code) | -| `construct:named-argument` | An argument passed by name | -| `construct:namespace` | A namespace (grouping of code) | -| `construct:nested-type` | A nested type | -| `construct:nullability` | Nullability, dealing with `null` values | -| `construct:operator-overloading` | Operator overloading | -| `construct:optional-parameter` | An optional parameter (doesn't have to be passed) | -| `construct:parameter` | A parameter | -| `construct:pattern-matching` | Pattern matching | -| `construct:property` | A property (getter/setter) | -| `construct:setter` | A setter | -| `construct:throw` | Throw/raise an exception | -| `construct:try` | Explicitly handle an exception | -| `construct:type-inference` | Automatically infer the type of a value | -| `construct:import` | Import functionality (e.g. from a namespace/module) | -| `construct:varargs` | Allow passing in zero or more values for a parameter | -| `construct:variable` | A variable | -| `construct:visibility-modifiers` | Determine the visibility of a method/function | +| Tag | Description | +| -------------------------------------------- | --------------------------------------------------------------- | +| `construct:abstract-method` | An abstract method | +| `construct:assignment` | Assign/bind a value to a variable/name | +| `construct:catch` | Catch an exception | +| `construct:constant` | A constant (immutable) value | +| `construct:constructor` | A constructor | +| `construct:default-interface-implementation` | A default implementation in an interface | +| `construct:default` | A default value (e.g. for a parameter) | +| `construct:equality` | Compare equality of two values | +| `construct:event` | An event | +| `construct:explicit-conversion` | Exlicitly convert from one type to another type (aka "casting") | +| `construct:extension-method` | An extension method | +| `construct:field` | A field | +| `construct:generic-function` | A function that is parameterized with one or more types | +| `construct:generic-method` | A method that is parameterized with one or more types | +| `construct:generic-type` | A type that is parameterized with one or more types | +| `construct:getter` | A getter | +| `construct:implicit-conversion` | Implicitly convert from one type to another type | +| `construct:import` | Import functionality (e.g. from a namespace/module) | +| `construct:indexer` | An indexer | +| `construct:inequality` | Compare inequality of two values | +| `construct:invocation` | An invocation of a method/function | +| `construct:lambda` | A lambda (aka an "anonymous function") | +| `construct:logical-and` | A logical AND | +| `construct:logical-not` | A logical NOT | +| `construct:logical-or` | A logical OR | +| `construct:method-overloading` | Method overloading | +| `construct:method-override` | An overridden method | +| `construct:method` | A method | +| `construct:module` | A module (grouping of code) | +| `construct:multiple-dispatch` | Multiple dispatch | +| `construct:named-argument` | An argument passed by name | +| `construct:namespace` | A namespace (grouping of code) | +| `construct:nested-function` | A nested function | +| `construct:nested-type` | A nested type | +| `construct:nullability` | Nullability, dealing with `null` values | +| `construct:operator-overloading` | Operator overloading | +| `construct:optional-parameter` | An optional parameter (doesn't have to be passed) | +| `construct:parameter` | A parameter | +| `construct:pattern-matching` | Pattern matching | +| `construct:property` | A property (getter/setter) | +| `construct:setter` | A setter | +| `construct:throw` | Throw/raise an exception | +| `construct:try` | Explicitly handle an exception | +| `construct:type-inference` | Automatically infer the type of a value | +| `construct:varargs` | Allow passing in zero or more values for a parameter | +| `construct:variable` | A variable | +| `construct:virtual-method` | A virtual method | +| `construct:visibility-modifiers` | Determine the visibility of a method/function | #### Control flow @@ -125,6 +137,7 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra | -------------------------------- | -------------------------------------------- | | `construct:async-await` | An `async`/`await` statement | | `construct:break` | Break from a loop | +| `construct:conditional-access` | Conditionally access a method | | `construct:conditional-operator` | A ternary conditional operator | | `construct:continue` | Continue to the next iteration of a loop | | `construct:do-while-loop` | A `do-while` loop | @@ -139,20 +152,37 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra #### Arithmetic -| Tag | Description | -| ------------------------------- | -------------------------------------------- | -| `construct:add` | Addition | -| `construct:bitwise-and` | Bitwise AND | -| `construct:bitwise-left-shift` | Bitwise left shift | -| `construct:bitwise-not` | Bitwise NOT | -| `construct:bitwise-or` | Bitwise OR | -| `construct:bitwise-right-shift` | Bitwise right shift | -| `construct:bitwise-xor` | Bitwise XOR | -| `construct:checked-arithmetic` | Checked arithmetic (guard against overflows) | -| `construct:divide` | Division | -| `construct:multiply` | Multiplication | -| `construct:overflow` | Arithmetic overflow | -| `construct:subtract` | Subtraction | +| Tag | Description | +| ------------------------------------------ | -------------------------------------------- | +| `construct:add-assignment` | Addition and assignment combined | +| `construct:add` | Addition | +| `construct:bitwise-and-assignment` | Bitwise AND and assignment combined | +| `construct:bitwise-and` | Bitwise AND | +| `construct:bitwise-left-shift-assignment` | Bitwise left shift and assignment combined | +| `construct:bitwise-left-shift` | Bitwise left shift | +| `construct:bitwise-not` | Bitwise NOT | +| `construct:bitwise-or-assignment` | Bitwise OR and assignment combined | +| `construct:bitwise-or` | Bitwise OR | +| `construct:bitwise-right-shift-assignment` | Bitwise right shift and assignment combined | +| `construct:bitwise-right-shift` | Bitwise right shift | +| `construct:bitwise-xor-assignment` | Bitwise XOR and assignment combined | +| `construct:bitwise-xor` | Bitwise XOR | +| `construct:checked-arithmetic` | Checked arithmetic (guard against overflows) | +| `construct:divide-assignment` | Division and assignment combined | +| `construct:divide` | Division | +| `construct:modulo-assignment` | Division remainder and assignment combined | +| `construct:modulo` | Division remainder | +| `construct:multiply-assignment` | Multiplication and assignment combined | +| `construct:multiply` | Multiplication | +| `construct:overflow` | Arithmetic overflow | +| `construct:postfix-decrement` | Decrement a value using postfix notation | +| `construct:postfix-increment` | Increment a value using postfix notation | +| `construct:prefix-decrement` | Decrement a value using prefix notation | +| `construct:prefix-increment` | Increment a value using prefix notation | +| `construct:subtract-assignment` | Subtraction and assignment combined | +| `construct:subtract` | Subtraction | +| `construct:unary-minus` | Unary minus | +| `construct:unary-plus` | Unary plus | #### Value types @@ -198,6 +228,7 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra | Tag | Description | | ---------------------------------- | ---------------------------------------------------------------- | +| `construct:abstract-class` | An abstract class | | `construct:class` | A class | | `construct:exception` | An exception | | `construct:interface` | An interface | @@ -211,16 +242,18 @@ Using a common set of tags will allow us to do some nifty things, like cross-tra #### Collection types -| Tag | Description | -| ----------------------- | --------------------------------------------------- | -| `construct:array` | An array | -| `construct:bit-array` | A bit array (similar to an array but works on bits) | -| `construct:dictionary` | A dictionary (aka map) | -| `construct:linked-list` | A linked list (special case of `construct:list`) | -| `construct:list` | A list | -| `construct:queue` | A queue | -| `construct:set` | A set | -| `construct:stack` | A stack | +| Tag | Description | +| ----------------------------------- | --------------------------------------------------- | +| `construct:array` | An array | +| `construct:bit-array` | A bit array (similar to an array but works on bits) | +| `construct:dictionary` | A dictionary (aka map) | +| `construct:jagged-array` | A jagged array (an array of arrays) | +| `construct:linked-list` | A linked list (special case of `construct:list`) | +| `construct:list` | A list | +| `construct:multi-dimensional-array` | An array with multiple dimensions | +| `construct:queue` | A queue | +| `construct:set` | A set | +| `construct:stack` | A stack | #### Notation @@ -249,3 +282,4 @@ As this category is language-specific, there are no commonly used tags here. [functional-programming]: https://en.wikipedia.org/wiki/Functional_programming [procedural-programming]: https://en.wikipedia.org/wiki/Procedural_programming [programming-paradigms]: https://en.wikipedia.org/wiki/Programming_paradigm +[stack-oriented-programming]: https://en.wikipedia.org/wiki/Stack-oriented_programming