Browse files

generic term rewriting and function evaluation

  • Loading branch information...
1 parent aaf4f0b commit 7ab403a935886f729b6bb06d75604a2db2cdce32 @JornBettin JornBettin committed Mar 31, 2012
View
10 ...ests/src/main/java/org/s23m/cell/kernel/artifactinstantiation/InstantiationSequences.java
@@ -112,7 +112,7 @@ public void visualizationExample() {
final Set crm_viz_visibilities = crm_aviz.addConcrete(Visualization.visibilities,
addDisjunctSemanticIdentitySet("crm schema visualizedGraph | visibilities", "crm schema visualizedGraph | visibilities", testDomain));
- // add diagram information
+ // addPrivilege diagram information
final Set crm_viz_structure_diag = crm_aviz.addConcrete(Visualization.diagram,
addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1", "crm schema visualizedGraph | structure diag 1", testDomain));
arrow(Visualization.visualizedAspect_to_diagram,
@@ -124,7 +124,7 @@ public void visualizationExample() {
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add representation information
+ // addPrivilege representation information
crm_viz_structure_diag_product = crm_aviz.addConcrete(Visualization.representation,
addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product", "crm schema visualizedGraph | structure diag 1 | product", testDomain));
arrow(Visualization.diagram_to_representation,
@@ -135,7 +135,7 @@ public void visualizationExample() {
crm_viz_structure_diag_product,
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add icon to representation
+ // addPrivilege icon to representation
final Set crm_viz_structure_diag_product_icon = crm_aviz.addConcrete(Visualization.symbol,
addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product icon", "crm schema visualizedGraph | structure diag 1 | product icon", testDomain));
crm_viz_structure_diag_product_icon.identity().setPayload("here goes the content of the icon file");
@@ -147,7 +147,7 @@ public void visualizationExample() {
crm_viz_structure_diag_product.semanticIdentity(),
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add coordinates to representation
+ // addPrivilege coordinates to representation
final Set crm_viz_structure_diag_product_x = crm_aviz.addConcrete(Visualization.x,
addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product x", "crm schema visualizedGraph | structure diag 1 | product x", testDomain));
crm_viz_structure_diag_product_x.identity().setPayload("57");
@@ -245,7 +245,7 @@ public void addIcon(final Set semanticIdentity, final String iconFile) {
}
- // add icon to representation
+ // addPrivilege icon to representation
for (final Set s_to_si : graphVisualization.filterPolymorphic(Visualization.symbol_to_semantic_identity)) {
if (s_to_si.to().isEqualTo(semanticIdentity)
&& s_to_si.toEdgeEnd().isEqualTo(semanticIdentity) ) {
View
8 ....cell.kernel.tests/src/main/java/org/s23m/cell/kernel/tests/VisualisationExampleTest.java
@@ -29,7 +29,7 @@ protected void executeInstantiationSequence() {
final Set crm_viz_visibilities = crm_aviz.addConcrete(Visualization.visibilities,
Instantiation.addDisjunctSemanticIdentitySet("crm schema visualizedGraph | visibilities", "crm schema visualizedGraph | visibilities", testDomain));
- // add diagram information
+ // addPrivilege diagram information
final Set crm_viz_structure_diag = crm_aviz.addConcrete(Visualization.diagram,
Instantiation.addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1", "crm schema visualizedGraph | structure diag 1", testDomain));
Instantiation.arrow(Visualization.visualizedAspect_to_diagram,
@@ -41,7 +41,7 @@ protected void executeInstantiationSequence() {
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add representation information
+ // addPrivilege representation information
final Set crm_viz_structure_diag_product = crm_aviz.addConcrete(Visualization.representation,
Instantiation.addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product", "crm schema visualizedGraph | structure diag 1 | product", testDomain));
Instantiation.arrow(Visualization.diagram_to_representation,
@@ -52,7 +52,7 @@ protected void executeInstantiationSequence() {
crm_viz_structure_diag_product,
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add icon to representation
+ // addPrivilege icon to representation
final Set crm_viz_structure_diag_product_icon = crm_aviz.addConcrete(Visualization.symbol,
Instantiation.addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product icon", "crm schema visualizedGraph | structure diag 1 | product icon", testDomain));
crm_viz_structure_diag_product_icon.identity().setPayload("here goes the content of the icon file");
@@ -64,7 +64,7 @@ protected void executeInstantiationSequence() {
crm_viz_structure_diag_product.semanticIdentity(),
S23MSemanticDomains.minCardinality_NOTAPPLICABLE, S23MSemanticDomains.maxCardinality_NOTAPPLICABLE, S23MSemanticDomains.isNavigable_NOTAPPLICABLE, S23MSemanticDomains.isContainer_FALSE
);
- // add coordinates to representation
+ // addPrivilege coordinates to representation
final Set crm_viz_structure_diag_product_x = crm_aviz.addConcrete(Visualization.x,
Instantiation.addDisjunctSemanticIdentitySet("crm schema visualizedGraph | structure diag 1 | product x", "crm schema visualizedGraph | structure diag 1 | product x", testDomain));
crm_viz_structure_diag_product_x.identity().setPayload("57");
View
2 org.s23m.cell.kernel/src/main/java/org/s23m/cell/core/F_Instantiation.java
@@ -194,7 +194,7 @@ public static Vertex instantiateConcrete(final Identity semanticIdentity, final
&& SemanticDomain.semanticdomain.isSuperSetOf(category).is_FALSE()
&& SemanticStateOfInMemoryModel.semanticDomainIsInitialized()
) {
- if ((category).value(coreSets.isAbstract).isEqualTo( coreSets.isAbstract_FALSE) ) {
+ if (category.value(coreSets.isAbstract).isEqualTo( coreSets.isAbstract_FALSE) ) {
final Vertex temp;
temp = new Vertex((Graph) stage, semanticIdentity, category) ;
temp.addToValues(coreSets.isAbstract_FALSE);
View
6 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/api/FormulaEvaluation.java
@@ -43,7 +43,7 @@
import org.s23m.cell.platform.formulaProcessors.informationqualitylogic.Or;
import org.s23m.cell.platform.formulaProcessors.informationqualitylogic.Xor;
import org.s23m.cell.platform.models.CellEngineering;
-import org.s23m.cell.platform.models.CellPlatform;
+import org.s23m.cell.platform.models.CellPlatformAgent;
import org.s23m.cell.platform.models.CellPlatformDomain;
import org.s23m.cell.platform.models.Formula;
import org.s23m.cell.platform.models.LogicalFormula;
@@ -84,7 +84,7 @@ public static final Set evaluate(final Set formula, final Set values) {
if (CellEngineering.formula.isSuperSetOf(formula.category()).is_TRUE()) {
// fetch the proper subformula that constitutes the root of the formula
- subFormula = formula.filter(Formula.literal_to_properSubFormula).extractFirst().to();
+ subFormula = formula.extractUniqueMatch(CellPlatformDomain.literal);
} else {
subFormula = formula;
}
@@ -200,7 +200,7 @@ public static final Set evaluateSubFormula(final Set subFormula, final Arity ari
+ CellPlatformDomain.openSquareBracket.identity().name()
+ subFormula.container().identity().name()
+ CellPlatformDomain.closeSquareBracket.identity().name()
- , org.s23m.cell.platform.api.Instantiation.toSemanticDomain(CellPlatform.development));
+ , org.s23m.cell.platform.api.Instantiation.toSemanticDomain(CellPlatformAgent.development));
return FormulaEvaluation.addSubFormula(subFormula.container(), subFormula.category(), si, terms, variables, constants);
}
View
9 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/api/Instantiation.java
@@ -125,13 +125,20 @@ private static Set addDefaultContainers(final Set stage) {
final Set terminologies = org.s23m.cell.platform.api.Instantiation.instantiateConcrete(CellEngineering.terminology, stage, CellPlatformDomain.terminologies);
final Set cellVisualizatons = org.s23m.cell.platform.api.Instantiation.instantiateConcrete(Visualization.graphVisualization, stage, CellPlatformDomain.cellVisualizations);
final Set cells = org.s23m.cell.platform.api.Instantiation.instantiateConcrete(CellEngineering.organization, stage, CellPlatformDomain.cells);
+ final Set formulas = org.s23m.cell.platform.api.Instantiation.instantiateConcrete(CellEngineering.formula, stage, CellPlatformDomain.formulas);
org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, cells, languages);
org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, cells, time);
org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, cells, locations);
org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, cells, terminologies);
org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, cells, contracts);
- return stage;
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, cells);
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, languages);
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, time);
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, locations);
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, terminologies);
+ org.s23m.cell.platform.api.Instantiation.arrow(coreGraphs.visibility, formulas, contracts);
+ return stage;
}
public static Set toSemanticDomain(final Set set) {
View
4 ...ell.platform/src/main/java/org/s23m/cell/platform/formulaProcessors/FormulaEvaluator.java
@@ -1,7 +1,7 @@
package org.s23m.cell.platform.formulaProcessors;
import org.s23m.cell.Set;
-import org.s23m.cell.platform.models.CellPlatform;
+import org.s23m.cell.platform.models.CellPlatformAgent;
import org.s23m.cell.platform.models.CellPlatformDomain;
@@ -57,6 +57,6 @@ protected Set generateSemanticIdentityForEvaluationResult() {
+ CellPlatformDomain.openSquareBracket.identity().name()
+ this.subFormula.identity().name()
+ CellPlatformDomain.closeSquareBracket.identity().name()
- , org.s23m.cell.platform.api.Instantiation.toSemanticDomain(CellPlatform.development));
+ , org.s23m.cell.platform.api.Instantiation.toSemanticDomain(CellPlatformAgent.development));
}
}
View
180 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/CellContent.java
@@ -1,180 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is S23M.
- *
- * The Initial Developer of the Original Code is
- * SoftMetaWare Ltd. (SoftMetaWare).
- * Portions created by the Initial Developer are
- * Copyright (C) 2011 SoftMetaWare Ltd.
- * All Rights Reserved.
- *
- * Contributor(s):
- * Jorn Bettin
- * ***** END LICENSE BLOCK ***** */
-
-package org.s23m.cell.platform.models;
-
-import org.s23m.cell.Set;
-import org.s23m.cell.api.models.Root;
-
-/**
- * {@link CellContent} implements all instantiation semantics related to the modelling of container state machines
- * that must be enforced for all Instances/cells (instantiation level n, with n > 0)
- *
- * The semantics enforced in CellEngineering provide the basis for modelling the dynamic evolution of the S23M instantiation semantics
- */
-public final class CellContent {
-
- /*
-
- private static final Set v1 = Instantiation.arrow(coreGraphs.visibility, Root.cellengineering, CellEngineering.cellContent);
- private static final Set v7 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.cellContent, CellEngineering.language);
- private static final Set v8 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.cellContent, CellEngineering.terminology);
- private static final Set v9 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.cellContent, CellEngineering.licensing);
- private static final Set v10 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.cellContent, CellEngineering.timeConsciousness);
-
- public static final Set cell = CellEngineering.cellContent.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.cell);
- private static final Set s1 = Instantiation.arrow(coreGraphs.superSetReference, cell, TimeConsciousness.timeConsciousVertex);
-
- // additional semantics
- public static final Set semanticUnit_to_abstractWords = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_abstractWords,
- CellPlatformDomain.semanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_FALSE,
- coreSets.isContainer_FALSE,
- Language.word,
- Language.abstractWord,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s3 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_abstractWords, TimeConsciousness.timeConsciousEdge);
-
- public static final Set semanticUnit_to_abbreviations = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_abbreviations,
- CellPlatformDomain.semanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE,
- Terminology.abbreviation,
- Terminology.abbreviation,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s4 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_abbreviations, TimeConsciousness.timeConsciousEdge);
-
- public static final Set semanticUnit_to_wordDefinitions = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_wordDefinitions,
- CellPlatformDomain.semanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_TRUE,
- Terminology.wordDefinition,
- Terminology.wordDefinition,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s5 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_wordDefinitions, TimeConsciousness.timeConsciousEdge);
-
- public static final Set semanticUnit_to_oppositeSemanticUnit = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_oppositeSemanticUnit,
- CellPlatformDomain.semanticUnit,
- CellContent.cell,
- coreSets.minCardinality_1,
- coreSets.maxCardinality_1,
- coreSets.isNavigable_FALSE,
- coreSets.isContainer_FALSE,
- CellPlatformDomain.oppositeSemanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_1,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s6 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_oppositeSemanticUnit, TimeConsciousness.timeConsciousEdge);
-
- public static final Set semanticUnit_to_copyrightHolder = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_copyrightHolder,
- CellPlatformDomain.semanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_FALSE,
- coreSets.isContainer_FALSE,
- CellPlatformDomain.copyrightHolder,
- Legal.legalEntity,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s7 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_copyrightHolder, TimeConsciousness.timeConsciousEdge);
-
- public static final Set semanticUnit_to_availableLicense = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.semanticUnit_to_availableLicense,
- CellPlatformDomain.semanticUnit,
- cell,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_FALSE,
- coreSets.isContainer_FALSE,
- CellPlatformDomain.availableLicense,
- Legal.license,
- coreSets.minCardinality_0,
- coreSets.maxCardinality_n,
- coreSets.isNavigable_TRUE,
- coreSets.isContainer_FALSE
- );
- private static final Set s8 = Instantiation.arrow(coreGraphs.superSetReference, semanticUnit_to_copyrightHolder, TimeConsciousness.timeConsciousEdge);
-
- public static final Set cell_to_nativeLanguage = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
- CellPlatformDomain.cell_to_nativeLanguage,
- CellPlatformDomain.semanticUnit,
- cell,
- S23MSemanticDomains.minCardinality_0,
- S23MSemanticDomains.maxCardinality_n,
- S23MSemanticDomains.isNavigable_FALSE,
- S23MSemanticDomains.isContainer_FALSE,
- CellPlatformDomain.nativeLanguage,
- CellEngineering.language,
- S23MSemanticDomains.minCardinality_1,
- S23MSemanticDomains.maxCardinality_1,
- S23MSemanticDomains.isNavigable_TRUE,
- S23MSemanticDomains.isContainer_FALSE
- );
- private static final Set s9 = Instantiation.arrow(coreGraphs.superSetReference, cell_to_nativeLanguage, TimeConsciousness.timeConsciousEdge);
-
-*/
- static Set instantiateFeature() {
-
-
- // additional semantics
-
-
- return Root.cellengineering;
- }
-
-}
View
4 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/CellEngineering.java
@@ -55,8 +55,8 @@
public static final Set organization = Root.cellengineering.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.organization);
private static final Set s2 = Instantiation.arrow(coreGraphs.superSetReference, organization, TimeConsciousness.timeConsciousVertex);
- public static final Set formula = Root.cellengineering.addAbstract(Organization.cell, CellPlatformDomain.formula);
- public static final Set logicalFormula = Root.cellengineering.addAbstract(Organization.cell, CellPlatformDomain.logicalFormula);
+ public static final Set formula = Root.cellengineering.addConcrete(Organization.cell, CellPlatformDomain.formula);
+ public static final Set logicalFormula = Root.cellengineering.addConcrete(Organization.cell, CellPlatformDomain.logicalFormula);
private static final Set s3 = Instantiation.arrow(coreGraphs.superSetReference, formula, Organization.cell);
private static final Set s1 = Instantiation.arrow(coreGraphs.superSetReference, logicalFormula, formula);
private static final Set v1 = Instantiation.arrow(coreGraphs.visibility, logicalFormula, formula);
View
15 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/CellPlatform.java
@@ -27,16 +27,10 @@
import static org.s23m.cell.core.F_Instantiation.identityFactory;
-import org.s23m.cell.Set;
import org.s23m.cell.platform.testfoundation.TestFoundation;
public class CellPlatform {
- public static final Set s23mCellPlatform = null;
- public static final Set development = null;
- public static final Set testing = null;
- public static final Set production = null;
-
public static void instantiateFeature() {
int kernelComplexity = identityFactory.kernelComplexity();
int inMemoryComplexity = identityFactory.inMemoryComplexity();
@@ -54,11 +48,12 @@ public static void instantiateFeature() {
LogicalFormula.instantiateFeature();
CellVisualization.instantiateFeature();
RepresentationStyleCategories.instantiateFeature();
+ CellPlatformAgent.instantiateFeature();
- final Set s23mCellPlatform = org.s23m.cell.platform.api.Instantiation.addAgent("cell platform", "cell platform");
- final Set development = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "development", "development");
- final Set testing = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "test", "test");
- final Set production = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "production", "production");
+ //final Set s23mCellPlatform = org.s23m.cell.platform.api.Instantiation.addAgent("cell platform", "cell platform");
+ //final Set development = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "development", "development");
+ //final Set testing = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "test", "test");
+ //final Set production = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "production", "production");
kernelComplexity = identityFactory.kernelComplexity();
inMemoryComplexity = identityFactory.inMemoryComplexity();
View
50 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/CellPlatformAgent.java
@@ -0,0 +1,50 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is S23M.
+ *
+ * The Initial Developer of the Original Code is
+ * SoftMetaWare Ltd. (SoftMetaWare).
+ * Portions created by the Initial Developer are
+ * Copyright (C) 2011 SoftMetaWare Ltd.
+ * All Rights Reserved.
+ *
+ * Contributor(s):
+ * Jorn Bettin
+ * ***** END LICENSE BLOCK ***** */
+
+package org.s23m.cell.platform.models;
+
+import org.s23m.cell.Set;
+
+/**
+ * {@link CellPlatformAgent} defines the software development, testing, and production stages of the S23M Cell Platform
+ */
+public final class CellPlatformAgent {
+
+ public static final Set s23mCellPlatform = org.s23m.cell.platform.api.Instantiation.addAgent("cell platform", "cell platform");
+ public static final Set development = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "development", "development");
+ public static final Set testing = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "test", "test");
+ public static final Set production = org.s23m.cell.platform.api.Instantiation.addStage(s23mCellPlatform, "production", "production");
+
+
+ static Set instantiateFeature() {
+
+
+ // additional semantics
+
+
+ return s23mCellPlatform;
+ }
+
+}
View
13 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/CellPlatformDomain.java
@@ -40,12 +40,12 @@
public static final Set organization = Instantiation.addSemanticRole("organization", "organizations", cellPlatformDomain, legalEntity);
public static final Set privilege = Instantiation.addDisjunctSemanticIdentitySet("privilege", "privileges", cellPlatformDomain);
- public static final Set find = Instantiation.addSemanticRole("find", "set of find", cellPlatformDomain, privilege);
- public static final Set read = Instantiation.addSemanticRole("read", "set of read", cellPlatformDomain, privilege);
- public static final Set add = Instantiation.addSemanticRole("organization", "organizations", cellPlatformDomain, privilege);
- public static final Set modify = Instantiation.addSemanticRole("add", "set of add", cellPlatformDomain, privilege);
- public static final Set execute = Instantiation.addSemanticRole("execute", "set of execute", cellPlatformDomain, privilege);
- public static final Set superUser = Instantiation.addSemanticRole("super user", "set of super users", cellPlatformDomain, privilege);
+ public static final Set findPrivilege = Instantiation.addSemanticRole("find privilege", "set of find privileges", cellPlatformDomain, privilege);
+ public static final Set readPrivilege = Instantiation.addSemanticRole("read privilege", "set of read privileges", cellPlatformDomain, privilege);
+ public static final Set addPrivilege = Instantiation.addSemanticRole("add privilege", "add privileges", cellPlatformDomain, privilege);
+ public static final Set modifyPrivilege = Instantiation.addSemanticRole("modify privilege", "set of modify privileges", cellPlatformDomain, privilege);
+ public static final Set executePrivilege = Instantiation.addSemanticRole("execute privilege", "set of execute privileges", cellPlatformDomain, privilege);
+ public static final Set superUserPrivilege = Instantiation.addSemanticRole("super user privilege", "set of super user privileges", cellPlatformDomain, privilege);
public static final Set authorized = Instantiation.addDisjunctSemanticIdentitySet("authorized", "set of authorized", cellPlatformDomain);
public static final Set forbidden = Instantiation.addDisjunctSemanticIdentitySet("forbidden", "set of forbidden", cellPlatformDomain);
public static final Set accessGrant = Instantiation.addDisjunctSemanticIdentitySet("access grant", "set of access grants", cellPlatformDomain);
@@ -135,6 +135,7 @@
public static final Set organizations = Instantiation.addDisjunctSemanticIdentitySet("organizations", "set of organizations", cellPlatformDomain);
public static final Set terminologies = Instantiation.addDisjunctSemanticIdentitySet("terminologies", "set of terminologies", cellPlatformDomain);
public static final Set cellVisualizations = Instantiation.addDisjunctSemanticIdentitySet("cell visualizations", "set of cell visualizations", cellPlatformDomain);
+ public static final Set formulas = Instantiation.addDisjunctSemanticIdentitySet("formulas", "set of formulas", cellPlatformDomain);
public static final Set timeConsciousness = Instantiation.addDisjunctSemanticIdentitySet("time consciousness", "set of time consciousness", cellPlatformDomain);
public static final Set timeConsciousVertex = Instantiation.addDisjunctSemanticIdentitySet("time conscious vertex", "set of time conscious verices", cellPlatformDomain);
View
10 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/Formula.java
@@ -30,31 +30,30 @@
import org.s23m.cell.Set;
import org.s23m.cell.api.Instantiation;
-import org.s23m.cell.api.models.S23MSemanticDomains;
public class Formula {
private static final Set v6 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.formula, CellEngineering.organization);
public static final Set properSubFormula = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.properSubFormula);
- public static final Set literal = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.literal);
- private static final Set maxC = literal.addToValues(S23MSemanticDomains.maxCardinality_1);
+ //public static final Set literal = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.literal);
+ //private static final Set maxC = literal.addToValues(S23MSemanticDomains.maxCardinality_1);
public static final Set unaryFunction = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.unaryFunction);
public static final Set binaryFunction = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.binaryFunction);
public static final Set naryFunction = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.naryFunction);
public static final Set variable = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.variable);
public static final Set constant = CellEngineering.formula.addAbstract(Organization.cell, CellPlatformDomain.constant);
- private static final Set s0 = Instantiation.arrow(coreGraphs.superSetReference, literal, Organization.cell);
+ //private static final Set s0 = Instantiation.arrow(coreGraphs.superSetReference, literal, Organization.cell);
private static final Set s1 = Instantiation.arrow(coreGraphs.superSetReference, properSubFormula, Organization.cell);
private static final Set s2 = Instantiation.arrow(coreGraphs.superSetReference, unaryFunction, properSubFormula);
private static final Set s3 = Instantiation.arrow(coreGraphs.superSetReference, binaryFunction, properSubFormula);
private static final Set s4 = Instantiation.arrow(coreGraphs.superSetReference, naryFunction, properSubFormula);
private static final Set s5 = Instantiation.arrow(coreGraphs.superSetReference, variable, properSubFormula);
private static final Set s6 = Instantiation.arrow(coreGraphs.superSetReference, constant, properSubFormula);
- public static final Set literal_to_properSubFormula = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
+ /*public static final Set literal_to_properSubFormula = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
CellPlatformDomain.literal_to_properSubFormula,
literal,
literal,
@@ -69,6 +68,7 @@
coreSets.isNavigable_TRUE,
coreSets.isContainer_FALSE
);
+ */
public static final Set unaryFunction_to_term = Instantiation.arrow(TimeConsciousness.timeConsciousEdge,
CellPlatformDomain.unaryFunction_to_term,
unaryFunction,
View
24 org.s23m.cell.platform/src/main/java/org/s23m/cell/platform/models/Organization.java
@@ -47,23 +47,23 @@
// F-R-A-M-E-S access control paradigm
public static final Set privilege = CellEngineering.organization.addAbstract(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.privilege);
- public static final Set find = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.find);
- public static final Set read = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.read);
- public static final Set add = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.add);
- public static final Set modify = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.modify);
- public static final Set execute = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.execute);
- public static final Set superUser = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.superUser);
+ public static final Set findPrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.findPrivilege);
+ public static final Set readPrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.readPrivilege);
+ public static final Set addPrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.addPrivilege);
+ public static final Set modifyPrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.modifyPrivilege);
+ public static final Set executePrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.executePrivilege);
+ public static final Set superUserPrivilege = CellEngineering.organization.addConcrete(TimeConsciousness.timeConsciousVertex, CellPlatformDomain.superUserPrivilege);
private static final Set s2 = Instantiation.arrow(coreGraphs.superSetReference, member, TimeConsciousness.timeConsciousVertex);
private static final Set s10 = Instantiation.arrow(coreGraphs.superSetReference, role, TimeConsciousness.timeConsciousVertex);
private static final Set s11 = Instantiation.arrow(coreGraphs.superSetReference, privilege, TimeConsciousness.timeConsciousVertex);
- private static final Set s12 = Instantiation.arrow(coreGraphs.superSetReference, find, privilege);
- private static final Set s13 = Instantiation.arrow(coreGraphs.superSetReference, read, privilege);
- private static final Set s14 = Instantiation.arrow(coreGraphs.superSetReference, add, privilege);
- private static final Set s15 = Instantiation.arrow(coreGraphs.superSetReference, modify, privilege);
- private static final Set s16 = Instantiation.arrow(coreGraphs.superSetReference, execute, privilege);
- private static final Set s17 = Instantiation.arrow(coreGraphs.superSetReference, superUser, privilege);
+ private static final Set s12 = Instantiation.arrow(coreGraphs.superSetReference, findPrivilege, privilege);
+ private static final Set s13 = Instantiation.arrow(coreGraphs.superSetReference, readPrivilege, privilege);
+ private static final Set s14 = Instantiation.arrow(coreGraphs.superSetReference, addPrivilege, privilege);
+ private static final Set s15 = Instantiation.arrow(coreGraphs.superSetReference, modifyPrivilege, privilege);
+ private static final Set s16 = Instantiation.arrow(coreGraphs.superSetReference, executePrivilege, privilege);
+ private static final Set s17 = Instantiation.arrow(coreGraphs.superSetReference, superUserPrivilege, privilege);
private static final Set v7 = Instantiation.arrow(coreGraphs.visibility, CellEngineering.organization, member);
View
9 ...ll.platform/src/main/java/org/s23m/cell/platform/testfoundation/AgencyTestFoundation.java
@@ -25,7 +25,10 @@
package org.s23m.cell.platform.testfoundation;
import org.s23m.cell.Set;
-
+import org.s23m.cell.platform.api.Instantiation;
+import org.s23m.cell.platform.models.CellEngineering;
+import org.s23m.cell.platform.models.CellPlatformDomain;
+import org.s23m.cell.platform.models.LogicalFormula;
public class AgencyTestFoundation {
@@ -41,6 +44,10 @@ public static Set instantiateFeature() {
org.s23m.cell.platform.api.Instantiation.addStage(scruffy, "test2", "test2s");
org.s23m.cell.platform.api.Instantiation.addStage(scruffy, "prod2", "prod2s");
final Set louise = org.s23m.cell.platform.api.Instantiation.addAgent("Louise", "set of Louise");
+ final Set lf1 = Instantiation.addDisjunctSemanticIdentitySet("logical formula 1", "logical formula 1", Instantiation.toSemanticDomain(dev1));
+ final Set formula1 = dev1.filter(CellEngineering.formula).extractFirst().addConcrete(CellEngineering.logicalFormula, lf1);
+ final Set literal1 = formula1.addConcrete(LogicalFormula.and, CellPlatformDomain.literal);
+
return snowy;
}
}

0 comments on commit 7ab403a

Please sign in to comment.