UnB-CIC / sle-course

A Software Language Engineering Course using Rascal-MPL
2 stars 5 forks source link

singleInitialState #7

Closed luisamaralh closed 5 years ago

luisamaralh commented 5 years ago

An FSM must have exactly one initial state.

FHandrick commented 5 years ago

Acredito que tenha terminado essa implementação.

FHandrick commented 5 years ago

int startElement(startState()) = 1; int startElement(state()) = 0; public int quantityStartState (list[State] ls) = isEmpty(ls) ? 0 : startElement(head(ls))+quantityStartState(tail(ls));

FHandrick commented 5 years ago

Se a quantidade de 'quantityStartState' for maior que 1, a FSM tem mais do que uma estado Inicial

rbonifacio commented 5 years ago

Hi Handrick, would it be possible to use comprehension on the startState(s) of an FSM and then check the resulting number of elements? Nonetheless, I would like to say that there is nothing wrong with your implementations.

FHandrick commented 5 years ago

I will try refactor, using comprehension.