CacheControl / CacheControl/json-rules-engine
Find unused facts
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
Is it possible to retrieve a list of facts which were not used / triggered by any rule in the engine?
Pseudo code:
```
facts = {
A: true,
B: false,
C: true,
D: false
}
rule = {
check if A == true ?
}
engine(rule).run(facts)
```
I want to retrieve facts which were not used by this rule (`B, C, D`)
This is an atypical request I guess. :)
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no files or tests; start at the engine(rule).run(facts) entry point and trace how facts are evaluated against a rule. Define how unused facts such as B, C, and D would be reported, then add coverage for the pseudocode scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100