123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 |
- include "primitives.alh"
- include "modelling.alh"
- include "object_operations.alh"
- Composite schedule {
- {Contains} Success success {}
- {Contains} Failure failure {}
- {Contains} ForAll link {
- LHS {
- Pre_Architecture/Group pre_l_0{
- label = "0"
- }
- Pre_Architecture/Port pre_l_1{
- label = "1"
- }
- Pre_Architecture/Contains pre_l_10 (pre_l_0, pre_l_1){
- label = "10"
- }
- Pre_Encapsulated_PetriNet/Port pre_l_2{
- label = "2"
- }
- Pre_Architecture/Group pre_l_3{
- label = "3"
- }
- Pre_Architecture/Port pre_l_4{
- label = "4"
- }
- Pre_Architecture/Contains pre_l_11 (pre_l_3, pre_l_4){
- label = "11"
- }
- Pre_Encapsulated_PetriNet/Port pre_l_5{
- label = "5"
- }
- Pre_Architecture/Connects (pre_l_1, pre_l_4){
- label = "6"
- }
- constraint = $
- Boolean function constraint(model : Element, mapping : Element):
- String name_0
- String name_1
- String name_2
- String name_3
- String name_4
- String name_5
- name_0 = read_attribute(model, mapping["0"], "name")
- name_1 = read_attribute(model, mapping["1"], "name")
- name_2 = read_attribute(model, mapping["2"], "name")
- name_3 = read_attribute(model, mapping["3"], "name")
- name_4 = read_attribute(model, mapping["4"], "name")
- name_5 = read_attribute(model, mapping["5"], "name")
- if bool_not(name_0 + "/" + name_1 == name_2):
- return False!
- if bool_not(name_3 + "/" + name_4 == name_5):
- return False!
- return True!
- $
- }
- RHS {
- Post_Architecture/Group post_l_0{
- label = "0"
- }
- Post_Architecture/Port post_l_1{
- label = "1"
- }
- Post_Architecture/Contains post_l_10 (post_l_0, post_l_1){
- label = "10"
- }
- Post_Encapsulated_PetriNet/Port post_l_2{
- label = "2"
- }
- Post_Architecture/Group post_l_3{
- label = "3"
- }
- Post_Architecture/Port post_l_4{
- label = "4"
- }
- Post_Architecture/Contains post_l_11 (post_l_3, post_l_4){
- label = "11"
- }
- Post_Encapsulated_PetriNet/Port post_l_5{
- label = "5"
- }
- Post_Architecture/Connects (post_l_1, post_l_4){
- label = "6"
- }
- Post_Encapsulated_PetriNet/Related (post_l_2, post_l_5){
- label = "7"
- }
- }
- }
- {Contains} ForAll remove_old {
- LHS {
- Pre_Encapsulated_PetriNet/Port pre_ro_0 {
- label = "0"
- }
- Pre_Encapsulated_PetriNet/Port pre_ro_1 {
- label = "1"
- }
- Pre_Encapsulated_PetriNet/Place pre_ro_2 {
- label = "2"
- }
- Pre_Encapsulated_PetriNet/Related (pre_ro_0, pre_ro_1) {
- label = "3"
- }
- Pre_Encapsulated_PetriNet/PortPlace (pre_ro_1, pre_ro_2) {
- label = "4"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Port {
- label = "0"
- }
- }
- }
- {Contains} ForAll merge_P2T {
- LHS {
- Pre_Encapsulated_PetriNet/Place pre_p2t_1 {
- label = "1"
- }
- Pre_Encapsulated_PetriNet/Port pre_p2t_2 {
- label = "2"
- }
- Pre_Encapsulated_PetriNet/PortPlace (pre_p2t_2, pre_p2t_1){
- label = "3"
- }
- Pre_Encapsulated_PetriNet/Place pre_p2t_4 {
- label = "4"
- }
- Pre_Encapsulated_PetriNet/Port pre_p2t_5 {
- label = "5"
- }
- Pre_Encapsulated_PetriNet/PortPlace (pre_p2t_5, pre_p2t_4){
- label = "6"
- }
- Pre_Encapsulated_PetriNet/Transition pre_p2t_7 {
- label = "7"
- }
- Pre_Encapsulated_PetriNet/P2T (pre_p2t_4, pre_p2t_7) {
- label = "8"
- }
- Pre_Encapsulated_PetriNet/Related (pre_p2t_2, pre_p2t_5) {
- label = "10"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Place post_p2t_1 {
- label = "1"
- }
- Post_Encapsulated_PetriNet/Port post_p2t_2 {
- label = "2"
- }
- Post_Encapsulated_PetriNet/PortPlace (post_p2t_2, post_p2t_1){
- label = "3"
- }
- Post_Encapsulated_PetriNet/Place post_p2t_4 {
- label = "4"
- }
- Post_Encapsulated_PetriNet/Port post_p2t_5 {
- label = "5"
- }
- Post_Encapsulated_PetriNet/PortPlace (post_p2t_5, post_p2t_4){
- label = "6"
- }
- Post_Encapsulated_PetriNet/Transition post_p2t_7 {
- label = "7"
- }
- Post_Encapsulated_PetriNet/P2T (post_p2t_4, post_p2t_7) {
- label = "8"
- }
- Post_Encapsulated_PetriNet/P2T (post_p2t_1, post_p2t_7) {
- label = "9"
- }
- Post_Encapsulated_PetriNet/Related (post_p2t_2, post_p2t_5) {
- label = "10"
- }
- }
- }
- {Contains} ForAll merge_T2P {
- LHS {
- Pre_Encapsulated_PetriNet/Place pre_t2p_1 {
- label = "1"
- }
- Pre_Encapsulated_PetriNet/Port pre_t2p_2 {
- label = "2"
- }
- Pre_Encapsulated_PetriNet/PortPlace (pre_t2p_2, pre_t2p_1){
- label = "3"
- }
- Pre_Encapsulated_PetriNet/Place pre_t2p_4 {
- label = "4"
- }
- Pre_Encapsulated_PetriNet/Port pre_t2p_5 {
- label = "5"
- }
- Pre_Encapsulated_PetriNet/PortPlace (pre_t2p_5, pre_t2p_4){
- label = "6"
- }
- Pre_Encapsulated_PetriNet/Transition pre_t2p_7 {
- label = "7"
- }
- Pre_Encapsulated_PetriNet/T2P (pre_t2p_7, pre_t2p_4) {
- label = "8"
- }
- Pre_Encapsulated_PetriNet/Related (pre_t2p_2, pre_t2p_5) {
- label = "10"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Place post_t2p_1 {
- label = "1"
- }
- Post_Encapsulated_PetriNet/Port post_t2p_2 {
- label = "2"
- }
- Post_Encapsulated_PetriNet/PortPlace (post_t2p_2, post_t2p_1){
- label = "3"
- }
- Post_Encapsulated_PetriNet/Place post_t2p_4 {
- label = "4"
- }
- Post_Encapsulated_PetriNet/Port post_t2p_5 {
- label = "5"
- }
- Post_Encapsulated_PetriNet/PortPlace (post_t2p_5, post_t2p_4){
- label = "6"
- }
- Post_Encapsulated_PetriNet/Transition post_t2p_7 {
- label = "7"
- }
- Post_Encapsulated_PetriNet/T2P (post_t2p_7, post_t2p_4) {
- label = "8"
- }
- Post_Encapsulated_PetriNet/T2P (post_t2p_7, post_t2p_1) {
- label = "9"
- }
- Post_Encapsulated_PetriNet/Related (post_t2p_2, post_t2p_5) {
- label = "10"
- }
- }
- }
- {Contains} ForAll copy_transitions {
- LHS {
- Pre_Encapsulated_PetriNet/Transition {
- label = "0"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Transition ct1 {
- label = "0"
- }
- Post_PetriNet/Transition ct2 {
- label = "1"
- value_name = $
- Integer function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- }
- Post_EPN2PN_transition_link (ct1, ct2){
- label = "2"
- }
- }
- }
- {Contains} ForAll copy_places {
- LHS {
- Pre_Encapsulated_PetriNet/Place {
- label = "0"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Place cp1 {
- label = "0"
- }
- Post_PetriNet/Place cp2 {
- label = "1"
- value_tokens = $
- Integer function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "tokens")!
- $
- value_name = $
- Integer function value(model : Element, name : String, mapping : Element):
- return read_attribute(model, mapping["0"], "name")!
- $
- }
- Post_EPN2PN_place_link (cp1, cp2){
- label = "2"
- }
- }
- }
- {Contains} ForAll copy_P2T {
- LHS {
- Pre_Encapsulated_PetriNet/Place cp2t_p{
- label = "0"
- }
- Pre_Encapsulated_PetriNet/Transition cp2t_t{
- label = "1"
- }
- Pre_Encapsulated_PetriNet/P2T (cp2t_p, cp2t_t){
- label = "2"
- }
- Pre_PetriNet/Place cp2t_p2{
- label = "3"
- }
- Pre_PetriNet/Transition cp2t_t2{
- label = "4"
- }
- Pre_EPN2PN_place_link (cp2t_p, cp2t_p2){
- label = "5"
- }
- Pre_EPN2PN_transition_link (cp2t_t, cp2t_t2){
- label = "6"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Place rhs_cp2t_p{
- label = "0"
- }
- Post_Encapsulated_PetriNet/Transition rhs_cp2t_t{
- label = "1"
- }
- Post_Encapsulated_PetriNet/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
- label = "2"
- }
- Post_PetriNet/Place rhs_cp2t_p2 {
- label = "3"
- }
- Post_PetriNet/Transition rhs_cp2t_t2 {
- label = "4"
- }
- Post_EPN2PN_place_link (rhs_cp2t_p, rhs_cp2t_p2){
- label = "5"
- }
- Post_EPN2PN_transition_link (rhs_cp2t_t, rhs_cp2t_t2){
- label = "6"
- }
- Post_PetriNet/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
- label = "7"
- value_weight = $
- Integer function value(host_model : Element, name : String, mapping : Element):
- return 1!
- $
- }
- }
- }
- {Contains} ForAll copy_T2P {
- LHS {
- Pre_Encapsulated_PetriNet/Place ct2p_p{
- label = "0"
- }
- Pre_Encapsulated_PetriNet/Transition ct2p_t{
- label = "1"
- }
- Pre_Encapsulated_PetriNet/T2P (ct2p_t, ct2p_p){
- label = "2"
- }
- Pre_PetriNet/Place ct2p_p2{
- label = "3"
- }
- Pre_PetriNet/Transition ct2p_t2{
- label = "4"
- }
- Pre_EPN2PN_place_link (ct2p_p, ct2p_p2){
- label = "5"
- }
- Pre_EPN2PN_transition_link (ct2p_t, ct2p_t2){
- label = "6"
- }
- }
- RHS {
- Post_Encapsulated_PetriNet/Place rhs_ct2p_p{
- label = "0"
- }
- Post_Encapsulated_PetriNet/Transition rhs_ct2p_t{
- label = "1"
- }
- Post_Encapsulated_PetriNet/T2P (rhs_ct2p_t, rhs_ct2p_p){
- label = "2"
- }
- Post_PetriNet/Place rhs_ct2p_p2 {
- label = "3"
- }
- Post_PetriNet/Transition rhs_ct2p_t2 {
- label = "4"
- }
- Post_EPN2PN_place_link (rhs_ct2p_p, rhs_ct2p_p2){
- label = "5"
- }
- Post_EPN2PN_transition_link (rhs_ct2p_t, rhs_ct2p_t2){
- label = "6"
- }
- Post_PetriNet/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
- label = "7"
- value_weight = $
- Integer function value(host_model : Element, name : String, mapping : Element):
- return 1!
- $
- }
- }
- }
- }
- Initial (schedule, link) {}
- OnSuccess (link, merge_P2T) {}
- OnFailure (link, merge_P2T) {}
- OnSuccess (merge_P2T, merge_T2P) {}
- OnFailure (merge_P2T, merge_T2P) {}
- OnSuccess (merge_T2P, remove_old) {}
- OnFailure (merge_T2P, remove_old) {}
- OnSuccess (remove_old, copy_places) {}
- OnFailure (remove_old, copy_places) {}
- OnSuccess (copy_places, copy_transitions) {}
- OnSuccess (copy_transitions, copy_P2T) {}
- OnSuccess (copy_P2T, copy_T2P) {}
- OnSuccess (copy_T2P, success) {}
- OnFailure (copy_places, copy_transitions) {}
- OnFailure (copy_transitions, copy_P2T) {}
- OnFailure (copy_P2T, copy_T2P) {}
- OnFailure (copy_T2P, success) {}
|