AIGuiders.Platform.Modeling.Gdl.Expression
0.1.0
dotnet add package AIGuiders.Platform.Modeling.Gdl.Expression --version 0.1.0
NuGet\Install-Package AIGuiders.Platform.Modeling.Gdl.Expression -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AIGuiders.Platform.Modeling.Gdl.Expression" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIGuiders.Platform.Modeling.Gdl.Expression" Version="0.1.0" />
<PackageReference Include="AIGuiders.Platform.Modeling.Gdl.Expression" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AIGuiders.Platform.Modeling.Gdl.Expression --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AIGuiders.Platform.Modeling.Gdl.Expression, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AIGuiders.Platform.Modeling.Gdl.Expression@0.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AIGuiders.Platform.Modeling.Gdl.Expression&version=0.1.0
#tool nuget:?package=AIGuiders.Platform.Modeling.Gdl.Expression&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AIGuiders.Platform.Modeling.Gdl.Expression
A deliberately small expression AST — literals, fact references, comparisons, and boolean operators — for guarded conditions in declarative files.
What you get
ExprNode— the neutral condition tree:LiteralBool/LiteralString/LiteralIntFactRefof string — reference to a named factCompareofExprNode * string * ExprNode— left, string operator, rightAnd/Or/Not
ExprSpan— source position (Line,Column);[<CLIMutable>]for C# constructionParsedExpr— node plus span, also[<CLIMutable>]- Zero package dependencies — a pure type definition assembly
Quick start
open AIGuiders.Platform.Modeling.Gdl.Expression
// "build.failed and not review.open"
let condition : ExprNode =
ExprNode.And(
ExprNode.FactRef "build.failed",
ExprNode.Not(ExprNode.FactRef "review.open"))
let parsed : ParsedExpr =
{ Node = condition
Span = { Line = 3; Column = 7 } }
match parsed.Node with
| ExprNode.And _ -> printfn "guarded rule"
| _ -> ()
Problem
- Declarative files grow guarded conditions:
whenclauses in rule files, visibility conditions in layout decks, preconditions in command catalogs. - Each grammar then either invents its own condition representation or embeds a general-purpose expression engine with far more power (and attack surface) than the grammar needs — and C# and F# consumers cannot share one tree.
Solution
- One deliberately tiny tree covers the whole condition language: three literal kinds, fact refs, a single comparison node, and boolean operators — deterministic, side-effect free, trivially walkable.
[<CLIMutable>]records make the tree friendly to C# consumers; spans keep diagnostics anchored to the source file.- This is the shared expression IR of the GDL family — the expressiveness ceiling for guarded rules is specified in GUIDERS-ADR-0057, and its F# extraction status is tracked in FSHARP-ADR-0003. In this repo the cockpit-logic graph parser (
Modeling.Gdl.Parse.CockpitLogic) produces it andModeling.Cockpit.Rulesevaluates it.
When not to use
- No parser and no evaluator here — this package is only the AST; parsing lives in the
Gdl.Parse.*packages and evaluation belongs to the consumer. - Deliberately no arithmetic, string operations, function calls, or lambdas — if your conditions need those, this ceiling is the wrong tool.
- Comparison operators are unvalidated strings (
">=","=", …); operator semantics are a contract between your parser and evaluator, not this package.
Learn more
- GUIDERS-ADR-0057 — Cockpit logic quarry (expression ceiling)
- FSHARP-ADR-0003 — Model extraction matrix
MIT · Source & issues · part of the Guiders federation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- FSharp.Core (>= 10.1.401)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on AIGuiders.Platform.Modeling.Gdl.Expression:
| Package | Downloads |
|---|---|
|
AIGuiders.Platform.Modeling.Gdl.Parse.CockpitLogic
Cockpit logic quarry IR — annunciation rules, projectors, principles. |
|
|
AIGuiders.Platform.Modeling.Cockpit.Rules
Headless cockpit rule evaluation — traceable rule id + matched when. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 150 | 10/24/2026 |