-
-
Save marco-martins/86766f410b68c206ec5b14d747176814 to your computer and use it in GitHub Desktop.
MPP Homework Lecture 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"valueParameterInfo":[["Bank Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}],["Client Deposit",{"valueParameterFormat":{"contents":[6,""],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"timeParameterDescriptions":[["Bank Deposit Timeout",""],["Client Deposit Timeout 1",""]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Bank") | |
(Token "" "") | |
(ConstantParam "Bank Deposit") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Client Deposit") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Client Deposit") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Client Deposit") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Client Deposit") | |
) | |
(When | |
[Case | |
(Deposit | |
(Role "Bank") | |
(Role "Client") | |
(Token "" "") | |
(ConstantParam "Client Deposit") | |
) | |
(If | |
(ValueEQ | |
(AvailableMoney | |
(Role "Bank") | |
(Token "" "") | |
) | |
(AddValue | |
(ConstantParam "Bank Deposit") | |
(MulValue | |
(ConstantParam "Client Deposit") | |
(Constant 5) | |
) | |
) | |
) | |
(Pay | |
(Role "Bank") | |
(Account (Role "Client")) | |
(Token "" "") | |
(AddValue | |
(ConstantParam "Bank Deposit") | |
(MulValue | |
(ConstantParam "Client Deposit") | |
(Constant 5) | |
) | |
) | |
Close | |
) | |
Close | |
)] | |
(TimeParam "Client Deposit Timeout") | |
Close | |
)] | |
(TimeParam "Client Deposit Timeout") | |
Close | |
)] | |
(TimeParam "Client Deposit Timeout") | |
Close | |
)] | |
(TimeParam "Client Deposit Timeout") | |
Close | |
)] | |
(TimeParam "Client Deposit Timeout") | |
Close | |
)] | |
(TimeParam "Bank Deposit Timeout") | |
Close |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment