You are on page 1of 1

Tipuri OCL

Real =, <>, +, - (binar si unar), *, /, <, >, <=, >=


abs(), floor(), round(), max(r:Real), min(r:Real)
Integer =, - (binar si unar), +, -, *, /
abs(), div(i:Integer), mod(i:Integer), max(i:Integer), min(i:Integer)
String =
size(), concat(s:String), toUpper(), toLower(),
substring(Inferior:Interegr, Superior:Integer).
Boolean =, or, xor, and, not, implies.

OCL Enumeration = , <>


OclAny = , <>
oclIsKindOf(tip:OclType):Boolean, oclIsTypeOf(type:OclType):Boolean,
oclAsType(tip:OclType):tip , oclInState(Stare:OclState):Boolean, oclIsNew():Boolean
Collection()T size():Integer, includes(Obiect:OclAny):Boolean
excludes(Obiect:OclAny):Boolean count(Obiect:OclAny):Integer
Set(T) union(M2:Set(T)):Set(T), union(C:Bag(T)):Bag(T)
=(M2:Set(T)):Boolean -(M2:Set(T)):Set(T)
intersection(M2:Set(T)):Set(T) intersection(C:Bag(T)):Set(T)
including(Obiect:T):Set(T) excluding(Obiect:T):Set(T)
symmetricDifference(M2:Set(T)):Set(T) select(expresie:OclExpression):Set(T)
reject(expresie:OclExpression):Set(T)
collect(expresie:OclExpression):Bag(expr.evaluationType()
count(Obiect:T):Integer
asSequence():Sequence(T) asBag():Bag(T)
Bag(T) union(C:Bag(T)):Bag(T) union(M2:Set(T)):Bag(T)
=(C:Bag(T)):Boolean
intersection(C:Bag(T)):Bag(T) intersection(M2:Set(T)):Set(T)
including(Obiect:T):Bag(T) excluding(Obiect:T):Bag(T)
select(e:OclExpression):Bag(T) reject(e:OclExpression):Bag(T)
collect(e:OclExpression):Bag(e.evaluationType()) count(Obiect:T):Integer
asSequence():Sequence(T) asSet():Set(T)
Sequence(T) count(Obiect:T):Integer =(S2:Sequence(T)):Boolean
union(S2:Sequence(T)):Sequence(T)
append(Obiect:T):Sequence(T) prepend(Obiect:T):Sequence(T)
subSequence(inferior:Integer, superior:Integer):Sequence(T),
at(i:Integer):T first():T last():T
including(Obiect:T):Sequence(T) excluding(Obiect:T):Sequence(T)
select(e:OclExpression):Sequence(T)
reject(e:OclExpression):Sequence(T) collect(expresie:OclExpression):Sequence
(expr.evaluationType())
iterate(expresie:OclExpression):expr.evaluationType()
asBag():Bag(T) asSet():Set(T)

You might also like