Skip to content
Snippets Groups Projects
Commit 76540fff authored by Allen, Bruce (CIV)'s avatar Allen, Bruce (CIV)
Browse files

remove obsoleted documentation

parent 8c73e1a4
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 23694 deletions
/* Example 28
MP compiler/trace generator architecture model
run for scope 1 or more
===================================================*/
SCHEMA MP_architecture
ROOT User:
(+ [ load_MP_file ]
( MP_model_editing | browsing_MP_code )
press_RUN_button
( browse_event_trace |
syntax_errors_detected )
[ save_MP_file ]
+)
end_of_session
;
/*--------------------------------------------------*/
ROOT MP_code_editor:
(+
( MP_model_editing |
browsing_MP_code )
+)
;
User, MP_code_editor SHARE ALL MP_model_editing, browsing_MP_code;
/*--------------------------------------------------*/
ROOT MP_GUI:
(+ [ load_MP_file ]
press_RUN_button
input_MP_code
/* trace visualization happens only if there are no syntax errors,
and trace generator has been called */
( receive_json_file
visualize_trace |
syntax_errors_detected )
[ save_MP_file ]
+)
;
User, MP_GUI SHARE ALL load_MP_file, save_MP_file,
press_RUN_button;
COORDINATE $v: visualize_trace,
$b: browse_event_trace
DO ADD $v PRECEDES $b; OD;
/*--------------------------------------------------*/
ROOT MP_parser:
(+ input_MP_code
perform_syntax_analysis
( write_abstract_syntax_tree |
syntax_errors_detected )
+)
;
MP_parser, MP_GUI SHARE ALL input_MP_code;
User, MP_parser, MP_GUI SHARE ALL syntax_errors_detected;
COORDINATE $p: press_RUN_button,
$r: input_MP_code
DO ADD $p PRECEDES $r; OD;
/*--------------------------------------------------*/
ROOT Abstract_syntax_tree:
(* write_abstract_syntax_tree
read_abstract_syntax_tree
*);
MP_parser, Abstract_syntax_tree SHARE ALL write_abstract_syntax_tree;
/*--------------------------------------------------*/
ROOT Trace_generator:
(* read_abstract_syntax_tree
generate_Cpp_file
run_Cpp_compiler
run_executable
produce_json_file
*);
Abstract_syntax_tree, Trace_generator SHARE ALL read_abstract_syntax_tree;
COORDINATE $p: produce_json_file,
$r: receive_json_file
DO ADD $p PRECEDES $r; OD;
/*--------------------------------------------------*/
/* trace annotations */
SAY(" Scope " $$scope " Trace #" trace_id );
/*================================================================
Processing event trace to find dependencies between components.
Produces a UML-like Component Diagram. This code is reusable,
and can be copied/pasted into any other MP model.
See Sec. 5.3 in MP v.4 Manual
================================================================*/
GRAPH Diagram { TITLE ("main component interactions");};
COORDINATE $E1: ($$ROOT | $$COMPOSITE) DO
COORDINATE $E2: ($$ROOT | $$COMPOSITE) DO
WITHIN Diagram{
/* For each valid event trace find all root and composite
event instances within the event trace and add them to the graph. */
Node$a: LAST ($E1);
Node$b: LAST ($E2);
/* LAST option in the node constructors ensures
there will be only a single instance of a node
in the graph for each root and composite event
found in the event trace */
/* If event E1 is IN another event E2, add an arrow “E2 calls E1” */
IF $E1 IN $E2 THEN
ADD Node$b ARROW("calls") Node$a;
FI;
/* We look for interactions between components and data structures.
Interactions between components, usually are represented by coordination of
events in the interacting components (presence of PRECEDES between events
in different threads).
Interactions between components and data structures are modeled by shared events,
since data structures are usually modeled as a set of operations performed on them. */
IF $E1 != $E2 AND
NOT ($E1 IN $E2 OR $E2 IN $E1) AND
( ( EXISTS $E3: $$EVENT ($E3 IN $E1 AND $E3 IN $E2) ) OR
( EXISTS $E3: $$EVENT FROM $E1,
$E4: $$EVENT FROM $E2 ($E3 PRECEDES $E4) ) ) THEN
ADD Node$a LINE("interacts with") Node$b;
FI;
}; /* end WITHIN Diagram */
OD;
OD; /* end of $E1 and $E2 loops */
GLOBAL
/* When trace derivation is completed, data from the traces has been accumulated in
the graph and is ready to be shown */
SHOW Diagram;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
The example files in this directory illustrate differences between .tg, .gry and .wng files.
Simple example:
* `simple_message_flow.mp` - The .mp file used
* `simple_message_flow.tg` - The compiled output from trace-generator at scope 1
* `simple_message_flow_scope1.gry` - Gryphon saved state
* `simple_message_flow.wng` - Firebird saved state
An `MP_architecture` example containing a global view is also provided.
/*
Example1_simple_message_flow.mp
Event grammar rules for each root define derivations for event traces,
in this case a simple sequence of zero or more events for each root.
The COORDINATE composition takes two root traces and produces
a modified event trace, merging behaviors of Sender and Receiver
and adding the PRECEDES relation for the selected send/receive pairs.
The coordination operation behaves as a "cross-cutting" derivation rule.
Run for scopes 1 and up. The "Sequence" or "Swim Lanes" layouts are
the most appropriate for browsing traces here.
*/
SCHEMA simple_message_flow
ROOT Sender: (* send *);
ROOT Receiver: (* receive *);
COORDINATE $x: send FROM Sender,
$y: receive FROM Receiver
DO ADD $x PRECEDES $y; OD;
{
"traces": [
[
"U",
0.5,
[
[
"Sender",
"R",
1,
0,
0
],
[
"Receiver",
"R",
2,
1,
0
]
],
[],
[],
{
"VIEWS": []
}
],
[
"U",
0.5,
[
[
"Sender",
"R",
1,
0,
0
],
[
"send",
"A",
2,
0,
1
],
[
"Receiver",
"R",
3,
1,
0
],
[
"receive",
"A",
4,
1,
1
]
],
[
[
2,
1
],
[
4,
3
]
],
[
[
4,
2
]
],
{
"VIEWS": []
}
]
]
}
\ No newline at end of file
{
"entities": {
"traces": {
"a672de7d-b951-4dae-a2e5-5227286beb06": {
"guid": "a672de7d-b951-4dae-a2e5-5227286beb06",
"layout": "SEQUENCE",
"marked": false,
"nodes": [
"09bf2659-8505-459b-bb9b-53bd2f2fa768",
"e01cecad-2b50-4e55-9ba9-9b6f806f0f41"
],
"probability": 0.5,
"links": [],
"order": 1
},
"c027a012-f7b5-410c-8927-55c3ec64ca97": {
"guid": "c027a012-f7b5-410c-8927-55c3ec64ca97",
"layout": "SEQUENCE",
"marked": false,
"nodes": [
"b52bd01d-b78b-4e33-8e3d-9d5f6e337ee5",
"11abd69f-0678-40e0-bef6-50c0f85307a4",
"8b9edf40-84be-4774-8a31-fbf0beff9903",
"18e3a170-4971-466a-9dca-fd05afee735b"
],
"probability": 0.5,
"links": [
"4aac958f-ec4e-4a8d-b8b9-b5d150f72c0f",
"66dbc464-f51c-4a8c-aefb-8d9533c5efa3",
"77ce9caf-364a-4446-8cba-bdf6172d82c1"
],
"order": 2
}
},
"nodes": {
"09bf2659-8505-459b-bb9b-53bd2f2fa768": {
"guid": "09bf2659-8505-459b-bb9b-53bd2f2fa768",
"x": 40,
"y": 0,
"row": 0,
"column": 0,
"name": "Sender",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ROOT",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
},
"e01cecad-2b50-4e55-9ba9-9b6f806f0f41": {
"guid": "e01cecad-2b50-4e55-9ba9-9b6f806f0f41",
"x": 340,
"y": 0,
"row": 0,
"column": 1,
"name": "Receiver",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ROOT",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
},
"b52bd01d-b78b-4e33-8e3d-9d5f6e337ee5": {
"guid": "b52bd01d-b78b-4e33-8e3d-9d5f6e337ee5",
"x": 40,
"y": 0,
"row": 0,
"column": 0,
"name": "Sender",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ROOT",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
},
"11abd69f-0678-40e0-bef6-50c0f85307a4": {
"guid": "11abd69f-0678-40e0-bef6-50c0f85307a4",
"x": 40,
"y": 58.75126749915397,
"row": 1,
"column": 0,
"name": "send",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ATOM",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
},
"8b9edf40-84be-4774-8a31-fbf0beff9903": {
"guid": "8b9edf40-84be-4774-8a31-fbf0beff9903",
"x": 340,
"y": 0,
"row": 0,
"column": 1,
"name": "Receiver",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ROOT",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
},
"18e3a170-4971-466a-9dca-fd05afee735b": {
"guid": "18e3a170-4971-466a-9dca-fd05afee735b",
"x": 340,
"y": 58.75126749915397,
"row": 1,
"column": 1,
"name": "receive",
"originalWidth": null,
"originalHeight": null,
"originalX": null,
"originalY": null,
"isGroup": false,
"isView": false,
"type": "ATOM",
"hidden": false,
"collapsed": false,
"hasCollapsedParent": false,
"spansRows": false
}
},
"links": {
"4aac958f-ec4e-4a8d-b8b9-b5d150f72c0f": {
"guid": "4aac958f-ec4e-4a8d-b8b9-b5d150f72c0f",
"points": [],
"curviness": 0,
"source": "b52bd01d-b78b-4e33-8e3d-9d5f6e337ee5",
"target": "11abd69f-0678-40e0-bef6-50c0f85307a4",
"type": "IN"
},
"66dbc464-f51c-4a8c-aefb-8d9533c5efa3": {
"guid": "66dbc464-f51c-4a8c-aefb-8d9533c5efa3",
"points": [],
"curviness": 0,
"source": "8b9edf40-84be-4774-8a31-fbf0beff9903",
"target": "18e3a170-4971-466a-9dca-fd05afee735b",
"type": "IN"
},
"77ce9caf-364a-4446-8cba-bdf6172d82c1": {
"guid": "77ce9caf-364a-4446-8cba-bdf6172d82c1",
"points": [],
"curviness": 0,
"source": "11abd69f-0678-40e0-bef6-50c0f85307a4",
"target": "18e3a170-4971-466a-9dca-fd05afee735b",
"type": "FOLLOWS"
}
}
},
"currentTraceGuid": "a672de7d-b951-4dae-a2e5-5227286beb06",
"code": {
"title": "simple_message_flow",
"source": "/* \nExample1_simple_message_flow.mp\n\t \nEvent grammar rules for each root define derivations for event traces,\nin this case a simple sequence of zero or more events for each root.\n\nThe COORDINATE composition takes two root traces and produces \na modified event trace, merging behaviors of Sender and Receiver \nand adding the PRECEDES relation for the selected send/receive pairs.\nThe coordination operation behaves as a \"cross-cutting\" derivation rule.\n\nRun for scopes 1 and up. The \"Sequence\" or \"Swim Lanes\" layouts are \nthe most appropriate for browsing traces here.\n\n*/\n\nSCHEMA simple_message_flow\n\nROOT Sender: (* send *);\nROOT Receiver: (* receive *);\n\nCOORDINATE\t$x: send \tFROM Sender, \n\t\t\t$y: receive FROM Receiver\n\tDO ADD $x PRECEDES $y; OD;\n"
},
"sort": {
"marked": {
"current": false
},
"events": {
"current": "",
"options": [
"",
"Asc",
"Desc"
]
},
"probability": {
"current": "",
"options": [
"",
"Lowest",
"Highest"
]
},
"sorting": false
},
"batchExport": {
"exporting": false,
"zip": null,
"markedOnly": false,
"error": false
},
"pagination": {
"currentPage": 1,
"totalPages": 1,
"pages": {
"1": [
"a672de7d-b951-4dae-a2e5-5227286beb06",
"c027a012-f7b5-410c-8927-55c3ec64ca97"
]
},
"tracesPerPage": 20
},
"version": 3
}
\ No newline at end of file
{
"graphs": [
{
"edges": [],
"mark": "M",
"nodes": [],
"probability": 1.0,
"views": []
},
{
"edges": [],
"mark": "U",
"nodes": [
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "1",
"label": "Sender",
"type": "R",
"x": 63.5,
"y": 5.0
},
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "2",
"label": "Receiver",
"type": "R",
"x": 228.5,
"y": 5.0
}
],
"probability": 0.5,
"views": []
},
{
"edges": [
{
"cbp1_x": 63.5,
"cbp1_y": 23.333333333333332,
"cbp2_x": 63.5,
"cbp2_y": 41.666666666666664,
"label": "",
"relation": "IN",
"source": "1",
"target": "2"
},
{
"cbp1_x": 228.5,
"cbp1_y": 23.333333333333332,
"cbp2_x": 228.5,
"cbp2_y": 41.666666666666664,
"label": "",
"relation": "IN",
"source": "3",
"target": "4"
},
{
"cbp1_x": 118.5,
"cbp1_y": 60.0,
"cbp2_x": 173.5,
"cbp2_y": 60.0,
"label": "",
"relation": "FOLLOWS",
"source": "2",
"target": "4"
}
],
"mark": "U",
"nodes": [
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "1",
"label": "Sender",
"type": "R",
"x": 63.5,
"y": 5.0
},
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "2",
"label": "send",
"type": "A",
"x": 63.5,
"y": 60.0
},
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "3",
"label": "Receiver",
"type": "R",
"x": 228.5,
"y": 5.0
},
{
"collapse": false,
"collapse_below": false,
"hide": false,
"id": "4",
"label": "receive",
"type": "A",
"x": 228.5,
"y": 60.0
}
],
"probability": 0.5,
"views": []
}
],
"mp_code": "/* \nExample1_simple_message_flow.mp\n\t \nEvent grammar rules for each root define derivations for event traces,\nin this case a simple sequence of zero or more events for each root.\n\nThe COORDINATE composition takes two root traces and produces \na modified event trace, merging behaviors of Sender and Receiver \nand adding the PRECEDES relation for the selected send/receive pairs.\nThe coordination operation behaves as a \"cross-cutting\" derivation rule.\n\nRun for scopes 1 and up. The \"Sequence\" or \"Swim Lanes\" layouts are \nthe most appropriate for browsing traces here.\n\n*/\n\nSCHEMA simple_message_flow\n\nROOT Sender: (* send *);\nROOT Receiver: (* receive *);\n\nCOORDINATE\t$x: send \tFROM Sender, \n\t\t\t$y: receive FROM Receiver\n\tDO ADD $x PRECEDES $y; OD;\n",
"scale": 1.0,
"scope": 1,
"selected_index": 1,
"x_slider": 0,
"y_slider": 0
}
\ No newline at end of file
# texlive
#
# Modification History:
# 180803 David Shifflett
# Changed clean to keep PDF file, erase TOC, added clean_all
#
DEPENDENCIES = mp_py_um.tex title.tex structure.tex screenshots/*
mp_py_um.pdf: $(DEPENDENCIES)
pdflatex mp_py_um.tex
pdflatex mp_py_um.tex
clean:
rm -rf mp_py_um.aux mp_py_um.log mp_py_um.out mp_py_um.toc structure.aux
clean_all: clean
rm -rf mp_py_um.pdf
File deleted
This diff is collapsed.
drawings = \
main_window_sectioned.pdf main_window_ex45mod_sectioned.pdf
.SUFFIXES: .svg .pdf
.svg.pdf:
inkscape --without-gui -D --export-pdf=$@ $<
all: $(drawings)
clean:
rm -f *.pdf
doc/mp_py_um/screenshots/events.png

1.46 KiB

doc/mp_py_um/screenshots/example_status.png

1.9 KiB

doc/mp_py_um/screenshots/file_menu.png

149 KiB

doc/mp_py_um/screenshots/filter_by_mark.png

729 B

doc/mp_py_um/screenshots/main_window.png

98.2 KiB

doc/mp_py_um/screenshots/main_window_ex45mod.png

225 KiB

File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment