-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sematics of "andor" differs from expected by the reader (no mention that it is satisfaction-dependent) #42
Comments
The semantics aren't an exact representation of the script execution; they encode the conditions under which a script can be satisfied. Say your script is Note that the X argument needs to have property |
I think this should be a footnote or some other clarification in the text so the readers would not be confused. |
Would this sentence be correct?
I'm not sure if it would be a good explanation text for the table, though, it sounds difficult to process mentally. |
Maybe just add a note
|
Prevent reader confusion, as described in sipa#42 where the sematics of "andor" differs from expected by the reader when they consider various executions of the actual script
Prevent reader confusion, as described in sipa#42 where the sematics of "andor" differs from expected by the reader when they consider various executions of the actual script
Prevent reader confusion, as described in sipa#42 where the sematics of "andor" differs from expected by the reader when they consider various executions of the actual script
miniscript/index.html
Lines 251 to 255 in 027b422
For
andor(X,Y,Z)
the semantics is listed as(X and Y) or Z
, while the code[X] NOTIF [Z] ELSE [Y] ENDIF
when applied to the truth table for the three variables does not correspond to the truth table that results from(X and Y) or Z
expression.This can be shown with the following script (using python-bitcoinlib):
the output:
We can see that for
X=1 Y=0 Z=1
the result of(X and Y) or Z
does not correspond to the result of evaluating the script.Either the logical expression in the 'Semantics' column has to be
(X or Z) and ((not X) or Y)
, or the script in theBitcoin script
column has to be changed to have the semantics of(X and Y) or Z
The text was updated successfully, but these errors were encountered: