Fork me on GitHub
#clara
<
2017-06-10
>
mikegai00:06:49

@jfntn modeling a statechart should be no problem within a single session -- you just need to gate each rule controlling exit/enter with a "gating condition" that matches the current state.

mikegai00:06:51

The state chart syntax you supplied could be operated over and expanded to a set of rules, each of which begins with matching the state from which those entry/exits apply

mikegai00:06:45

Maybe something like this (in tuple / #precept syntax instead of default Clara):

(def-tuple-rule ready-exit-missing-password
  [[:app :state :login]]
  [[:login :state :ready]]
  [[_ :missing-email]]
  =>
  (insert-unconditional! [[:login :state :password-error]]))

mikegai00:06:42

a macro would expand the concise statechart syntax to rules like that.

mikegai00:06:20

and then of course you could define/derive :missing-email elsewhere

mikegai00:06:52

@jfntn do I have what you're thinking right?