Skip to content

Commit dc10294

Browse files
committedAug 25, 2018
Add some motivation to the readme
1 parent c043034 commit dc10294

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 

‎README.md

+24
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
See [Three-valued logic](https://en.wikipedia.org/wiki/Three-valued_logic).
44

5+
# Motivation
6+
7+
Some problems are very awkwardly expressed in two-valued logic, mostly
8+
when we are dealing with uncertainty.
9+
10+
A typical example is flow analysis. Consider this piece of elisp
11+
code:
12+
13+
``` emacs-lisp
14+
(let (a)
15+
(if x
16+
(setq a "a was set")
17+
(message "we do nothing"))
18+
a) ;; what is a?
19+
```
20+
21+
If we now ask a question "is `a` a string?" the answer is not
22+
"definitely yes" nor "definitely no" but "maybe" because without
23+
knowing what `x` is we can't tell.
24+
25+
This and many more use-cases can be found in
26+
[Elsa](https://github.com/emacs-elsa/Elsa), the Emacs Lisp Static
27+
Analyzer.
28+
529
# API
630

731
## Constructors

0 commit comments

Comments
 (0)