scrall 0.8.0__tar.gz → 0.8.1__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.0/src/scrall.egg-info → scrall-0.8.1}/PKG-INFO +1 -1
- {scrall-0.8.0 → scrall-0.8.1}/pyproject.toml +1 -1
- scrall-0.8.1/src/scrall/__init__.py +1 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/parse/visitor.py +10 -6
- {scrall-0.8.0 → scrall-0.8.1/src/scrall.egg-info}/PKG-INFO +1 -1
- {scrall-0.8.0 → scrall-0.8.1}/tests/test_ping_actions.py +3 -3
- {scrall-0.8.0 → scrall-0.8.1}/tests/test_selection.py +7 -7
- scrall-0.8.0/src/scrall/__init__.py +0 -1
- {scrall-0.8.0 → scrall-0.8.1}/LICENSE +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/MANIFEST.in +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/README.md +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/setup.cfg +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/__main__.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/exceptions.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/log.conf +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/parse/__init__.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/parse/parser.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall/parse/scrall.peg +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall.egg-info/SOURCES.txt +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall.egg-info/dependency_links.txt +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall.egg-info/entry_points.txt +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall.egg-info/requires.txt +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/src/scrall.egg-info/top_level.txt +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/tests/test_delete.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/tests/test_signals.py +0 -0
- {scrall-0.8.0 → scrall-0.8.1}/tests/test_state_actions.py +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.1"
|
|
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.1"
|
|
@@ -74,6 +74,7 @@ Rank_a = namedtuple('Rank_a', "card extent")
|
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
rank_symbol = {'^+': "greatest", '^-': "least"}
|
|
77
|
+
card_symbol = {'1':'ONE', '*':'ALL'}
|
|
77
78
|
|
|
78
79
|
table_op = {
|
|
79
80
|
'^': 'INTERSECT',
|
|
@@ -926,11 +927,13 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
926
927
|
_logger.info(f' :: {node.value}')
|
|
927
928
|
|
|
928
929
|
_logger.info(f" < {children}")
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
930
|
+
card_parse = children.results['CARD'][0]
|
|
931
|
+
card = card_symbol[card_parse]
|
|
932
|
+
attr_parse = children.results['name'][0]
|
|
933
|
+
attr = attr_parse.name
|
|
934
|
+
rankr_parse = children.results['RANKR']
|
|
935
|
+
rankr = rank_symbol[rankr_parse[0]]
|
|
936
|
+
result = Rank_Selection_a(card=card, rankr=rankr, attr=attr)
|
|
934
937
|
_logger.info(f" > {result}")
|
|
935
938
|
return result
|
|
936
939
|
|
|
@@ -945,7 +948,8 @@ class ScrallVisitor(PTNodeVisitor):
|
|
|
945
948
|
|
|
946
949
|
_logger.info(f" < {children}")
|
|
947
950
|
explicit_card = children.results.get('CARD')
|
|
948
|
-
|
|
951
|
+
card_parse = '*' if not explicit_card else explicit_card[0]
|
|
952
|
+
card = card_symbol[card_parse]
|
|
949
953
|
criteria = children.results.get('scalar_expr')
|
|
950
954
|
if criteria:
|
|
951
955
|
result = Criteria_Selection_a(card=card, criteria=criteria[0])
|
|
@@ -40,7 +40,7 @@ actions = [
|
|
|
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,
|
|
43
|
-
selection=Criteria_Selection_a(card='
|
|
43
|
+
selection=Criteria_Selection_a(card='ALL', criteria=N_a(name='Stop requested')),
|
|
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",
|
|
@@ -80,14 +80,14 @@ actions = [
|
|
|
80
80
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
81
81
|
statement=Inst_Assignment_a(
|
|
82
82
|
lhs=Flow_Output_a(name=N_a(name='requested stops'), exp_type=None), card='M',
|
|
83
|
-
rhs=INST_a(components=[N_a(name='shaft aslevs'), Criteria_Selection_a(card='
|
|
83
|
+
rhs=INST_a(components=[N_a(name='shaft aslevs'), Criteria_Selection_a(card='ALL',
|
|
84
84
|
criteria=BOOL_a(op='==', operands=[N_a(name='Stop requested'), N_a(name='avalue')]))]),
|
|
85
85
|
X=(0, 58)), block=None), output_token=None)
|
|
86
86
|
),
|
|
87
87
|
("=>> Accessible Shaft Level( Floor: nearest dest.Floor; Shaft )",
|
|
88
88
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None, statement=Output_Flow_a(
|
|
89
89
|
output=INST_PROJ_a(iset=INST_a(components=[N_a(name='Accessible Shaft Level'),
|
|
90
|
-
Criteria_Selection_a(card='
|
|
90
|
+
Criteria_Selection_a(card='ALL', criteria=BOOL_a(op='AND', operands=[
|
|
91
91
|
BOOL_a(op='==', operands=[N_a(name='Floor'),
|
|
92
92
|
INST_PROJ_a(iset=N_a(name='nearest dest'),
|
|
93
93
|
projection=Projection_a(expand=None, attrs=[N_a(name='Floor')]))]),
|
|
@@ -10,7 +10,7 @@ actions = [
|
|
|
10
10
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
11
11
|
statement=Inst_Assignment_a(
|
|
12
12
|
lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
13
|
-
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='
|
|
13
|
+
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='ALL',
|
|
14
14
|
criteria=BOOL_a(op='AND', operands=[N_a(name='Inservice'), N_a(name='Cleared')]))]),
|
|
15
15
|
X=(0, 31)), block=None), output_token=None)
|
|
16
16
|
),
|
|
@@ -18,7 +18,7 @@ actions = [
|
|
|
18
18
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
19
19
|
statement=Inst_Assignment_a(
|
|
20
20
|
lhs=Flow_Output_a(name=N_a(name='c'), exp_type=None), card='M',
|
|
21
|
-
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='
|
|
21
|
+
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='ALL',
|
|
22
22
|
criteria=BOOL_a(op='>', operands=[N_a(name='Speed'),
|
|
23
23
|
MATH_a(op='+', operands=[N_a(name='slowest'), N_a(name='buffer')])]))]),
|
|
24
24
|
X=(0, 37)), block=None), output_token=None)
|
|
@@ -27,7 +27,7 @@ actions = [
|
|
|
27
27
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
28
28
|
statement=Inst_Assignment_a(
|
|
29
29
|
lhs=Flow_Output_a(name=N_a(name='c'), exp_type=None), card='M',
|
|
30
|
-
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='
|
|
30
|
+
rhs=INST_a(components=[N_a(name='Cabin'), Criteria_Selection_a(card='ALL',
|
|
31
31
|
criteria=BOOL_a(op='>', operands=[N_a(name='Speed'), N_a(name='slowest')]))]),
|
|
32
32
|
X=(0, 28)), block=None), output_token=None)
|
|
33
33
|
),
|
|
@@ -35,14 +35,14 @@ actions = [
|
|
|
35
35
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
36
36
|
statement=Inst_Assignment_a(
|
|
37
37
|
lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
38
|
-
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='
|
|
38
|
+
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='ALL',
|
|
39
39
|
criteria=BOOL_a(op='==', operands=[N_a(name='In service'), 'TRUE']))]),
|
|
40
40
|
X=(0, 29)), block=None), output_token=None)
|
|
41
41
|
),
|
|
42
42
|
("s ..= Shaft(In service)",
|
|
43
43
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
44
44
|
statement=Inst_Assignment_a(lhs=Flow_Output_a(name=N_a(name='s'), exp_type=None), card='M',
|
|
45
|
-
rhs=INST_a(components=[N_a(name='Shaft'), Criteria_Selection_a(card='
|
|
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
|
),
|
|
@@ -50,7 +50,7 @@ actions = [
|
|
|
50
50
|
Execution_Unit_a(statement_set=Seq_Statement_Set_a(input_tokens=None,
|
|
51
51
|
statement=Inst_Assignment_a(
|
|
52
52
|
lhs=Flow_Output_a(name=N_a(name='x'), exp_type=None), card='1',
|
|
53
|
-
rhs=INST_a(components=[N_a(name='Bank'), Criteria_Selection_a(card='
|
|
53
|
+
rhs=INST_a(components=[N_a(name='Bank'), Criteria_Selection_a(card='ALL',
|
|
54
54
|
criteria=BOOL_a(op='OR', operands=[
|
|
55
55
|
BOOL_a(op='==', operands=[
|
|
56
56
|
N_a(name='Max close attempts'),
|
|
@@ -63,7 +63,7 @@ actions = [
|
|
|
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=[]),
|
|
66
|
-
Criteria_Selection_a(card='
|
|
66
|
+
Criteria_Selection_a(card='ALL', criteria=BOOL_a(op='==',
|
|
67
67
|
operands=[N_a(name='color'), Enum_a(value=N_a(name='red'))]))]),
|
|
68
68
|
X=(0, 33)), block=None), output_token=None)
|
|
69
69
|
),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.8.0"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|