exemplo_fatorial.ivph 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. "testcases" : [
  3. ]
  4. }
  5. ::algorithm::
  6. {
  7. "functions":[{
  8. "type":"function","name":"inicio","return_type":"void","return_dimensions":0,"parameters_list":[],"is_main":true,"is_hidden":false,"variables_list":[{
  9. "type":"integer","name":"n","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},{
  10. "type":"integer","name":"fat","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},{
  11. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0}],"function_comment":{
  12. "type":"comment","comment_text":"Esta é a função principal..."},"commands":[{
  13. "type":"reader","variable_value_menu":{
  14. "type":"var_value","variable_and_value":1,"content":{
  15. "type":"integer","name":"n","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0}},{
  16. "type":"repeatNtimes","var_attribution":{
  17. "type":"var_value","variable_and_value":1,"content":{
  18. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0},"var_incrementation":{
  19. "type":"var_value","variable_and_value":1,"content":{
  20. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0},"expression1":{
  21. "type":"var_value","variable_and_value":7,"content":"2","row":null,"column":null,"include_constant":true,"dimensions":0},"expression2":{
  22. "type":"exp_conditional","expression":{
  23. "type":"exp_arithmetic","first_operand":{
  24. "type":"var_value","variable_and_value":1,"content":{
  25. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0},"second_operand":{
  26. "type":"var_value","variable_and_value":7,"content":{
  27. "type":"integer","name":"n","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":true,"dimensions":0},"operator":"less_than_or_equals_to"}},"expression3":{
  28. "type_exp":"exp_op_exp","itens":[{
  29. "type":"var_value","variable_and_value":1,"content":{
  30. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0},"plus",{
  31. "type":"var_value","variable_and_value":7,"content":"1","row":null,"column":null,"include_constant":true,"dimensions":0}]},"commands_block":[{
  32. "type":"attribution","variable":{
  33. "type":"var_value","variable_and_value":1,"content":{
  34. "type":"integer","name":"fat","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":false,"dimensions":0},"expression":[{
  35. "type_exp":"op_exp","itens":["none",{
  36. "type_exp":"exp_op_exp","itens":[{
  37. "type":"var_value","variable_and_value":7,"content":{
  38. "type":"integer","name":"fat","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":true,"dimensions":0},"multiplication",{
  39. "type":"var_value","variable_and_value":7,"content":{
  40. "type":"integer","name":"i","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":true,"dimensions":0}]}]}]}]},{
  41. "type":"writer","content":[{
  42. "type":"var_value","variable_and_value":7,"content":{
  43. "type":"integer","name":"fat","value":1,"dimensions":0,"is_constant":false,"rows":0,"columns":0},"row":null,"column":null,"include_constant":true,"dimensions":0}]}]}],"globals":[] }