-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
229 lines (202 loc) · 10.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Rules Engine for .NET | NRules </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Rules Engine for .NET | NRules ">
<link rel="icon" href="images/logo.png">
<link rel="stylesheet" href="public/docfx.min.css">
<link rel="stylesheet" href="public/main.css">
<meta name="docfx:navrel" content="toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="">
<meta name="docfx:docurl" content="https://github.com/NRules/NRules/blob/main/docs/index.md/#L1">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
<meta name="loc:searchNoResults" content="No results for "{query}"">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="index.html">
<img id="logo" class="svg" src="images/logo.png" alt="NRules">
NRules
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="content">
<div class="actionbar">
<nav id="breadcrumb"></nav>
</div>
<article data-uid="">
<h1 id="rules-engine-for-net">Rules Engine for .NET</h1>
<p>NRules is an open source rules engine for .NET that is based on the <a href="http://en.wikipedia.org/wiki/Rete_algorithm">Rete</a> matching algorithm. Rules are authored in C# using internal DSL.</p>
<p>NRules is also an inference engine, where, unlike with scripting engines, there is no predefined order in which rules are executed.
Instead, inference engine figures out which rules should be activated based on the facts given to it, and then executes them according to a conflict resolution algorithm. Among other features, NRules supports forward chaining, complex fact queries, negative, existential and universal quantifiers.</p>
<p>To learn more, go to the corresponding sections of the NRules documentation.</p>
<h2 id="getting-started">Getting Started</h2>
<p>To install NRules, get the package from nuget</p>
<div class="tabGroup" id="tabgroup_1">
<ul role="tablist">
<li role="presentation">
<a href="#tabpanel_1_cli" role="tab" aria-controls="tabpanel_1_cli" data-tab="cli" tabindex="0" aria-selected="true">CLI</a>
</li>
<li role="presentation">
<a href="#tabpanel_1_pm" role="tab" aria-controls="tabpanel_1_pm" data-tab="pm" tabindex="-1">Package Manager</a>
</li>
</ul>
<section id="tabpanel_1_cli" role="tabpanel" data-tab="cli">
<pre><code class="lang-console">> dotnet add package NRules
</code></pre>
</section>
<section id="tabpanel_1_pm" role="tabpanel" data-tab="pm" aria-hidden="true" hidden="hidden">
<pre><code class="lang-console">> Install-Package NRules
</code></pre>
</section>
</div>
<p>Use the following resources to get up and running with NRules</p>
<ul>
<li><a href="articles/getting-started.html">Getting Started Guide</a></li>
<li><a href="articles/architecture.html">Documentation</a></li>
<li><a href="api/index.html">API Documentation</a></li>
</ul>
<h2 id="getting-help">Getting Help</h2>
<p>Use the following discussion and Q&A platforms to get help with NRules</p>
<ul>
<li><a href="https://github.com/NRules/NRules/discussions">Discussions</a></li>
<li><a href="https://stackoverflow.com/questions/tagged/nrules">Stack Overflow</a></li>
</ul>
<h2 id="getting-the-right-package">Getting the Right Package</h2>
<p>Choose the right package from the NRules suite, depending on your needs and the project structure</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Nuget</th>
<th>Overview</th>
<th>Documentation</th>
</tr>
</thead>
<tbody>
<tr>
<td>NRules</td>
<td><a href="https://nuget.org/packages/NRules"><img src="https://img.shields.io/nuget/v/NRules" alt="NuGet"></a></td>
<td>Meta package that installs the canonical rules model, fluent DSL and the engine runtime. Reference this package from the projects that don't separate rules from the application code.</td>
<td><a href="articles/getting-started.html">Guide</a></td>
</tr>
<tr>
<td>NRules.Runtime</td>
<td><a href="https://nuget.org/packages/NRules.Runtime"><img src="https://img.shields.io/nuget/v/NRules.Runtime" alt="NuGet"></a></td>
<td>Rules engine runtime. Reference this package from the projects that compile and execute rules.</td>
<td><a class="xref" href="api/NRules.html">API</a></td>
</tr>
<tr>
<td>NRules.Fluent</td>
<td><a href="https://nuget.org/packages/NRules.Fluent"><img src="https://img.shields.io/nuget/v/NRules.Fluent" alt="NuGet"></a></td>
<td>Fluent DSL for NRules. Reference this package from the projects that contain rules.</td>
<td><a class="xref" href="api/NRules.Fluent.html">API</a></td>
</tr>
<tr>
<td>NRules.RuleModel</td>
<td><a href="https://nuget.org/packages/NRules.RuleModel"><img src="https://img.shields.io/nuget/v/NRules.RuleModel" alt="NuGet"></a></td>
<td>Canonical rules model. Reference this package from the projects that deal with the intermediate rules representation. This package is transitively referenced by most other NRules packages.</td>
<td><a class="xref" href="api/NRules.RuleModel.html">API</a></td>
</tr>
<tr>
<td>NRules.Json</td>
<td><a href="https://nuget.org/packages/NRules.Json"><img src="https://img.shields.io/nuget/v/NRules.Json" alt="NuGet"></a></td>
<td>Rules serialization to and from JSON. Reference this package from the projects that handle rules serialization.</td>
<td><a href="articles/advanced/json-serialization.html">Guide</a> <a class="xref" href="api/NRules.Json.html">API</a></td>
</tr>
<tr>
<td>NRules.Testing</td>
<td><a href="https://nuget.org/packages/NRules.Testing"><img src="https://img.shields.io/nuget/v/NRules.Testing" alt="NuGet"></a></td>
<td>Rules unit testing and expectations assertion. Reference this package from the projects that implement rules unit tests.</td>
<td><a href="articles/unit-testing-rules.html">Guide</a> <a class="xref" href="api/NRules.Testing.html">API</a></td>
</tr>
</tbody>
</table>
<h2 id="building-from-source">Building from Source</h2>
<p>To build NRules from the source code, clone the repo from GitHub, make sure <a href="https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell">PowerShell</a> is installed, then run the build script</p>
<div class="tabGroup" id="tabgroup_2">
<ul role="tablist">
<li role="presentation">
<a href="#tabpanel_2_windows" role="tab" aria-controls="tabpanel_2_windows" data-tab="windows" tabindex="0" aria-selected="true">Windows</a>
</li>
<li role="presentation">
<a href="#tabpanel_2_nix" role="tab" aria-controls="tabpanel_2_nix" data-tab="nix" tabindex="-1">MacOS/Linux</a>
</li>
</ul>
<section id="tabpanel_2_windows" role="tabpanel" data-tab="windows">
<pre><code class="lang-console">> .\build.bat [Target] [Component]
</code></pre>
</section>
<section id="tabpanel_2_nix" role="tabpanel" data-tab="nix" aria-hidden="true" hidden="hidden">
<pre><code class="lang-console">> ./build.sh [Target] [Component]
</code></pre>
</section>
</div>
<p>Default target is <code>Build</code>.</p>
<p>Default component is <code>Core</code>. Use the following components to build other parts of the engine</p>
<ul>
<li><code>All</code> - build everything</li>
<li><code>Core</code> - build the rules engine, NRules.Testing and NRules.Json</li>
<li><code>Visualizer</code> - build debugger visualizer (Windows only)</li>
<li><code>Integration</code> - build integration libraries</li>
<li><code>Samples</code> - build samples</li>
<li><code>Benchmark</code> - build performance benchmarks</li>
<li><code>Documentation</code> - build documentation</li>
</ul>
<p>Built artifacts are found under the <code>build</code> folder.</p>
<h2 id="contributing">Contributing</h2>
<p>Clone NRules on <a href="https://github.com/NRules/NRules">GitHub</a>.</p>
<p>See <a href="https://github.com/NRules/NRules/blob/main/CONTRIBUTING.md">Contributor Guide</a> for the guidelines on how to contribute to the project.</p>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/NRules/NRules/blob/main/docs/index.md/#L1" class="edit-link">Edit this page</a>
</div>
<div class="next-article d-print-none border-top" id="nextArticle"></div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Copyright © 2012-2025 <a href="https://github.com/snikolayev">Sergiy Nikolayev</a> under the <a href="https://raw.github.com/NRules/NRules/main/LICENSE.txt">MIT license</a>.</span>
</div>
</div>
</footer>
</body>
</html>