diff options
Diffstat (limited to 'content/zettel/3c3f7.md')
-rw-r--r-- | content/zettel/3c3f7.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/content/zettel/3c3f7.md b/content/zettel/3c3f7.md new file mode 100644 index 0000000..830df58 --- /dev/null +++ b/content/zettel/3c3f7.md @@ -0,0 +1,23 @@ ++++ +title = "Strict evaluation or lazy evaluation of predicates" +date = "2023-02-14" +author = "Yann Herklotz" +tags = [] +categories = [] +backlinks = ["3c3f6"] +forwardlinks = ["3c3f7a"] +zettelid = "3c3f7" ++++ + +Strict evaluation of predicates is the following: + +$$\frac{\theta \vdash p_1 \Downarrow b_1 \qquad \theta \vdash p_2 \Downarrowb_2}{\theta \vdash p_1 \land p_2 \Downarrow b_1 \mathbin{\texttt{\&}} b_2}$$ + +Lazy evaluation of predicates will instead have multiple rules that take +into account when we know the result of the computation: + +$$\frac{\theta \vdash p_1 \Downarrow \perp}{\theta \vdash p_1 \land p_2 \Downarrow \perp}$$ + +$$\frac{\theta \vdash p_2 \Downarrow \perp}{\theta \vdash p_1 \land p_2 \Downarrow \perp}$$ + +$$\frac{\theta \vdash p_1 \Downarrow \top \qquad \theta \vdash p_2 \Downarrow \top}{\theta \vdash p_1 \land p_2 \Downarrow \top}$$ |