scrall 0.8.1__tar.gz → 0.8.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of scrall might be problematic. Click here for more details.
- {scrall-0.8.1/src/scrall.egg-info → scrall-0.8.6}/PKG-INFO +1 -1
- {scrall-0.8.1 → scrall-0.8.6}/pyproject.toml +1 -1
- scrall-0.8.6/src/scrall/__init__.py +1 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/__main__.py +2 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/parse/scrall.peg +14 -13
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/parse/visitor.py +29 -9
- {scrall-0.8.1 → scrall-0.8.6/src/scrall.egg-info}/PKG-INFO +1 -1
- {scrall-0.8.1 → scrall-0.8.6}/tests/test_delete.py +1 -1
- {scrall-0.8.1 → scrall-0.8.6}/tests/test_ping_actions.py +11 -11
- {scrall-0.8.1 → scrall-0.8.6}/tests/test_selection.py +7 -7
- {scrall-0.8.1 → scrall-0.8.6}/tests/test_signals.py +2 -2
- {scrall-0.8.1 → scrall-0.8.6}/tests/test_state_actions.py +2 -2
- scrall-0.8.1/src/scrall/__init__.py +0 -1
- {scrall-0.8.1 → scrall-0.8.6}/LICENSE +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/MANIFEST.in +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/README.md +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/setup.cfg +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/exceptions.py +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/log.conf +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/parse/__init__.py +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall/parse/parser.py +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall.egg-info/SOURCES.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall.egg-info/dependency_links.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall.egg-info/entry_points.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall.egg-info/requires.txt +0 -0
- {scrall-0.8.1 → scrall-0.8.6}/src/scrall.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "scrall"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.6"
|
|
8
8
|
description = "Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Leon Starr", email = "leon_starr@modelint.com" }]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.8.6"
|
|
@@ -63,11 +63,13 @@ def main():
|
|
|
63
63
|
text = args.expr + '\n'
|
|
64
64
|
d = args.debug
|
|
65
65
|
result = ScrallParser.parse_text(scrall_text=text, debug=d)
|
|
66
|
+
pass
|
|
66
67
|
|
|
67
68
|
if args.file:
|
|
68
69
|
fpath = Path(args.file)
|
|
69
70
|
d = args.debug
|
|
70
71
|
result = ScrallParser.parse_file(file_input=fpath, debug=d)
|
|
72
|
+
pass
|
|
71
73
|
|
|
72
74
|
# logger.info("No problemo") # We didn't die on an exception, basically
|
|
73
75
|
print("\nNo problemo")
|
|
@@ -43,9 +43,9 @@ rename_attr = RENAME SP* name
|
|
|
43
43
|
RENAME = '>>'
|
|
44
44
|
|
|
45
45
|
// Decision action
|
|
46
|
-
decision = scalar_expr
|
|
47
|
-
true_result = DECISION_OP SP
|
|
48
|
-
false_result =
|
|
46
|
+
decision = scalar_expr true_result false_result?
|
|
47
|
+
true_result = DECISION_OP LINEWRAP? SP? component_statement_set
|
|
48
|
+
false_result = SP FALSE_RESULT_OP LINEWRAP? SP? component_statement_set // Else
|
|
49
49
|
FALSE_RESULT_OP = ':'
|
|
50
50
|
|
|
51
51
|
// Switch action
|
|
@@ -58,11 +58,11 @@ enum_value = '_' name // Scalar switch has enum value cases
|
|
|
58
58
|
DECISION_OP = '?'
|
|
59
59
|
|
|
60
60
|
// Signal action
|
|
61
|
-
signal_action = signal_spec SP+ (signal_dest / ee_dest)
|
|
62
|
-
|
|
61
|
+
signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)
|
|
62
|
+
// SIGNAL_OP only destination means: copy dest from false result of decision action
|
|
63
63
|
signal_spec = name supplied_params?
|
|
64
|
-
signal_dest = SIGNAL_OP
|
|
65
|
-
ee_dest = ASYNCH SP
|
|
64
|
+
signal_dest = SIGNAL_OP LINEWRAP? SP? instance_set assigner_partition? (SP+ delay)?
|
|
65
|
+
ee_dest = ASYNCH LINEWRAP? SP? name
|
|
66
66
|
delay = DELAY_OP SP* scalar_expr
|
|
67
67
|
assigner_partition = '|' instance_set
|
|
68
68
|
DELAY_OP = '@'
|
|
@@ -73,7 +73,7 @@ ASYNCH = '=>'
|
|
|
73
73
|
inst_assignment = flow_output SP+ INST_ASSIGN SP+ instance_set
|
|
74
74
|
INST_ASSIGN = '.=' / '..='
|
|
75
75
|
|
|
76
|
-
// Synchronous call action (method or ee operation)
|
|
76
|
+
// Synchronous call action (method or ee operation or type operation)
|
|
77
77
|
call = instance_set op_chain? // Post-parse verify that last element is an operation, otherwise invalid call
|
|
78
78
|
operation = owner? '.' name supplied_params
|
|
79
79
|
owner = name
|
|
@@ -110,16 +110,17 @@ attr_init = '(' SP* (attr_value_init (',' SP+ attr_value_init)* SP*)? ')' // all
|
|
|
110
110
|
attr_value_init = (name SP? ':' SP+ scalar_expr )*
|
|
111
111
|
update_ref = (instance_set SP+)? to_ref // relate or unrelated to me or explicit instance_set
|
|
112
112
|
to_ref = '&' rnum SP+ instance_set (',' SP+ instance_set)? // non-associative or associative reference
|
|
113
|
-
delete = '!*' SP* instance_set (',' SP+ instance_set) // supports multi-delete transaction
|
|
113
|
+
delete = '!*' SP* instance_set (',' SP+ instance_set)* // supports multi-delete transaction
|
|
114
114
|
|
|
115
115
|
// Scalar call
|
|
116
116
|
//scalar_call = scalar_expr
|
|
117
117
|
|
|
118
|
-
//
|
|
119
|
-
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP*
|
|
120
|
-
scalar_output_set = flow_output (',' SP
|
|
118
|
+
// Scalar assignment
|
|
119
|
+
scalar_assignment = scalar_output_set SP* SCALAR_ASSIGN SP* scalar_expr projection? (',' SP* scalar_expr projection?)*
|
|
120
|
+
scalar_output_set = qualified_name / flow_output (',' SP+ flow_output)*
|
|
121
|
+
qualified_name = name '.' name
|
|
121
122
|
flow_output = name (TYPE_ASSIGN name)?
|
|
122
|
-
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')'))
|
|
123
|
+
projection = '.' (name / '(' ( (ALL / (name (',' SP+ name)*) )? ')')) // TODO: Why is empty () ok in projection?
|
|
123
124
|
ALL = '*'
|
|
124
125
|
|
|
125
126
|
scalar_expr = SP* scalar_logical_or SP*
|
|
@@ -41,6 +41,7 @@ BOOL_a = namedtuple('BOOL_a', 'op operands')
|
|
|
41
41
|
Scalar_Assignment_a = namedtuple('Scalar_Assignment_a', 'lhs rhs')
|
|
42
42
|
Table_Assignment_a = namedtuple('Table_Assignment_a', 'type assign_tuple lhs rhs X')
|
|
43
43
|
Scalar_RHS_a = namedtuple('Scalar_RHS_a', 'expr attrs')
|
|
44
|
+
Qualified_Name_a = namedtuple('Qualified_Name_a', 'cname aname')
|
|
44
45
|
Flow_Output_a = namedtuple('Flow_Output_a', 'name exp_type')
|
|
45
46
|
PATH_a = namedtuple('PATH_a', 'hops')
|
|
46
47
|
INST_a = namedtuple('INST_a', 'components')
|
|
@@ -200,7 +201,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
200
201
|
_logger.info(f">> {[k for k in children.results.keys()]}")
|
|
201
202
|
|
|
202
203
|
_logger.info(f" < {children}")
|
|
203
|
-
input_tokens =
|
|
204
|
+
input_tokens = children.results.get('sequence_token', [])
|
|
204
205
|
b = getresult('block', children)
|
|
205
206
|
s = getresult('statement', children)
|
|
206
207
|
result = Seq_Statement_Set_a(input_tokens=input_tokens, statement=s, block=b)
|
|
@@ -645,23 +646,34 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
645
646
|
def visit_signal_action(cls, node, children):
|
|
646
647
|
"""
|
|
647
648
|
"""
|
|
648
|
-
_logger.info("
|
|
649
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP)")
|
|
649
650
|
_logger.info(f' :: {node.value}')
|
|
650
651
|
|
|
651
652
|
_logger.info(f" < {children}")
|
|
652
653
|
sdest = children.results.get('signal_dest')
|
|
653
|
-
|
|
654
|
+
eedest = children.results.get('ee_dest')
|
|
655
|
+
if not sdest and not eedest:
|
|
656
|
+
# Dest should be supplied by false result in decision
|
|
657
|
+
result = Signal_a(
|
|
658
|
+
event=children[0]['name'],
|
|
659
|
+
supplied_params=children[0]['params'],
|
|
660
|
+
dest=None
|
|
661
|
+
)
|
|
662
|
+
elif sdest:
|
|
663
|
+
# Signal instance set or assigner destination
|
|
654
664
|
result = Signal_a(
|
|
655
665
|
event=children[0]['name'],
|
|
656
666
|
supplied_params=children[0]['params'],
|
|
657
667
|
dest=children[1]
|
|
658
668
|
)
|
|
659
669
|
else:
|
|
670
|
+
# Otherwise it must be an EE destination
|
|
660
671
|
result = EE_Signal_a(
|
|
661
672
|
event=children[0]['name'],
|
|
662
673
|
supplied_params=children[0]['params'],
|
|
663
674
|
ee=children[1]
|
|
664
675
|
)
|
|
676
|
+
|
|
665
677
|
_logger.info(f" > {result}")
|
|
666
678
|
return result
|
|
667
679
|
|
|
@@ -694,7 +706,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
694
706
|
def visit_signal_dest(cls, node, children):
|
|
695
707
|
"""
|
|
696
708
|
"""
|
|
697
|
-
_logger.info("
|
|
709
|
+
_logger.info("signal_action = signal_spec SP+ (signal_dest / ee_dest / SIGNAL_OP / ASYNCH)")
|
|
698
710
|
_logger.info(f' :: {node.value}')
|
|
699
711
|
|
|
700
712
|
_logger.info(f" < {children}")
|
|
@@ -703,7 +715,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
703
715
|
ap = None if not ap else ap[0]
|
|
704
716
|
delay = children.results.get('delay')
|
|
705
717
|
delay = 0 if not delay else delay[0]
|
|
706
|
-
result = Signal_Dest_a(target_iset
|
|
718
|
+
result = Signal_Dest_a(target_iset=iset, assigner_partition=N_a(ap), delay=delay)
|
|
707
719
|
_logger.info(f" > {result}")
|
|
708
720
|
return result
|
|
709
721
|
|
|
@@ -996,7 +1008,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
996
1008
|
_logger.info(f" < {children}")
|
|
997
1009
|
a = children.results.get('attr_init')
|
|
998
1010
|
r = children.results.get('to_ref')
|
|
999
|
-
result = New_inst_a(cname=children[0], attrs=
|
|
1011
|
+
result = New_inst_a(cname=children[0], attrs=a[0] if a else [], rels=None if not r else r[0])
|
|
1000
1012
|
_logger.info(f" > {result}")
|
|
1001
1013
|
return result
|
|
1002
1014
|
|
|
@@ -1009,7 +1021,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
1009
1021
|
_logger.info(f' :: {node.value}')
|
|
1010
1022
|
|
|
1011
1023
|
_logger.info(f" < {children}")
|
|
1012
|
-
result = children
|
|
1024
|
+
result = children.results.get('attr_value_init')
|
|
1013
1025
|
_logger.info(f" > {result}")
|
|
1014
1026
|
return result
|
|
1015
1027
|
|
|
@@ -1082,7 +1094,7 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
1082
1094
|
_logger.info(f" > {result}")
|
|
1083
1095
|
return result
|
|
1084
1096
|
|
|
1085
|
-
#
|
|
1097
|
+
# Scalar Assigment
|
|
1086
1098
|
@classmethod
|
|
1087
1099
|
def visit_scalar_assignment(cls, node, children):
|
|
1088
1100
|
"""
|
|
@@ -1099,11 +1111,19 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
1099
1111
|
_logger.info(f" > {result}")
|
|
1100
1112
|
return result
|
|
1101
1113
|
|
|
1114
|
+
@classmethod
|
|
1115
|
+
def visit_qualified_name(cls, node, children):
|
|
1116
|
+
"""
|
|
1117
|
+
"""
|
|
1118
|
+
_logger.info("qualified_name = name '.' name")
|
|
1119
|
+
_logger.info(f' :: {node.value}')
|
|
1120
|
+
return Qualified_Name_a(cname=children[0].name, aname=children[1].name)
|
|
1121
|
+
|
|
1102
1122
|
@classmethod
|
|
1103
1123
|
def visit_scalar_output_set(cls, node, children):
|
|
1104
1124
|
"""
|
|
1105
1125
|
"""
|
|
1106
|
-
_logger.info("scalar_output_set = flow_output (',' flow_output)*")
|
|
1126
|
+
_logger.info("scalar_output_set = qualified_name / flow_output (',' SP+ flow_output)*")
|
|
1107
1127
|
_logger.info(f' :: {node.value}')
|
|
1108
1128
|
|
|
1109
1129
|
_logger.info(f" < {children}")
|
|
@@ -7,7 +7,7 @@ from scrall.parse.visitor import Execution_Unit_a, N_a, INST_a, PATH_a, R_a, Seq
|
|
|
7
7
|
actions = [
|
|
8
8
|
("!* siamese, /R1/Cat",
|
|
9
9
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(
|
|
10
|
-
input_tokens=
|
|
10
|
+
input_tokens=[], statement=Delete_Action_a(
|
|
11
11
|
instance_sets=[N_a(name='siamese'),
|
|
12
12
|
INST_a(components=[PATH_a(hops=[R_a(rnum='R1'),
|
|
13
13
|
N_a(name='Cat')])])]), block=None), output_token=None)
|
|
@@ -9,20 +9,20 @@ from scrall.parse.visitor import Execution_Unit_a, Signal_a, Signal_Dest_a, N_a,
|
|
|
9
9
|
|
|
10
10
|
actions = [
|
|
11
11
|
("{\n a = b\n c = d\n}<1>",
|
|
12
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
12
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[], statement=None, block=[
|
|
13
13
|
|
|
14
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
14
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
15
15
|
statement=Scalar_Assignment_a(
|
|
16
16
|
lhs=[Flow_Output_a(name=N_a(name='a'), exp_type=None)],
|
|
17
17
|
rhs=Scalar_RHS_a(expr=N_a(name='b'), attrs=None)), block=None), output_token=None),
|
|
18
18
|
|
|
19
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
19
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
20
20
|
statement=Scalar_Assignment_a(
|
|
21
21
|
lhs=[Flow_Output_a(name=N_a(name='c'), exp_type=None)],
|
|
22
22
|
rhs=Scalar_RHS_a(expr=N_a(name='d'), attrs=None)), block=None), output_token=None)]),
|
|
23
23
|
output_token=Sequence_Token_a(name='1'))),
|
|
24
24
|
("^dir? {\n _up:\n a = b\n _down:\n a = c\n}\n",
|
|
25
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
25
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
26
26
|
statement=Switch_a(input_flow=IN_a(name='dir'), cases=[
|
|
27
27
|
Case_a(enums=['up'], comp_statement_set=Comp_Statement_Set_a(
|
|
28
28
|
statement=Scalar_Assignment_a(
|
|
@@ -36,7 +36,7 @@ actions = [
|
|
|
36
36
|
),
|
|
37
37
|
|
|
38
38
|
("stop here floors #= shaft aslevs( Stop requested ).Floor",
|
|
39
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
39
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
40
40
|
statement=Table_Assignment_a(type='implicit', assign_tuple=False,
|
|
41
41
|
lhs='stop here floors',
|
|
42
42
|
rhs=TEXPR_a(table=INST_a(components=[N_a(name='shaft aslevs')]), hexpr=None,
|
|
@@ -44,7 +44,7 @@ actions = [
|
|
|
44
44
|
projection=Projection_a(expand=None, attrs=[N_a(name='Floor')])),
|
|
45
45
|
X=(0, 56)), block=None), output_token=None)),
|
|
46
46
|
("Try redirect( ^new dest ) -> /R53/Cabin",
|
|
47
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
47
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
48
48
|
statement=Signal_a(event='Try redirect', supplied_params=[
|
|
49
49
|
[Supplied_Parameter_a(pname='new dest', sval=IN_a(name='new dest'))]],
|
|
50
50
|
dest=Signal_Dest_a(target_iset=
|
|
@@ -53,7 +53,7 @@ actions = [
|
|
|
53
53
|
block=None), output_token=None)
|
|
54
54
|
),
|
|
55
55
|
("TRAN.Go to floor( Dest floor: ^new dest, Shaft )",
|
|
56
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
56
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
57
57
|
statement=Call_a(call=INST_a(components=[Op_a(owner='TRAN', op_name='Go to floor',
|
|
58
58
|
supplied_params=[Supplied_Parameter_a(pname='Dest floor', sval=IN_a(name='new dest')),
|
|
59
59
|
Supplied_Parameter_a(pname='Shaft', sval=N_a(name='Shaft'))])]
|
|
@@ -61,14 +61,14 @@ actions = [
|
|
|
61
61
|
block=None), output_token=None)
|
|
62
62
|
),
|
|
63
63
|
("Change requested -> ME",
|
|
64
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
64
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
65
65
|
statement=Signal_a(event='Change requested', supplied_params=[],
|
|
66
66
|
dest=Signal_Dest_a(target_iset=N_a(name='ME'),
|
|
67
67
|
assigner_partition=N_a(name=None), delay=0)),
|
|
68
68
|
block=None), output_token=None)
|
|
69
69
|
),
|
|
70
70
|
("shaft aslevs ..= /R2/R28/Shaft Level/R3/Accessible Shaft Level",
|
|
71
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
71
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
72
72
|
statement=Inst_Assignment_a(
|
|
73
73
|
lhs=Flow_Output_a(name=N_a(name='shaft aslevs'), exp_type=None), card='M',
|
|
74
74
|
rhs=INST_a(components=[PATH_a(hops=[
|
|
@@ -77,7 +77,7 @@ actions = [
|
|
|
77
77
|
X=(0, 62)), block=None), output_token=None)
|
|
78
78
|
),
|
|
79
79
|
("requested stops ..= shaft aslevs( Stop requested: avalue )",
|
|
80
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
80
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
81
81
|
statement=Inst_Assignment_a(
|
|
82
82
|
lhs=Flow_Output_a(name=N_a(name='requested stops'), exp_type=None), card='M',
|
|
83
83
|
rhs=INST_a(components=[N_a(name='shaft aslevs'), Criteria_Selection_a(card='ALL',
|
|
@@ -85,7 +85,7 @@ actions = [
|
|
|
85
85
|
X=(0, 58)), block=None), output_token=None)
|
|
86
86
|
),
|
|
87
87
|
("=>> Accessible Shaft Level( Floor: nearest dest.Floor; Shaft )",
|
|
88
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
88
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[], statement=Output_Flow_a(
|
|
89
89
|
output=INST_PROJ_a(iset=INST_a(components=[N_a(name='Accessible Shaft Level'),
|
|
90
90
|
Criteria_Selection_a(card='ALL', criteria=BOOL_a(op='AND', operands=[
|
|
91
91
|
BOOL_a(op='==', operands=[N_a(name='Floor'),
|
|
@@ -7,7 +7,7 @@ from scrall.parse.visitor import Execution_Unit_a, Signal_a, Signal_Dest_a, N_a,
|
|
|
7
7
|
|
|
8
8
|
actions = [
|
|
9
9
|
("s ..= Shaft(Inservice; Cleared)",
|
|
10
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
10
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
11
11
|
statement=Inst_Assignment_a(
|
|
12
12
|
lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
13
13
|
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='ALL',
|
|
@@ -15,7 +15,7 @@ actions = [
|
|
|
15
15
|
X=(0, 31)), block=None), output_token=None)
|
|
16
16
|
),
|
|
17
17
|
("c ..= Cabin(Speed > slowest + buffer)",
|
|
18
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
18
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
19
19
|
statement=Inst_Assignment_a(
|
|
20
20
|
lhs=Flow_Output_a(name=N_a(name='c'), exp_type=None), card='M',
|
|
21
21
|
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='ALL',
|
|
@@ -24,7 +24,7 @@ actions = [
|
|
|
24
24
|
X=(0, 37)), block=None), output_token=None)
|
|
25
25
|
),
|
|
26
26
|
("c ..= Cabin(Speed > slowest)",
|
|
27
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
27
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
28
28
|
statement=Inst_Assignment_a(
|
|
29
29
|
lhs=Flow_Output_a(name=N_a(name='c'), exp_type=None), card='M',
|
|
30
30
|
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='ALL',
|
|
@@ -32,7 +32,7 @@ actions = [
|
|
|
32
32
|
X=(0, 28)), block=None), output_token=None)
|
|
33
33
|
),
|
|
34
34
|
("s ..= Shaft(In service: TRUE)",
|
|
35
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
35
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
36
36
|
statement=Inst_Assignment_a(
|
|
37
37
|
lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
38
38
|
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='ALL',
|
|
@@ -40,14 +40,14 @@ actions = [
|
|
|
40
40
|
X=(0, 29)), block=None), output_token=None)
|
|
41
41
|
),
|
|
42
42
|
("s ..= Shaft(In service)",
|
|
43
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
43
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
44
44
|
statement=Inst_Assignment_a(lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
45
45
|
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='ALL',
|
|
46
46
|
criteria=N_a(name='In service'))]),
|
|
47
47
|
X=(0, 23)), block=None), output_token=None)
|
|
48
48
|
),
|
|
49
49
|
("x .= Bank(Max close attempts: (v or x) or Average cabin speed > mspeed)",
|
|
50
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
50
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
51
51
|
statement=Inst_Assignment_a(
|
|
52
52
|
lhs=Flow_Output_a(name=N_a(name='x'), exp_type=None), card='1',
|
|
53
53
|
rhs=INST_a(components=[N_a(name='Bank'), Criteria_Selection_a(card='ALL',
|
|
@@ -59,7 +59,7 @@ actions = [
|
|
|
59
59
|
X=(0, 71)), block=None), output_token=None)
|
|
60
60
|
),
|
|
61
61
|
("x ..= car.findsome()(color: _red)",
|
|
62
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
62
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
63
63
|
statement=Inst_Assignment_a(
|
|
64
64
|
lhs=Flow_Output_a(name=N_a(name='x'), exp_type=None), card='M',
|
|
65
65
|
rhs=INST_a(components=[Op_a(owner='car', op_name='findsome', supplied_params=[]),
|
|
@@ -7,14 +7,14 @@ from scrall.parse.visitor import Execution_Unit_a, Signal_a, Signal_Dest_a, N_a,
|
|
|
7
7
|
|
|
8
8
|
actions = [
|
|
9
9
|
("Change requested -> ME",
|
|
10
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
10
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
11
11
|
statement=Signal_a(event='Change requested', supplied_params=[],
|
|
12
12
|
dest=Signal_Dest_a(target_iset=N_a(name='ME'),
|
|
13
13
|
assigner_partition=N_a(name=None), delay=0)),
|
|
14
14
|
block=None), output_token=None)
|
|
15
15
|
),
|
|
16
16
|
("Ready to go -> /R53/Transfer",
|
|
17
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
17
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
18
18
|
statement=Signal_a(event='Ready to go', supplied_params=[], dest=Signal_Dest_a(
|
|
19
19
|
target_iset=INST_a(
|
|
20
20
|
components=[PATH_a(hops=[R_a(rnum='R53'), N_a(name='Transfer')])]),
|
|
@@ -15,7 +15,7 @@ actions = [
|
|
|
15
15
|
// this case
|
|
16
16
|
Take out of service -> ME
|
|
17
17
|
""",
|
|
18
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
18
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
19
19
|
statement=Decision_a(input=BOOL_a(
|
|
20
20
|
op='NOT', operands=INST_PROJ_a(iset=INST_a(
|
|
21
21
|
components=[PATH_a(hops=[R_a(rnum='R2'), N_a(name='Shaft')])]),
|
|
@@ -28,7 +28,7 @@ actions = [
|
|
|
28
28
|
block=None), output_token=None)
|
|
29
29
|
),
|
|
30
30
|
("!(/R2/Shaft.In service) ? Take out of service -> ME",
|
|
31
|
-
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=
|
|
31
|
+
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=[],
|
|
32
32
|
statement=Decision_a(input=BOOL_a(
|
|
33
33
|
op='NOT', operands=INST_PROJ_a(iset=INST_a(
|
|
34
34
|
components=[PATH_a(hops=[R_a(rnum='R2'), N_a(name='Shaft')])]),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.8.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|