nishantparekh01 / Solidity_to_EFSM

casino conversion
0 stars 0 forks source link

Argument value in placeBet _guess should convert to a guard representing possible assignment of _guess #41

Closed nishantparekh01 closed 4 weeks ago

nishantparekh01 commented 2 months ago

the placeBet function has _guess as a parameter. And we must generate a guard representing the possible assignment of this parameter. Result : _guess==HEADS | _guess==TAILS

What to do ?

  1. Check for parameters in FunctionDefinition.
  2. If parameter is present then create a dictionary of list of parameters. The key is parameter and value is type of parameter. COIN in this case.
  3. Then generate one transition for each key, where the guard of the transition will represent possible assignment of these parameters. Not sure if we can run a for loop on dictionary in python.
  4. Add each transition to automata.
nishantparekh01 commented 4 weeks ago

Completed. Check commit b407c47edf4c896ca35f25e7af114a64460df40b