Skip to content
Snippets Groups Projects
Commit 42fe9bd1 authored by nullsub's avatar nullsub
Browse files

update editpolicy files

parent 9e532bf7
Branches
No related tags found
No related merge requests found
Showing
with 64 additions and 72 deletions
......@@ -2,7 +2,7 @@
Create_Attribute NaturalType (true) when true;
Create_Operation NaturalType (true) when true;
Create_Property NaturalType (true) when true;
Add_Property NaturalType (true) when true;
Add_Property NaturalType (true) when true;
//NaturalType
Create_Attribute DataType (true) when true;
......
//https://github.com/leondart/FRaMED/wiki/EditPolicy-Rules
//base rules
Add RoleType (true) when InType(CompartmentType);
Create RoleType (true) when InType(CompartmentType);
Add NaturalType (true) when true;
Add Group (true) when true;
Create NaturalType (true) when true;
Create Group (true) when true;
Create Inheritance (true) when true;
Create Relationship (true) when true;
//enable all context menues
//Execute CompartmentType (true) when true;
Execute Relationship (true) when true;
//Execute Fulfillment (true) when true;
//Execute Inheritance (true) when true;
<?xml version="1.0" encoding="ASCII"?>
<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
<policies action="Add" actionType="RoleType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
</policies>
<policies actionType="RoleType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:InType" type="CompartmentType"/>
</policies>
<policies action="Add" actionType="NaturalType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies action="Add" actionType="Group">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="NaturalType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="Group">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="Inheritance">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="Relationship">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies action="Execute" actionType="CompartmentType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies action="Execute" actionType="Relationship">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
</editpolicymodel:Model>
//Fullfillment or Players??
//Fullfillment or Players??
Start Fulfillment (Naturals) when IsSourceType(NaturalType);
Add Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
Create Fulfillment (Naturals) when IsSourceType(NaturalType) and IsTargetType(CompartmentType);
......@@ -17,4 +17,6 @@ Reconnect Fulfillment (Compartments) when IsSourceType(CompartmentType) and IsTa
Start Fulfillment (Dates) when IsSourceType(DataType);
Add Fulfillment (Dates) when IsSourceType(DataType);
Create Fulfillment (Dates) when IsSourceType(DataType);
Reconnect Fulfillment (Dates) when IsSourceType(DataType);
\ No newline at end of file
Reconnect Fulfillment (Dates) when IsSourceType(DataType);
Execute Fulfillment (true) when true;
......@@ -106,4 +106,8 @@
<featureRule xsi:type="editpolicymodel:IsFeature" featureName="Dates"/>
<constraintRule xsi:type="editpolicymodel:IsSourceType" type="DataType"/>
</policies>
<policies action="Execute" actionType="Fulfillment">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
</editpolicymodel:Model>
Add Group (true) when true;
Create Group (true) when true;
<?xml version="1.0" encoding="ASCII"?>
<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
<policies action="Add" actionType="Group">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="Group">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
</editpolicymodel:Model>
//Inheritance
//Inheritance
Start Inheritance (Naturals) when IsSourceType(NaturalType);
Add Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
\ No newline at end of file
Reconnect Inheritance (Naturals) when IsSourceType(NaturalType) and SourceEqualsTargetType();
Execute Inheritance (true) when true;
Create Inheritance (true) when true;
......@@ -18,4 +18,12 @@
<rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
</constraintRule>
</policies>
<policies action="Execute" actionType="Inheritance">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="Inheritance">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
</editpolicymodel:Model>
Add NaturalType (true) when true;
Create NaturalType (true) when true;
<?xml version="1.0" encoding="ASCII"?>
<editpolicymodel:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:editpolicymodel="http://framed/editpolicymodel">
<policies action="Add" actionType="NaturalType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
<policies actionType="NaturalType">
<featureRule xsi:type="editpolicymodel:TrueFeatureRule"/>
<constraintRule xsi:type="editpolicymodel:TrueConstraintRule"/>
</policies>
</editpolicymodel:Model>
......@@ -5,4 +5,4 @@ Add CompartmentType (!Compartment_Types) when !InType(CompartmentType) and !Cont
Create CompartmentType (!Compartment_Types) when !InType(CompartmentType) and !ContainsCompartment();
Add CompartmentType (Compartment_Types) when !InType(CompartmentType);
Create CompartmentType (Compartment_Types) when !InType(CompartmentType);
\ No newline at end of file
\ No newline at end of file
//Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance
Start Inheritance (Compartment_Inheritance) when IsSourceType(CompartmentType);
Add Inheritance (Compartment_Inheritance) when IsSourceType(CompartmentType) and !SourceEqualsTarget() and SourceEqualsTargetType(); //acyclic
\ No newline at end of file
\ No newline at end of file
//Playing_own_roles
//Playing_own_roles
Start Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType);
Add Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTargetType();
Create Fulfillment (Playable_by_Defining_Compartment) when IsSourceType(CompartmentType) and SourceEqualsTargetType();
......
......@@ -11,6 +11,13 @@
<rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
</constraintRule>
</policies>
<policies actionType="Fulfillment">
<featureRule xsi:type="editpolicymodel:IsFeature" featureName="Playable_by_Defining_Compartment"/>
<constraintRule xsi:type="editpolicymodel:AndConstraintRule">
<rules xsi:type="editpolicymodel:IsSourceType" type="CompartmentType"/>
<rules xsi:type="editpolicymodel:SourceEqualsTargetType"/>
</constraintRule>
</policies>
<policies action="Reconnect" actionType="Fulfillment">
<featureRule xsi:type="editpolicymodel:IsFeature" featureName="Playable_by_Defining_Compartment"/>
<constraintRule xsi:type="editpolicymodel:AndConstraintRule">
......
......@@ -3,4 +3,4 @@ Create_Property CompartmentType (Compartment_Properties) when true;
Create_Attribute CompartmentType (Compartment_Properties) when true;
Create_Operation CompartmentType (Compartment_Behavior) when true;
Add_Property CompartmentType (true) when true;
\ No newline at end of file
\ No newline at end of file
//DataTypes
Add DataType (Data_Types) when true;
Create DataType (Data_Types) when true;
\ No newline at end of file
Create DataType (Data_Types) when true;
\ No newline at end of file
//Inheritance or Role_Inheritance/Data_Type_Inheritance/Compartment_Inheritance
Start Inheritance (Data_Type_Inheritance) when IsSourceType(DataType);
Start Inheritance (Data_Type_Inheritance) when IsSourceType(DataType);
Add Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); // check acyclic
Reconnect Inheritance (Data_Type_Inheritance) when IsSourceType(DataType) and !SourceEqualsTarget() and SourceEqualsTargetType(); // check acyclic
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment