Type: UMLKind 789 996 value attribute role variable constant function queryop operation classid Entity: CExpression 469 389 null * abstract needsBracket boolean 3 false false false kind String 3 false false false cexpId String 3 false true false Operation: toString CExpression String query abstract true true Operation: defineCOpRef CExpression CExpression op COperation query static true CBasicExpression->exists( be | be.cexpId = op.name + "_ref" & be.data = op.name & be.type = op.returnType & result = be ) Entity: CBinaryExpression 255 543 CExpression * operator String 3 false false false Operation: toString CBinaryExpression String query true result = left + " " + operator + " " + right Entity: CUnaryExpression 854 462 CExpression * operator String 3 false false false Operation: toString CUnaryExpression String query true result = operator + argument Entity: CType 53 437 null * abstract ctypeId String 3 false true false name String 3 false false false Entity: CBasicExpression 485 655 CExpression * data String 3 false false false Operation: parameterString CBasicExpression String p Sequence(CExpression) query true ( p.size = 0 => result = "" ) & ( p.size = 1 => result = p[1].toString() ) & ( p.size > 1 => result = p[1] + ", " + parameterString(p.tail) ) Operation: parString CBasicExpression String query true ( parameters.size = 0 => result = "" ) & ( parameters.size > 0 => result = "(" + parameterString(parameters) + ")" ) Operation: toString CBasicExpression String query true ( arrayIndex.size = 0 & reference.size = 0 => result = data + parString() ) & ( arrayIndex.size > 0 & reference.size = 0 => result = data + "[" + arrayIndex.any + " -1]" ) & ( arrayIndex.size = 0 & reference.size > 0 => result = reference.any + "->" + data ) & ( arrayIndex.size > 0 & reference.size > 0 => result = reference.any + "->" + data + "[" + arrayIndex.any + " -1]" ) Entity: Type 13 254 null * abstract typeId String 3 false true false name String 3 false false false Entity: Classifier 28 408 Type * abstract Entity: DataType 15 496 Classifier * abstract Entity: PrimitiveType 5 572 DataType * Entity: Entity 138 464 Classifier * isAbstract boolean 3 false false false isInterface boolean 3 false false false Entity: CollectionType 139 547 DataType * Association: Entity Operation 1 326 346 208 530 0 ownedOperation owner ordered Entity: Expression 268 40 null * abstract needsBracket boolean 3 false false false umlKind UMLKind 3 false false false expId String 3 false true false Operation: mapExpression Expression CExpression abstract true true Operation: createCOpCall Expression CBasicExpression id String name String true CBasicExpression->exists( cbe | cbe.cexpId = id & cbe.data = name & cbe.type = CType[type.typeId] & cbe.elementType = CType[elementType.typeId] & result = cbe ) Operation: createCUnaryOpCall Expression CBasicExpression id String name String arg CExpression true CBasicExpression->exists( cbe | cbe.cexpId = id & cbe.data = name & arg : cbe.parameters & cbe.type = CType[type.typeId] & cbe.elementType = CType[elementType.typeId] & result = cbe ) Operation: createCBinOpCall Expression CBasicExpression id String name String le CExpression re CExpression true CBasicExpression->exists( cbe | cbe.cexpId = id & cbe.data = name & le : cbe.parameters & re : cbe.parameters & cbe.type = CType[type.typeId] & cbe.elementType = CType[elementType.typeId] & result = cbe ) Operation: cast Expression CUnaryExpression typ String e CExpression static true CUnaryExpression->exists( ce | ce.cexpId = e.cexpId + "_cast" & ce.operator = "(" + typ + ") " & ce.argument = e & result = ce ) Operation: clength Expression CExpression cexp CExpression query true result = createCUnaryOpCall(expId + "_len", "length", Expression.cast("void**", cexp)) Operation: cop Expression String aop String static query true (aop = "not" => result = "!") & (aop = "&" => result = "&&") & (aop = "or" => result = "||") & (aop = "mod" => result = "%") & (aop = "=" => result = "==") & (aop = "/=" => result = "!=") & (true => result = aop) Operation: cfunctionName Expression String fname String static query true (fname = "round" => result = "oclRound") & (fname = "floor" => result = "oclFloor") & (fname = "ceil" => result = "oclCeil") & (fname = "abs" => result = "fabs") & (fname = "->toLowerCase" => result = "toLowerCase") & (fname = "->toUpperCase" => result = "toUpperCase") & (fname = "->hasPrefix" or fname = "hasPrefix" => result = "startsWith") & (fname = "->hasSuffix" or fname = "hasSuffix" => result = "endsWith") & (fname = "->characters" => result = "characters") & (fname = "->toInteger" => result = "atoi") & (fname = "->toReal" => result = "atof") & (true => result = fname) Operation: isCFunction1 Expression boolean fname String static query true (fname = "sqrt" or fname = "exp" or fname = "log" or fname = "sin" or fname = "cos" or fname = "tan" or fname = "pow" or fname = "log10" or fname = "cbrt" or fname = "tanh" or fname = "cosh" or fname = "sinh" or fname = "asin" or fname = "acos" or fname = "atan" or fname = "ceil" or fname = "round" or fname = "floor" => result = true) Operation: isComparitor Expression boolean fname String static query true (fname = "=" or fname = "/=" or fname = "<" or fname = ">" or fname = "<=" or fname = ">=" => result = true) Operation: isInclusion Expression boolean fname String static query true (fname = ":" or fname = "->includes" or fname = "<:" or fname = "->includesAll" => result = true) Operation: isExclusion Expression boolean fname String static query true (fname = "/:" or fname = "/<:" or fname = "->excludes" or fname = "->excludesAll" => result = true) Operation: isStringOp Expression boolean fname String static query true (fname = "->indexOf" or fname = "->count" or fname = "->hasPrefix" or fname = "->hasSuffix" => result = true) Operation: isUnaryStringOp Expression boolean fname String static query true (fname = "->size" or fname = "->first" or fname = "->last" or fname = "->front" or fname = "->tail" or fname = "->reverse" or fname = "->display" => result = true) Operation: isCollectionOp Expression boolean fname String static query true (fname = "->including" or fname = "->excluding" or fname = "->append" or fname = "->count" or fname = "->indexOf" or fname = "->union" or fname = "->intersection" or fname = "^" or fname = "->isUnique" or fname = "->sortedBy") => result = true Operation: isUnaryCollectionOp Expression boolean fname String static query true (fname = "->size" or fname = "->any" or fname = "->reverse" or fname = "->front" or fname = "->tail" or fname = "->first" or fname = "->last" or fname = "->sort" or fname = "->asSet" or fname = "->asSequence") => result = true Operation: isIteratorOp Expression boolean fname String static query true (fname = "->forAll" or fname = "->exists" or fname = "->exists1" or fname = "->select" or fname = "->reject") => result = true Operation: isReduceOp Expression boolean fname String static query true (fname = "->min" or fname = "->max" or fname = "->sum" or fname = "->prd") => result = true Entity: BinaryExpression 57 160 Expression * operator String 3 false false false variable String 3 false false false Operation: mapIteratorExpression BinaryExpression CExpression op String le CExpression re CExpression true result = createCBinOpCall(expId, op + left.elementType.name, le, CExpression.defineCOpRef(CProgram.allInstances.any.defineCOp(re, variable, le.elementType) ) ) Operation: mapAddExpression BinaryExpression CExpression le CExpression re CExpression query true (left.type.name = "String" & right.type.name = "String" => result = createCBinOpCall(expId, "concatenateStrings", le, re)) & (true => CBinaryExpression->exists( ce | ce.cexpId = expId & ce.operator = "+" & ce.left = le & ce.right = re & ce.type = CType[type.typeId] & ce.elementType = CType[elementType.typeId] & result = ce ) ) Operation: mapSubtractExpression BinaryExpression CExpression le CExpression re CExpression query true (left.type.name = "String" & right.type.name = "String" => result = createCBinOpCall(expId, "subtractString", le, re)) & (left.type.name = "Set" or left.type.name = "Sequence" => result = createCBinOpCall(expId, "removeAll" + left.elementType.name, le, re)) & (true => CBinaryExpression->exists( ce | ce.operator = "-" & ce.cexpId = expId & ce.left = le & ce.right = re & ce.type = CType[type.typeId] & ce.elementType = CType[elementType.typeId] & result = ce ) ) Operation: mapComparitorExpression BinaryExpression CExpression le CExpression re CExpression query true (left.type.name = "String" & right.type.name = "String" => CBinaryExpression->exists( be | be.cexpId = expId & be.operator = Expression.cop(operator) & be.left = createCBinOpCall(expId + "_strcmp", "strcmp", le, re) & CBasicExpression->exists( zero | zero.data = "0" & zero.cexpId = expId + "_0" & be.right = zero ) & be.needsBracket = true & result = be ) ) & (true => CBinaryExpression->exists( ce | ce.cexpId = expId & ce.operator = operator & ce.left = le & ce.right = re & ce.type = CType[type.typeId] & ce.elementType = CType[elementType.typeId] & result = ce ) ) Operation: mapEqualityExpression BinaryExpression CExpression le CExpression re CExpression query true (left.type.name = "String" & right.type.name = "String" => result = mapComparitorExpression(le, re)) & (left.type.name = "Set" => result = createCBinOpCall(expId, "equalsSet", Expression.cast("void**", le), Expression.cast("void**", re)) ) & (left.type.name = "Sequence" => result = createCBinOpCall(expId, "equalsSequence", Expression.cast("void**", le), Expression.cast("void**", re)) ) & (true => CBinaryExpression->exists( ce | ce.cexpId = expId & ce.operator = "==" & ce.left = le & ce.right = re & ce.type = CType[type.typeId] & ce.elementType = CType[elementType.typeId] & result = ce ) ) Operation: mapInclusionExpression BinaryExpression CExpression le CExpression re CExpression query true (operator = ":" => result = createCBinOpCall(expId, "isIn", Expression.cast("void*", le), Expression.cast("void**", re)) ) & (operator = "->includes" => result = createCBinOpCall(expId, "isIn", Expression.cast("void*", re), Expression.cast("void**", le)) ) & (operator = "->includesAll" => result = createCBinOpCall(expId, "containsAll", Expression.cast("void**",le), Expression.cast("void**",re)) ) & (operator = "<:" => result = createCBinOpCall(expId, "containsAll", Expression.cast("void**", re), Expression.cast("void**", le)) ) Operation: mapExclusionExpression BinaryExpression CExpression le CExpression re CExpression query true (operator = "/:" => CUnaryExpression->exists( nin | nin.cexpId = expId & nin.operator = "!" & nin.argument = createCBinOpCall(expId + "_isIn", "isIn", Expression.cast("void*", le), Expression.cast("void**", re)) & nin.type = CType[type.typeId] & nin.elementType = CType[elementType.typeId] & result = nin ) ) & (operator = "->excludes" => CUnaryExpression->exists( nin | nin.cexpId = expId & nin.operator = "!" & nin.argument = createCBinOpCall(expId + "_isIn", "isIn", Expression.cast("void*", re), Expression.cast("void**", le)) & nin.type = CType[type.typeId] & nin.elementType = CType[elementType.typeId] & result = nin ) ) & (operator = "->excludesAll" => result = createCBinOpCall(expId, "disjoint", Expression.cast("void**", le), Expression.cast("void**", re)) ) & (operator = "/<:" => CUnaryExpression->exists( nin | nin.cexpId = expId & nin.operator = "!" & nin.argument = createCBinOpCall(expId + "_containsAll", "containsAll", Expression.cast("void**", re), Expression.cast("void**", le)) & nin.type = CType[type.typeId] & nin.elementType = CType[elementType.typeId] & result = nin ) ) Operation: mapStringExpression BinaryExpression CExpression le CExpression re CExpression query true (operator = "->count" => result = createCBinOpCall(expId, "countString", le, re) ) & (operator = "->indexOf" => result = createCBinOpCall(expId, "indexOfString", le, re) ) & (true => CBasicExpression->exists( be | be.cexpId = expId & be.data = Expression.cfunctionName(operator) & le : be.parameters & re : be.parameters & result = be ) ) Operation: mapCollectionExpression BinaryExpression CExpression le CExpression re CExpression query true (operator = "->including" & left.type.name = "Set" => result = createCBinOpCall(expId, "insert" + left.elementType.name, le, re) ) & (operator = "->including" & left.type.name = "Sequence" => result = createCBinOpCall(expId, "append" + left.elementType.name, le, re) ) & (operator = "->excluding" => result = createCBinOpCall(expId, "remove" + left.elementType.name, le, re) ) & (operator = "->append" => result = createCBinOpCall(expId, "append" + left.elementType.name, le, re) ) & (operator = "->count" => result = createCBinOpCall(expId, "count", Expression.cast("void*", re), Expression.cast("void**", le)) ) & (operator = "->indexOf" => result = createCBinOpCall(expId, "indexOf", Expression.cast("void*", re), Expression.cast("void**", le)) ) & (operator = "->union" => result = createCBinOpCall(expId, "union" + left.elementType.name, le, re) ) & (operator = "^" => result = createCBinOpCall(expId, "concatenate" + left.elementType.name, le, re) ) & (operator = "->intersection" => result = createCBinOpCall(expId, "intersection" + left.elementType.name, le, re) ) & (operator = "->isUnique" => result = createCBinOpCall(expId, "isUnique" + left.elementType.name, le, re) ) Operation: mapBinaryExpression BinaryExpression CExpression lexp CExpression rexp CExpression query true (operator = "+" => result = mapAddExpression(lexp, rexp)) & (operator = "-" => result = mapSubtractExpression(lexp, rexp)) & (operator = "=" => result = mapEqualityExpression(lexp,rexp)) & (Expression.isComparitor(operator) => result = mapComparitorExpression(lexp,rexp)) & (Expression.isInclusion(operator) => result = mapInclusionExpression(lexp,rexp)) & (Expression.isExclusion(operator) => result = mapExclusionExpression(lexp,rexp)) & (Expression.isIteratorOp(operator) => result = mapIteratorExpression(operator.tail.tail, lexp, rexp)) & (operator = "->collect" => result = Expression.cast(rexp.type + "*", mapIteratorExpression("collect", lexp, rexp))) & (left.type.name = "String" & Expression.isStringOp(operator) => result = mapStringExpression(lexp,rexp)) & ((left.type.name = "Set" or left.type.name = "Sequence") & Expression.isCollectionOp(operator) => result = mapCollectionExpression(lexp,rexp)) & (true => CBinaryExpression->exists( c | c.cexpId = expId & c.left = lexp & c.right = rexp & c.operator = Expression.cop(operator) & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c ) ) Operation: mapExpression BinaryExpression CExpression true result = mapBinaryExpression(left.mapExpression(),right.mapExpression()) Operation: clength BinaryExpression CExpression cexp CExpression query true (operator = "->collect" => result = createCUnaryOpCall(expId + "_len", "length", Expression.cast("void**", left.mapExpression() ))) & (true => result = createCUnaryOpCall(expId + "_len", "length", Expression.cast("void**", cexp))) Entity: UnaryExpression 654 112 Expression * operator String 3 false false false Operation: mapReduceExpression UnaryExpression CExpression arg CExpression query true (operator[1] = "-" & operator[2] = ">" => result = createCBinOpCall(expId, operator.tail.tail + argument.elementType.name, arg, argument.clength(arg)) ) & (true => result = createCBinOpCall(expId, operator + argument.elementType.name, arg, argument.clength(arg)) ) Operation: mapStringExpression UnaryExpression CExpression arg CExpression query true (operator = "->size" => result = createCUnaryOpCall(expId, "strlen", arg) ) & (operator = "->first" => result = createCUnaryOpCall(expId, "firstString", arg) ) & (operator = "->last" => result = createCUnaryOpCall(expId, "lastString", arg) ) & (operator = "->front" => result = createCUnaryOpCall(expId, "frontString", arg) ) & (operator = "->tail" => result = createCUnaryOpCall(expId, "tailString", arg) ) & (operator = "->reverse" => result = createCUnaryOpCall(expId, "reverseString", arg) ) & (operator = "->display" => result = createCUnaryOpCall(expId, "displayString", arg) ) & (true => result = createCUnaryOpCall(expId, Expression.cfunctionName(operator), arg) ) Operation: mapCollectionExpression UnaryExpression CExpression arg CExpression query true (operator = "->size" => result = createCUnaryOpCall(expId, "length", Expression.cast("void**", arg)) ) & (operator = "->any" => result = createCUnaryOpCall(expId, "any", Expression.cast("void**", arg)) ) & (operator = "->first" => result = createCUnaryOpCall(expId, "first", Expression.cast("void**", arg)) ) & (operator = "->last" => result = createCUnaryOpCall(expId, "last", Expression.cast("void**", arg)) ) & (operator = "->front" => result = createCUnaryOpCall(expId, "front" + elementType.name, arg) ) & (operator = "->tail" => result = createCUnaryOpCall(expId, "tail" + elementType.name, arg) ) & (operator = "->reverse" => result = createCUnaryOpCall(expId, "reverse" + elementType.name, arg) ) & (operator = "->asSet" => result = createCUnaryOpCall(expId, "asSet" + elementType.name, arg) ) & (operator = "->asSequence" => result = arg ) & (true => result = createCUnaryOpCall(expId, Expression.cfunctionName(operator), arg) ) Operation: mapUnaryExpression UnaryExpression CExpression arg CExpression query true (Expression.isReduceOp(operator) => result = mapReduceExpression(arg)) & (argument.type.name = "String" & Expression.isUnaryStringOp(operator) => result = mapStringExpression(arg)) & (operator = "->display" => result = createCUnaryOpCall(expId, "display" + argument.type, arg)) & ((argument.type.name = "Set" or argument.type.name = "Sequence") & Expression.isUnaryCollectionOp(operator) => result = mapCollectionExpression(arg)) & (operator.size > 2 & Expression.isCFunction1(operator.tail.tail) => CBasicExpression->exists( c | c.cexpId = expId & c.data = Expression.cfunctionName(operator.tail.tail) & c.kind = "function" & c.parameters = Sequence{ arg } & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) & (true => CUnaryExpression->exists( c | c.cexpId = expId & c.operator = Expression.cop(operator) & c.argument = arg & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c ) ) Operation: mapExpression UnaryExpression CExpression true result = mapUnaryExpression(argument.mapExpression()) Entity: CollectionExpression 646 38 Expression * isOrdered boolean 3 false false false Operation: mapCollectionExpression CollectionExpression CExpression id String elems Sequence(CExpression) query true (elems.size = 0 => result = createCOpCall(id, "new" + elementType.name + "List") ) & (elems.size > 0 & type.name = "Set" => result = createCBinOpCall(id, "insert" + elementType.name, mapCollectionExpression(id + "_f", elems.front), elems.last) ) & (elems.size > 0 & type.name = "Sequence" => result = createCBinOpCall(id, "append" + elementType.name, mapCollectionExpression(id + "_f", elems.front), elems.last) ) Operation: mapExpression CollectionExpression CExpression true result = mapCollectionExpression(expId, elements.mapExpression()) Entity: BasicExpression 284 228 Expression * data String 3 false false false prestate boolean 3 false false false Operation: clength BasicExpression CExpression cexp CExpression query true (umlKind = attribute & objectRef.size > 0 => result = createCUnaryOpCall(expId + "_len", "length", Expression.cast("void**", CExpression[objectRef.any.expId]))) & (true => result = createCUnaryOpCall(expId + "_len", "length", Expression.cast("void**", cexp))) Operation: mapValueExpression BasicExpression CExpression aind Set umlKind = value CBasicExpression->exists( c | c.cexpId = expId & c.kind = "value" & ( data = "true" => c.data = "TRUE" ) & ( data = "false" => c.data = "FALSE" ) & ( data /= "true" & data /= "false" => c.data = data ) & c.arrayIndex = aind & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c ) Operation: mapVariableExpression BasicExpression CBasicExpression aind Set umlKind = variable CBasicExpression->exists( c | c.cexpId = expId & c.kind = "variable" & c.data = data & c.arrayIndex = aind & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c ) Operation: mapAttributeExpression BasicExpression CBasicExpression obs Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query umlKind = attribute (objectRef.size = 0 => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "attribute" & c.data = "get" + referredProperty.any.owner.name + "_" + data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & c.arrayIndex = aind & CBasicExpression->exists( s | s.data = "self" & s.kind = "variable" & s : c.parameters & s.cexpId = expId + "_self" & s.type = CType[referredProperty.any.owner.typeId] & s.elementType = s.type ) & result = c ) ) & (objectRef.size > 0 & objectRef.any.type : CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "attribute" & c.data = "getAll" + objectRef.any.elementType.name + "_" + data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & obs <: c.parameters & c.arrayIndex = aind & result = c ) ) & (objectRef.size > 0 & objectRef.any.type /: CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "attribute" & c.data = data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & obs <: c.reference & c.arrayIndex = aind & result = c ) ) Operation: mapRoleExpression BasicExpression CBasicExpression obs Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query umlKind = role (objectRef.size = 0 => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "role" & c.data = data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & c.arrayIndex = aind & CBasicExpression->exists( s | s.data = "self" & s.kind = "variable" & s : c.reference & s.cexpId = expId + "_self" & s.type = CType[referredProperty.any.owner.typeId] & s.elementType = s.type ) & result = c ) ) & (objectRef.size > 0 & objectRef.any.type : CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "role" & c.data = "getAll" + objectRef.any.elementType.name + "_" + data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & obs <: c.parameters & c.arrayIndex = aind & result = c ) ) & (objectRef.size > 0 & objectRef.any.type /: CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "role" & c.data = data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & obs <: c.reference & c.arrayIndex = aind & result = c ) ) Operation: mapOperationExpression BasicExpression CBasicExpression obs Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query umlKind = operation (objectRef.size = 0 => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "operation" & c.data = data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & c.arrayIndex = aind & CBasicExpression->exists( s | s.data = "self" & s.kind = "variable" & s : c.parameters & s.cexpId = expId + "_self" & s.type = CType[referredProperty.any.owner.typeId] & s.elementType = s.type ) & pars <: c.parameters & result = c ) ) & (objectRef.size > 0 => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "operation" & c.data = data & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & obs <: c.parameters & pars <: c.parameters & c.arrayIndex = aind & result = c ) ) Operation: mapClassExpression BasicExpression CBasicExpression obs Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query umlKind = classid (arrayIndex.size > 0 & arrayIndex.any.type : CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "classid" & c.data = "get" + elementType.name + "ByPKs" & aind <: c.parameters & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) & (arrayIndex.size > 0 & arrayIndex.any.type /: CollectionType => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "classid" & c.data = "get" + elementType.name + "ByPK" & aind <: c.parameters & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) & (arrayIndex.size = 0 => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "classid" & c.data = data.toLowerCase() + "_instances" & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) Operation: mapFunctionExpression BasicExpression CBasicExpression obs Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query umlKind = function (Expression.isCFunction1(data) => CBasicExpression->exists( c | c.cexpId = expId & c.data = Expression.cfunctionName(data) & c.kind = "function" & c.parameters = obs^pars & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) & ( data = "allInstances" => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "function" & c.data = data.toLowerCase() + "_instances" & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) & ( true => CBasicExpression->exists( c | c.cexpId = expId & c.kind = "function" & c.data = Expression.cfunctionName(data) & c.parameters = obs^pars & c.type = CType[type.typeId] & c.elementType = CType[elementType.typeId] & result = c) ) Operation: mapBasicExpression BasicExpression CExpression ob Set(CExpression) aind Set(CExpression) pars Sequence(CExpression) query true ( umlKind = value => result = mapValueExpression(aind) ) & ( umlKind = variable => result = mapVariableExpression(aind) ) & ( umlKind = attribute => result = mapAttributeExpression(ob,aind,pars) ) & ( umlKind = role => result = mapRoleExpression(ob,aind,pars) ) & ( umlKind = operation => result = mapOperationExpression(ob,aind,pars)) & ( umlKind = classid => result = mapClassExpression(ob,aind,pars)) & ( umlKind = function => result = mapFunctionExpression(ob,aind,pars) ) Operation: mapExpression BasicExpression CExpression true result = mapBasicExpression(objectRef.mapExpression(),arrayIndex.mapExpression(),parameters.mapExpression()) Entity: Property 828 277 null * name String 3 false false false lower int 3 false false false upper int 3 false false false isOrdered boolean 3 false false false isUnique boolean 3 false false false isDerived boolean 3 false false false isReadOnly boolean 3 false false false isStatic boolean 3 false false false Association: Property Type 0 830 280 42 260 1 type null Association: CExpression CType 0 467 393 279 433 1 type null Association: CExpression CType 0 467 426 314 453 1 elementType null Association: CBinaryExpression CExpression 0 325 541 467 461 1 left null 325 478 Association: CBinaryExpression CExpression 0 407 543 491 477 1 right null 421 531 Association: CBasicExpression CExpression 0 589 657 696 478 0 parameters null ordered Association: CUnaryExpression CExpression -1 857 465 724 396 1 argument null Association: CBasicExpression CMember 0 634 658 827 629 -1 referredMember null Association: CArrayType CType 0 740 820 901 851 1 componentType null 741 847 Association: CPointerType CType 0 1251 802 1164 858 1 pointsTo null 1181 857 Association: CMember CType 0 1140 672 1055 845 1 type null Association: CBasicExpression CBasicExpression -1 487 684 529 712 -1 arrayIndex null 427 683 427 746 507 747 Association: CBasicExpression CBasicExpression -1 637 679 625 711 -1 reference null 752 703 751 752 643 753 Association: CollectionType Type 0 203 548 108 294 1 elementType null Association: Expression Type 0 270 66 27 255 1 type null Association: Expression Type 0 268 90 108 257 1 elementType null Association: CollectionExpression Expression 0 647 57 516 68 0 elements null Association: BinaryExpression Expression 0 124 160 267 111 1 left null 125 128 Association: BinaryExpression Expression 0 208 172 293 115 1 right null 221 181 Association: BasicExpression Expression 0 427 233 471 115 0 parameters null ordered Association: UnaryExpression Expression -1 657 115 513 92 1 argument null Association: BasicExpression Property 0 588 237 627 279 -1 referredProperty null Association: BasicExpression BasicExpression -1 287 334 339 358 -1 arrayIndex null 227 333 227 396 307 397 Association: Property Expression -1 664 278 485 116 1 initialValue null 665 226 514 222 Association: BasicExpression BasicExpression -1 490 353 408 362 -1 objectRef null 552 353 551 402 443 403 Association: Property Entity 0 674 298 364 509 1 owner ownedAttribute 672 512 Generalisation: CExpression CUnaryExpression 855 489 726 440 Generalisation: CExpression CBasicExpression 557 657 558 478 Generalisation: CExpression CBinaryExpression 257 568 487 386 223 569 224 368 488 366 Generalisation: Type Classifier 56 409 52 293 Generalisation: DataType PrimitiveType 32 574 27 520 Generalisation: Classifier Entity 37 503 36 431 Generalisation: Classifier DataType 139 501 106 428 Generalisation: DataType CollectionType 142 552 98 519 Generalisation: Expression UnaryExpression 655 139 511 110 Generalisation: Expression BasicExpression 357 226 357 113 Generalisation: Expression BinaryExpression 57 218 288 38 23 219 24 18 288 16 Generalisation: Expression CollectionExpression 722 39 475 37 722 23 474 22 GeneralUseCase: exp2C false Constraint: null Set{ activity }->size() > 0 COperation->exists( c | c.opId = name + "_" + owner.name & c.code = activity.mapStatement() ) Operation exp2C false Constraint: null true self->display() COperation exp2C false Entity: CPrimitiveType 710 701 CType * name String 3 false false false Operation: toString CPrimitiveType String query true result = name Entity: CArrayType 616 764 CType * duplicates boolean 3 false false false Operation: toString CArrayType String query true result = componentType + "*" Entity: CPointerType 1151 764 CType * Operation: toString CPointerType String query true result = pointsTo + "*" Generalisation: CType CStruct 962 663 962 847 Generalisation: CType CPrimitiveType 865 753 939 845 Generalisation: CType CPointerType 1160 801 1153 846 Generalisation: CType CArrayType 840 802 903 845 Entity: CStruct 829 809 CType * name String 3 false true false Operation: toString CStruct String query true result = "struct " + name Entity: CMember 1138 619 null * name String 3 false false false isKey boolean 3 false false false Entity: CVariable 1117 991 null * name String 3 false false false kind String 3 false false false initialisation String 3 false false false Entity: CProgram 1058 1049 null * Operation: defineCOp CProgram COperation b CExpression par String pt CType query true COperation->exists( op | op.name = "op_" + operations@pre.size & b.needsBracket = true & op.returnType = b.type & op.isQuery = true & op.text = "return " + b + ";" & CVariable->exists( v | v.name = par & v.type = pt & v : op.parameters ) & op : operations & result = op ) Operation: printOperations CProgram void true operations->forAll( op | op->display() ) Entity: COperation 1256 917 null * name String 3 false false false opId String 3 false true false text String 3 false false false scope String 3 false false false isQuery boolean 3 false false false Operation: parameterDeclaration COperation String s Sequence(CVariable) query true ( s.size = 0 => result = "" ) & ( s.size = 1 => result = s[1].type + " " + s[1].name ) & ( s.size > 1 => result = s[1].type + " " + s[1].name + ", " + parameterDeclaration(s.tail) ) Operation: toString COperation String query true result = returnType + " " + name + "(" + parameterDeclaration(parameters) + ")\n" + "{ " + code + " }\n" Association: CProgram COperation 1 1143 1051 1253 1005 0 operations null Association: CProgram CVariable 1 1139 1098 1199 1057 0 variables null Association: CProgram CStruct -1 1160 1058 831 835 0 structs null 1120 955 1121 837 Association: Operation Expression 0 25 827 270 66 1 precondition null Association: Operation Expression 0 30 827 270 76 1 postcondition null Association: COperation CVariable -1 1316 914 1120 1008 0 parameters null ordered Association: CVariable CType 0 1047 993 937 900 1 type null Association: COperation CType 0 1326 917 901 899 1 returnType null Entity: Statement 366 1118 null * abstract statId String 3 false true false Operation: mapStatement Statement CStatement abstract true true Entity: ReturnStatement 272 1175 Statement * Operation: mapStatement ReturnStatement CStatement true CReturnStatement->exists( r | r.cstatId = statId & r.returnValue = returnValue.mapExpression() & result = r) Entity: BehaviouralFeature 310 9 null * abstract name String 3 false false false isStatic boolean 3 false false false Entity: Operation 388 527 BehaviouralFeature * isQuery boolean 3 false false false isCached boolean 3 false false false text String 3 false false false Generalisation: BehaviouralFeature Operation 385 528 335 23 Entity: UseCase 539 1007 null * name String 3 false false false Entity: BreakStatement 289 1209 Statement * Operation: mapStatement BreakStatement CStatement true CBreakStatement->exists( r | r.cstatId = statId & result = r) Entity: OperationCallStatement 248 1366 Statement * assignsTo String 3 false false false Operation: mapStatement OperationCallStatement CStatement true OpCallStatement->exists( ca | ca.cstatId = statId & ca.callExp = callExp.mapExpression() & ca.assignsTo = assignsTo & result = ca ) Entity: ImplicitCallStatement 305 1413 Statement * assignsTo String 3 false false false Operation: mapStatement ImplicitCallStatement CStatement true OpCallStatement->exists( ca | ca.cstatId = statId & ca.callExp = callExp.mapExpression() & ca.assignsTo = assignsTo & result = ca ) Entity: LoopStatement 509 1304 Statement * abstract Entity: BoundedLoopStatement 501 1400 LoopStatement * Operation: mapBoundedLoopStatement BoundedLoopStatement CStatement bdy CStatement true ForLoop->exists( lp | lp.cstatId = statId & lp.body = bdy & lp.test = test.mapExpression() & lp.loopVar = loopVar.mapExpression() & lp.loopRange = loopRange.mapExpression() & result = lp ) Operation: mapStatement BoundedLoopStatement CStatement true result = mapBoundedLoopStatement(body.mapStatement()) Entity: UnboundedLoopStatement 543 1354 LoopStatement * Operation: mapUnboundedLoopStatement UnboundedLoopStatement CStatement bdy CStatement true WhileLoop->exists( lp | lp.cstatId = statId & lp.body = bdy & lp.test = test.mapExpression() & result = lp ) Operation: mapStatement UnboundedLoopStatement CStatement true result = mapUnboundedLoopStatement(body.mapStatement()) Entity: AssignStatement 28 1022 Statement * Operation: mapStatement AssignStatement CStatement true CAssignment->exists( ca | ca.cstatId = statId & ca.left = left.mapExpression() & ca.right = right.mapExpression() & result = ca ) Entity: SequenceStatement 683 1123 Statement * kind int 3 false false false Operation: mapSequenceStatement SequenceStatement CStatement css Sequence(CStatement) true CSequenceStatement->exists( cs | cs.cstatId = statId & cs.kind = kind & cs.statements = css & result = cs ) Operation: mapStatement SequenceStatement CStatement true result = mapSequenceStatement(statements.mapStatement()) Entity: ConditionalStatement 135 1063 Statement * Operation: mapConditionalStatement ConditionalStatement CStatement ifP CStatement elseP Sequence(CStatement) true IfStatement->exists( istat | istat.cstatId = statId & istat.ifPart = ifP & istat.elsePart = elseP & istat.test = test.mapExpression() & result = istat ) Operation: mapStatement ConditionalStatement CStatement true result = mapConditionalStatement(ifPart.mapStatement(), elsePart.mapStatement()) Entity: CreationStatement 286 1245 Statement * createsInstanceOf String 3 false false false assignsTo String 3 false false false Operation: mapStatement CreationStatement CStatement true DeclarationStatement->exists( ds | ds.cstatId = statId & ds.createsInstanceOf = createsInstanceOf & ds.assignsTo = assignsTo & ds.type = CType[type.typeId] & ds.elementType = CType[elementType.typeId] & result = ds) Association: CreationStatement Type 0 270 1266 27 255 1 type null Association: CreationStatement Type 0 268 1279 108 257 1 elementType null Association: BehaviouralFeature Statement -1 424 32 430 1116 1 activity null Association: ReturnStatement Expression -1 275 1178 200 185 -1 returnValue null Association: UseCase Statement -1 545 1028 448 1122 1 classifierBehaviour null Association: OperationCallStatement Expression -1 254 1368 175 209 1 callExp null 201 1309 Association: ImplicitCallStatement Expression -1 309 1434 110 206 1 callExp null 180 1400 Association: LoopStatement Expression -1 510 1315 201 198 1 test null 267 1309 Association: AssignStatement Expression -1 32 1043 106 198 1 left null Association: AssignStatement Expression -1 118 1044 124 180 1 right null Association: ConditionalStatement Expression -1 179 1087 179 177 1 test null Association: ConditionalStatement Statement -1 302 1084 367 1122 1 ifPart null 303 120 Association: ConditionalStatement Statement -1 218 1085 367 1139 -1 elsePart null 217 1139 Association: SequenceStatement Statement -1 687 1159 453 1130 0 statements null ordered Association: LoopStatement Statement -1 627 1305 451 1141 1 body null 625 1175 Generalisation: Statement ReturnStatement 383 1179 380 1140 Generalisation: Statement BreakStatement 417 1213 414 1143 Generalisation: Statement OperationCallStatement 439 1365 429 1143 Generalisation: Statement ImplicitCallStatement 467 1416 439 1144 Generalisation: Statement LoopStatement 515 1307 447 1144 Generalisation: LoopStatement BoundedLoopStatement 522 1404 519 1328 Association: BoundedLoopStatement Expression -1 515 1315 211 198 1 loopRange null Association: BoundedLoopStatement Expression -1 520 1315 221 198 1 loopVar null Generalisation: LoopStatement UnboundedLoopStatement 635 1356 634 1327 Generalisation: Statement SequenceStatement 686 1128 451 1124 Generalisation: Statement ConditionalStatement 312 1068 385 1119 383 1067 Generalisation: Statement AssignStatement 164 1034 408 1120 403 1047 Generalisation: Statement CreationStatement 427 1244 422 1142 Entity: CStatement 1216 668 null * abstract cstatId String 3 false true false Operation: toString CStatement String query true result = "" Entity: CReturnStatement 1132 731 CStatement * Operation: toString CReturnStatement String query true (returnValue.size = 1 => result = " return " + returnValue.any + ";\n") & (returnValue.size = 0 => result = " return;\n") Operation: toString CExpression String query true result = " " Entity: CBreakStatement 913 893 CStatement * Operation: toString CBreakStatement String query true result = " break;\n" Entity: OpCallStatement 1098 916 CStatement * assignsTo String 3 false false false Operation: toString OpCallStatement String query true result = " " + assignsTo + " = " + callExp + ";\n" Entity: CLoopStatement 1359 854 CStatement * abstract Entity: ForLoop 1325 975 CLoopStatement * Operation: toString ForLoop String query true ind = "ind_" + cstatId & result = " int " + ind + " = 0;\n" + " for ( ; " + ind + " < length((void**) " + loopRange + "); " + ind + "++)\n" + " { " + loopRange.elementType + " " + loopVar + " = (" + loopRange + "[" + ind + "]);\n" + " " + body + "\n" + " } " Entity: WhileLoop 1393 904 CLoopStatement * Operation: toString WhileLoop String query true result = " while (" + test + ")\n" + " { " + body + " }\n" Entity: CAssignment 878 572 CStatement * Operation: toString CAssignment String query true result = " " + left + " = " + right + ";\n" Entity: CSequenceStatement 1542 655 CStatement * kind int 3 false false false Operation: toString CSequenceStatement String query true result = statements->collect( s | s.toString() )->sum() Entity: IfStatement 985 613 CStatement * Operation: toString IfStatement String query true (elsePart.size = 0 => result = " if (" + test + ")\n" + " { " + ifPart + " }\n") & (elsePart.size > 0 => result = " if (" + test + ")\n" + " { " + ifPart + " }\n" + " else \n" + " { " + elsePart + " }\n") Entity: DeclarationStatement 1133 781 CStatement * createsInstanceOf String 3 false false false assignsTo String 3 false false false Operation: toString DeclarationStatement String query true (createsInstanceOf = "String" => result = type + " " + assignsTo + " = \"\"") & (type : CPrimitiveType => result = createsInstanceOf + " " + assignsTo + " = 0;") & (true => result = type + " " + assignsTo + " = NULL;") Association: DeclarationStatement CType 0 1141 783 1280 1666 1 type null Association: DeclarationStatement CType 0 1141 783 1280 1666 1 elementType null Association: COperation CStatement -1 1411 583 1280 666 1 code null Association: CReturnStatement CExpression -1 1125 728 1050 735 -1 returnValue null Association: OpCallStatement CExpression -1 1104 918 978 780 1 callExp null 1051 859 Association: CLoopStatement CExpression -1 1360 865 1076 778 1 test null 1117 859 Association: CAssignment CExpression -1 885 617 956 748 1 left null Association: CAssignment CExpression -1 939 615 974 730 1 right null Association: IfStatement CExpression -1 1016 658 1029 727 1 test null Association: IfStatement CStatement -1 1124 653 1217 672 1 ifPart null 1153 670 Association: IfStatement CStatement -1 1068 656 1217 689 -1 elsePart null 1067 689 Association: CSequenceStatement CStatement -1 1537 709 1363 688 0 statements null ordered Association: CLoopStatement CStatement -1 1477 855 1349 713 1 body null 1475 725 Association: ForLoop CSequenceStatement -1 1469 982 1614 711 1 increment null 1629 965 Generalisation: CStatement CReturnStatement 1233 729 1234 707 Generalisation: CStatement CBreakStatement 1061 897 1278 713 Generalisation: CStatement OpCallStatement 1289 915 1296 708 Generalisation: CStatement CLoopStatement 1414 856 1332 710 Generalisation: CLoopStatement ForLoop 1371 978 1369 878 Generalisation: CLoopStatement WhileLoop 1485 906 1484 877 Generalisation: CStatement CSequenceStatement 1536 678 1360 675 Generalisation: CStatement IfStatement 1127 620 1237 668 1233 617 Generalisation: CStatement CAssignment 1021 578 1258 670 1253 597 Generalisation: CStatement DeclarationStatement 1318 778 1319 710 Association: ForLoop CExpression 0 1327 984 958 768 1 loopVar null 850 981 Association: ForLoop CExpression 0 1328 1010 960 752 1 loopRange null 740 1005