Skip to content

Commit

Permalink
Clean up references between OCL files.
Browse files Browse the repository at this point in the history
Created 'all-....ocl' files to directly load invariant files.
This replaces false dependencies betweeen ocl files that appeared when
splitting between invariants and extension methods. When both are in a
single file, that creates dependencies that automatically load all the
invariants. When the extensions are split out, then the dependencies
change to those extensions and invariants won't be automatically loaded.

It would be possible to leave those invariants inclusions but this would
create a false dependency. Instead, all invariants now can be loaded
directly using one of the 'all-...ocl' files.
  • Loading branch information
steve-hickman-epistimis committed Dec 22, 2023
1 parent 91c0a9d commit bc4e146
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptualExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/logicalExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/platformExtensions.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/library.ocl'

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/all-standard-req-invariants.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/all-extended-req-invariants.ocl'
-- Optional invariants are, by definition, optional. So they don't get included automatically.
-- TODO: What mechanism should we have to load Optional invariants? These are from the UDDL Conformance suite
--include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/all-standard-opt-invariants.ocl'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conditional_entityIsUnique.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conditional_observableComposedOnce.ocl'
-- The next 3 are variations on usage of some invariants. The file names indicate which invariants are active. Don't need all 3 of them at the same time
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/entityUniqueness.observableUniqueness.conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/entityUniqueness.conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/observableUniqueness.conceptual.ocl'

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/uddl.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/datamodel.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/logical.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/platform.ocl'

Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'

--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'


package uddl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'

--import uddl : 'http://www.epistimis.com/uddl/Uddl'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'
--include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/library.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/conceptualExtensions.ocl'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* UDDL standard constraints - adjusted for this metamodel
*/
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/**
* UDDL standard constraints - adjusted for this metamodel
*/
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'

package uddl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/**
* UDDL standard constraints - adjusted for this metamodel
*/
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'

package uddl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* UDDL standard constraints - adjusted for this metamodel
*/
--import datamodel : 'http://www.opengroup.us/face/datamodel/3.0#/'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'

package uddl

Expand All @@ -18,6 +16,7 @@ package uddl
-- * from the FACE/ UDDL spec
-- *
-- * NOTE: XText automatically enforces this - this is redundant
-- * TODO: If we ever stop using XText, re-enable this
-- */
-- inv hasUniqueName('Names must be unique within a container'):
-- let parent = self.oclContainer in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* UDDL standard constraints - adjusted for this metamodel
*/
--import datamodel : 'http://www.opengroup.us/face/datamodel/3.0#/'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'

package uddl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
* UDDL standard constraints - adjusted for this metamodel
*/
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
--include 'conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'

package uddl --face::datamodel::logical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
*/
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'
--import 'http://www.epistimis.com/uddl/Uddl'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'
--include 'helpers.ocl'
--include 'conceptual.ocl'
--include 'conceptualExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'
--include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/conceptualExtensions.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/logicalExtensions.ocl'


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
* UDDL standard constraints - adjusted for this metamodel
*/
--import datamodel : 'http://www.opengroup.us/face/datamodel/3.0#/'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'
--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'

package uddl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
--include 'logical.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/logical.ocl'

package uddl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@
*/
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'
--import 'http://www.epistimis.com/uddl/Uddl'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'conceptualExtensions.ocl'
--include 'logicalExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptualExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/logicalExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/platformExtensions.ocl'

package uddl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
* UDDL standard constraints - adjusted for this metamodel
*/
--import 'http://www.epistimis.com/uddl/Uddl'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'

--include 'helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'


package uddl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
*/
import ecore : 'http://www.eclipse.org/emf/2002/Ecore#/'
--import 'http://www.epistimis.com/uddl/Uddl'
--import '../../../../../model/generated/Uddl.ecore'
import 'platform:/plugin/com.epistimis.uddl/model/generated/Uddl.ecore'
--include 'helpers.ocl'
--include 'conceptual.ocl'
--include 'conceptualExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/helpers.ocl'

include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/helpers.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptual.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/constraints/conceptualExtensions.ocl'
include 'platform:/plugin/com.epistimis.uddl/src/com/epistimis/uddl/extension/conceptualExtensions.ocl'

/**
* This contains more general capability for the EXTENSIONS at the logical level
Expand Down

0 comments on commit bc4e146

Please sign in to comment.