mustache/tla/plc_define_run.mustache in tla-sbuilder-0.1.0 vs mustache/tla/plc_define_run.mustache in tla-sbuilder-0.2.1
- old
+ new
@@ -28,15 +28,13 @@
Recurse one level down in 'inputParam' using keys 'bindDefs._key.key'.
Recursion is done only if 'bindDefs' defines field '_key'.
- Should be implemented using recursion, but at the time of writing this comment could not make it work.
-
*)
RECURSIVE ProcessParameterEnables( _, _ )
- ProcessParameterEnables( inputParam, bindDefs ) == ( \A key \in { k \in DOMAIN bindDefs : k # "_key" /\ k # "_rows" }: bindDefs[key] = inputParam[key] )
- /\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_key" }: \A r \in bindDefs[reckey] : ProcessParameterEnables( inputParam[r.key], r.rec ) )
+ ProcessParameterEnables( inputParam, bindDefs ) == ( \A key \in { k \in DOMAIN bindDefs : Len(k)<4 \/ (SubSeq(k,1,4) # "_key" /\ k # "_rows" )}: bindDefs[key] = inputParam[key] )
+ /\ ( \A reckey \in { k \in DOMAIN bindDefs : Len(k)>3 /\SubSeq(k,1,4) = "_key" }: \A r \in bindDefs[reckey] : ProcessParameterEnables( inputParam[r.key], r.rec ) )
/\ ( \A reckey \in { k \in DOMAIN bindDefs : k = "_rows" }: \A r \in bindDefs[reckey] :
Cardinality( r.set ) = Cardinality( inputParam[r.key] ) /\ \A bDef \in r.set: \E ip \in inputParam[r.key]: ProcessParameterEnables( ip, bDef )
)