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
23 changes: 23 additions & 0 deletions docs-out/.work/cf/T210.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"cfs": [],
"deviations": [
{
"id": "DEV-SB-090",
"baseline_behavior": "ScriptBlock can become a PowerShell object and a steppable pipeline.",
"proposed_behavior": "Omitted initially.",
"benefit": "Less surface.",
"compatibility_cost": "No GetPowerShell/GetSteppablePipeline.",
"affected_cfs": [],
"status": "PROPOSED"
},
{
"id": "DEV-FEAT-091",
"baseline_behavior": "workflow/parallel/sequence/inlinescript parse and then fail in semantic checks; from/define/var are reserved.",
"proposed_behavior": "Reject at parse time.",
"benefit": "No dead syntax.",
"compatibility_cost": "Different error text.",
"affected_cfs": [],
"status": "PROPOSED"
}
]
}
14 changes: 14 additions & 0 deletions docs-out/.work/cf/T211.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"cfs": [],
"deviations": [
{
"id": "DEV-TOOLS-100",
"baseline_behavior": "PSParser.Tokenize returns PowerShell 2 style tokens by rewriting the saved token list.",
"proposed_behavior": "Only the modern token list.",
"benefit": "No V2 branches in the parser.",
"compatibility_cost": "Legacy tools unsupported.",
"affected_cfs": [],
"status": "PROPOSED"
}
]
}
23 changes: 23 additions & 0 deletions docs-out/.work/cf/T26.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"cfs": [],
"deviations": [
{
"id": "DEV-BIND-050",
"baseline_behavior": "Member access goes through COM and ETS-adapter aware binders.",
"proposed_behavior": "Plain reflection member lookup; no COM binders.",
"benefit": "Smaller binder layer.",
"compatibility_cost": "No COM objects.",
"affected_cfs": [],
"status": "PROPOSED"
},
{
"id": "DEV-RTOPS-051",
"baseline_behavior": "Classes are emitted with Reflection.Emit and method bodies wrapped by ScriptBlockMemberMethodWrapper.",
"proposed_behavior": "Classes are interpreter objects, not CLR types.",
"benefit": "No Reflection.Emit dependency.",
"compatibility_cost": "Classes are not usable from other .NET code.",
"affected_cfs": [],
"status": "PROPOSED"
}
]
}
54 changes: 54 additions & 0 deletions docs-out/.work/cf/T28.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"cfs": [
{
"id": "CF-OP-001",
"subject": "operator precedence and associativity",
"statement": "**Operator precedence and associativity.** Binary operators are parsed by precedence climbing and **all are left-associative**; from lowest to highest precedence the levels are: logical (`-and`, `-or`, `-xor`) = 1; bitwise (`-band`, `-bor`, `-bxor`) = 2; comparison group (all `-eq`/`-ne`/`-gt`/`-ge`/`-lt`/`-le`, `-like`, `-match`, `-replace`, `-contains`, `-in` families with their `i`/`c` variants, `-is`, `-isnot`, `-as`, `-split`, `-join`, `-shl`, `-shr`) = 5; null-coalescing `??` = 7; additive (`+`, `-`) = 9; multiplicative (`*`, `/`, `%`) = 10; format `-f` = 12; range `..` = 13. The comma (array-literal) operator binds tighter than every binary operator; the unary operators, casts and `++`/`--` bind tighter than the comma; the ternary `?:` (right-nested) and assignment (`=`, `+=`, `-=`, `*=`, `/=`, `%=`, `??=`, parsed at statement level with a statement on the right) bind looser than all binary operators; `&&` and `||` chain pipelines and are not expression operators. Operators spelled with a leading dash are recognized as operators only when the tokenizer is in expression mode.",
"label": "FACT-SRC",
"evidence": [
"src/System.Management.Automation/engine/parser/Parser.cs::Parser.BinaryExpressionRule@L6798-L6950",
"src/System.Management.Automation/engine/parser/token.cs::TokenFlags@L601-L752"
],
"owner": "02-language/OPERATOR-TABLE.md",
"status": "open"
},
{
"id": "CF-CNV-001",
"subject": "conversion algorithm and converter order",
"statement": "**Conversion algorithm and converter order.** For a source type S and target type T the engine returns the first applicable converter in this order (cached per type pair): (1) a cached entry; (2) if S is the null type: `Nullable<\u2026>` \u2192 null, any reference type \u2192 null, a value type \u2192 no conversion (numeric, `char`, `string`, `bool`, `PSReference`, `switch` and `void` targets have pre-cached null conversions); (3) if T is assignable from S: identity (same type) or assignable; (4) by-ref-like types: none; (5) S is a `PSObject`: none (the caller unwraps first); (6) T is `PSObject`: wrap; (7) under Constrained Language Mode: only targets `object`, `object[]` or the core type list are converted (others are refused, or only audited in WDAC audit mode); (8) **language conversions**: `Nullable<U>` through U, `void`, `bool` (from `IList`, enum, value type, class), `string`, arrays (related arrays element-wise, unrelated arrays per element, enumerable to array, scalar to one-element array), `Array`, `Hashtable` from `IDictionary`, `PSReference`, `XmlDocument`, `StringCollection`, `ScriptBlock` to delegate, `PSCustomObject`, integer to enum, `PSMethod` to delegate; (9) a static `Parse` method on T; (10) a static `Create` method; (11) a constructor of T taking S; (12) a cast operator (implicit, then explicit) on S or T; (13) `IConvertible` (numeric sources through the string-convertible path, other `IConvertible` sources via `Convert`); (14) for an `IDictionary` source: T's no-argument constructor then property assignment from the keys; (15) an `IEnumerable` constructor; (16) property-based conversion; if S or T may have a `TypeConverter`/`PSTypeConverter`, or a value-dependent converter was found, the result is wrapped to try the custom/value-dependent converter first and the found converter second; (17) otherwise no conversion (rank `None`, a failing converter that raises `PSInvalidCastException`). Numeric-to-numeric, number-to-string, number-to-bool and null-to-number conversions are pre-cached with fixed ranks.",
"label": "FACT-SRC",
"evidence": [
"src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.FigureConversion@L5641-L5828",
"src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.FigureLanguageConversion@L4966-L5120"
],
"owner": "02-language/CONVERSION-RULES.md",
"status": "open"
},
{
"id": "CF-PIP-001",
"subject": "output unrolling and enumeration rules",
"statement": "**Output unrolling and enumeration rules.** A value is *enumerated* (treated as a sequence) when, after unwrapping `PSObject`: it is `AutomationNull` (empty sequence), an array, a `DataTable` (its rows), a COM enumerable, any other `IEnumerable` that is not a string, `IDictionary` or `XmlNode` (the generic `IEnumerable<T>` enumerator is preferred), or an `IEnumerator`; `null`, strings, dictionaries (hashtables), `XmlNode` and all other objects are **not** enumerated and are single values. When a statement writes its value to the output pipe: `AutomationNull` writes nothing; a non-enumerable value is written as one object (mutable value types are copied first); an enumerable value is **unrolled exactly one level**: each element is written separately (elements that are themselves collections stay whole), and an enumerator is disposed afterwards if the engine created it.",
"label": "FACT-SRC",
"evidence": [
"src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSEnumerableBinder.FallbackConvert@L580-L698",
"src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSPipeWriterBinder@L841-L926",
"src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::EnumerableOps.WriteEnumerableToPipe@L3623-L3640"
],
"owner": "02-language/02.6-types-and-operators.md",
"status": "open"
}
],
"deviations": [
{
"id": "DEV-TYP-070",
"baseline_behavior": "Constrained Language Mode restricts conversion targets inside FigureConversion.",
"proposed_behavior": "No language mode in the conversion layer; allow-list at the type-system boundary.",
"benefit": "Simpler conversion code.",
"compatibility_cost": "No Constrained Language Mode.",
"affected_cfs": [
"CF-CNV-001"
],
"status": "PROPOSED"
}
]
}
41 changes: 41 additions & 0 deletions docs-out/.work/cf/T29.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"cfs": [
{
"id": "CF-SCP-001",
"subject": "scope, variable lookup and assignment rules",
"statement": "**Scope, lookup and assignment rules.** A variable name is parsed into an optional scope qualifier (`global:`, `local:`, `script:`, `private:`) or a provider drive (`name:`), and an unqualified name. **Reading:** an unqualified name is searched in the current scope and then in each parent scope up to the global scope, and the first match wins; a variable marked `Private` is skipped when it is found in any scope other than the current one; `global:`, `local:`/`private:` and `script:` search exactly one scope (the global scope, the current scope, the script scope respectively); inside one scope the compiled locals tuple (and any dot-sourced tuples) is checked before the variable table; a drive-qualified name is read through the provider. A name that is not found yields `$null`, or a `VariableIsUndefined` error under strict mode (version 2: always; version 1: except inside expandable strings). **Writing:** an unqualified or `local:`/`private:` assignment always targets the current scope (a parent's variable of the same name is never modified; a new local variable is created if the current scope has none), `script:` and `global:` target the script and global scope; assigning to an existing variable in the target scope keeps its object and replaces its value after running its attributes (transformation, then validation), and a `ReadOnly` or `Constant` variable cannot be written (`VariableNotWritable`; `-Force` can overwrite `ReadOnly` but never `Constant`). **New scopes:** every function or script block call (not dot-sourcing) creates a child scope whose parent is the caller's scope; the script scope is the nearest enclosing scope created for a script file, or the global scope; variables marked `AllScope` are shared by reference with every new scope. **Dot-sourcing** creates no scope: the callee's locals tuple is pushed onto the current scope's `DottedScopes` for the duration of the call.",
"label": "FACT-SRC",
"evidence": [
"src/System.Management.Automation/engine/ScopedItemSearcher.cs::VariableScopeItemSearcher@L244-L297",
"src/System.Management.Automation/engine/SessionStateScope.cs::SessionStateScope.SetVariable@L401-L518",
"src/System.Management.Automation/engine/runtime/Operations/VariableOps.cs::VariableOps.SetVariableValue@L19-L120",
"src/System.Management.Automation/engine/SessionStateScopeAPIs.cs::SessionStateInternal.NewScope@L227-L240",
"src/System.Management.Automation/engine/ExecutionContext.cs::ExecutionContext.IsStrictVersion@L117-L143"
],
"owner": "02-language/SCOPE-AND-VARIABLES.md",
"status": "open"
}
],
"deviations": [
{
"id": "DEV-SCP-080",
"baseline_behavior": "Values assigned to global variables are marked untrusted in Constrained Language Mode.",
"proposed_behavior": "No trust marking.",
"benefit": "Simpler assignment path.",
"compatibility_cost": "No Constrained Language Mode.",
"affected_cfs": [
"CF-SCP-001"
],
"status": "PROPOSED"
},
{
"id": "DEV-CTX-081",
"baseline_behavior": "ExecutionContext carries language mode and invalidates binder caches on change.",
"proposed_behavior": "No language modes.",
"benefit": "No cache invalidation logic.",
"compatibility_cost": "No restricted modes.",
"affected_cfs": [],
"status": "PROPOSED"
}
]
}
6 changes: 6 additions & 0 deletions docs-out/.work/claims/T26.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{"id": "CLM-RTOPS-0001", "subject_key": "erroraction.default", "predicate": "ErrorActionPreference default in statement error handling", "value": "Continue", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::ExceptionHandlingOps@L1460-L2197"], "doc": "LANG-RTOPS-001", "cf": null}
{"id": "CLM-RTOPS-0002", "subject_key": "erroraction.throw_statement", "predicate": "exception from a throw statement without traps", "value": "rethrown", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::ExceptionHandlingOps@L1460-L2197"], "doc": "LANG-RTOPS-001", "cf": null}
{"id": "CLM-RTOPS-0003", "subject_key": "trap.continue", "predicate": "continue inside a trap", "value": "SilentlyContinue", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::ExceptionHandlingOps@L1460-L2197"], "doc": "LANG-RTOPS-001", "cf": null}
{"id": "CLM-RTOPS-0004", "subject_key": "loopflow.empty_label", "predicate": "empty break/continue label", "value": "matches any loop", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/lang/parserutils.cs::LoopFlowException@L36-L67"], "doc": "LANG-RTOPS-001", "cf": null}
{"id": "CLM-RTOPS-0005", "subject_key": "hashtable.literal.duplicate", "predicate": "duplicate or null key in hashtable literal", "value": "runtime error", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::HashtableOps@L1402-L1458"], "doc": "LANG-RTOPS-001", "cf": null}
{"id": "CLM-RTOPS-0006", "subject_key": "binder.count", "predicate": "binder classes in dataset", "value": "30", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSBinaryOperationBinder@L2119-L3422"], "doc": "LANG-RTOPS-001", "cf": null}
16 changes: 16 additions & 0 deletions docs-out/.work/claims/T28.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{"id": "CLM-TYP-0001", "subject_key": "enumeration.string", "predicate": "string is enumerated by PSEnumerableBinder", "value": "false", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSEnumerableBinder.FallbackConvert@L580-L698"], "doc": "LANG-TYPES-001", "cf": "CF-PIP-001"}
{"id": "CLM-TYP-0002", "subject_key": "enumeration.dictionary", "predicate": "IDictionary is enumerated", "value": "false", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSEnumerableBinder.FallbackConvert@L580-L698"], "doc": "LANG-TYPES-001", "cf": "CF-PIP-001"}
{"id": "CLM-TYP-0003", "subject_key": "output.unroll_depth", "predicate": "pipe write unrolls enumerables by", "value": "one level", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::EnumerableOps.WriteEnumerableToPipe@L3623-L3640"], "doc": "LANG-TYPES-001", "cf": "CF-PIP-001"}
{"id": "CLM-TYP-0004", "subject_key": "arith.int_overflow", "predicate": "int add/sub/mul overflow result type", "value": "double", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/NumericOps.cs::IntOps@L15-L129"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0005", "subject_key": "arith.int_divide", "predicate": "int/int result", "value": "int if exact else double", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/NumericOps.cs::IntOps@L15-L129"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0006", "subject_key": "arith.zero_divide", "predicate": "division by zero", "value": "RuntimeException", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/NumericOps.cs::IntOps@L15-L129"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0007", "subject_key": "truthiness.string", "predicate": "string truthiness", "value": "non-empty", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.IsTrue@L980-L1018"], "doc": "LANG-TYPES-001", "cf": "CF-CNV-001"}
{"id": "CLM-TYP-0008", "subject_key": "truthiness.list", "predicate": "single-element list truthiness", "value": "truthiness of the element (list element: non-empty)", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.IsTrue@L980-L1018"], "doc": "LANG-TYPES-001", "cf": "CF-CNV-001"}
{"id": "CLM-TYP-0009", "subject_key": "pipelineresult.bool", "predicate": "captured pipeline result to bool", "value": "0:false, 1:element as bool, >1:true", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSPipelineResultToBoolBinder@L1119-L1178"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0010", "subject_key": "destructuring.shape", "predicate": "array destructuring with more values than targets", "value": "last target receives the remaining values as a slice", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Binding/Binders.cs::PSArrayAssignmentRHSBinder@L935-L1042"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0011", "subject_key": "convert.double_format", "predicate": "double to string format", "value": "G15 (invariant)", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives@L308-L309"], "doc": "LANG-TYPES-001", "cf": "CF-CNV-001"}
{"id": "CLM-TYP-0012", "subject_key": "convert.string_to_number", "predicate": "string to number uses", "value": "Parser.ScanNumber", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.TryScanNumber@L2882-L2900"], "doc": "LANG-TYPES-001", "cf": "CF-CNV-001"}
{"id": "CLM-TYP-0013", "subject_key": "convert.constrained_gate", "predicate": "constrained language conversion targets", "value": "object, object[] or CoreTypes only", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/LanguagePrimitives.cs::LanguagePrimitives.FigureConversion@L5641-L5828"], "doc": "LANG-TYPES-001", "cf": "CF-CNV-001"}
{"id": "CLM-TYP-0014", "subject_key": "operator.precedence.levels", "predicate": "binary precedence levels", "value": "logical1 bitwise2 comparison5 coalesce7 add9 multiply10 format12 range13", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/parser/token.cs::TokenFlags@L601-L752"], "doc": "LANG-TYPES-001", "cf": "CF-OP-001"}
{"id": "CLM-TYP-0015", "subject_key": "repeat.restricted_cap", "predicate": "string/array repetition cap in RestrictedLanguage", "value": "1024", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/StringOps.cs::StringOps@L15-L107"], "doc": "LANG-TYPES-001", "cf": null}
{"id": "CLM-TYP-0016", "subject_key": "hashtable.add.comparer", "predicate": "hashtable + hashtable comparer", "value": "CurrentCultureIgnoreCase", "label": "FACT-SRC", "evidence": ["src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs::HashtableOps@L1402-L1458"], "doc": "LANG-TYPES-001", "cf": null}
Loading
Loading