News for hackers. Stuff that matters.
Re:Statecharts: A visual formalism for complex systems [pdf] by dukoid on Sunday January 19, 2020 @06:30PM (#22094913)
They are not powerful enough to model complex UIs. In terms of expressiveness, state machines are equivalent to regular expressions. That's why I find the title quite misleading. They may be useful to some extent for very simple UIs (for instance, Siemens Mobile has used them to model mobile phone (app) UIs).
Re:Statecharts: A visual formalism for complex systems [pdf] by emmanueloga_ on Sunday January 19, 2020 @06:57PM (#22095063)
Statecharts _builds upon_ state machines, but is a more powerful language to model a system's state than FSMs or regular expressions. There's a good explanation here [1].

1: https://stackoverflow.com/a/40679958/855105

Re:Statecharts: A visual formalism for complex systems [pdf] by dukoid on Sunday January 19, 2020 @08:18PM (#22095446)
What's their expressiveness? I always thought the nesting could be "flattened", so it wouldn't really make a difference?
Re:Statecharts: A visual formalism for complex systems [pdf] by emmanueloga_ on Sunday January 19, 2020 @09:23PM (#22095756)
Flattening the nested states would produce an explosion of states. This page describes how Statecharts avoids that [1].

In regard to expressivity, specially compared with FSM, a thorough description can be find in the paper "On Visual Formalisms" [2]. I copy some points here for convenience:

...people working on the design of really complex systems have all but given up on the use of conventional FSMs and their state diagrams for several reasons

(1) State diagrams are “flat.” They provide no natural notion of depth, hierarchy, or modularity + orthogonality + broadcast communication.

(2) State diagrams are uneconomical when it comes to transitions [...] resulting in an unnecessary multitude of arrows.

(3) State diagrams are [...] infeasible: as the system under description grows linearly, the number of states grows exponentially.

(4) State diagrams are inherently sequential in nature and do not cater for concurrency in a natural way.

1: https://statecharts.github.io/state-machine-state-explosion....

2: http://www.dcs.ed.ac.uk/home/kxt/on_visual_formalisms.pdf

Re:Statecharts: A visual formalism for complex systems [pdf] by mcphage on Sunday January 19, 2020 @09:27PM (#22095769)
State charts have parallel states, which require an exponential number of states with a finite state machine. And it supports history—returning to a container state can return to the last entered state in that container, whichever it was—I’m not sure if finite state machines can support that or not. Maybe they can, but again, it would vastly explode the state space.
Re:Statecharts: A visual formalism for complex systems [pdf] by brucou on Wednesday January 22, 2020 @07:48PM (#22123730)
State machines are a generic term. You will find here the different kinds of state machines, with varying expressive power that are used in computer science and actuak programming: https://github.com/achou11/state-machines

In any case, keep in mind that Turing machines are (extended) state machines (albeit with infinite memory) so the expressive power of state machine is at least anything computable (sequentially - turing machine is a model of sequential computation).

Re:Statecharts: A visual formalism for complex systems [pdf] by TFortunato on Sunday January 19, 2020 @06:47PM (#22095006)
Statecharts are not the same as simple Finite State Machines.