OCL nach MQL
Hasso-Plattner-Institut, Potsdam 5. Juli 2010
Architektur
Architektur
7. Bachelorpodium | Projekt | betreuendes Fachgebiet | 2. Juli 2010
Ablauf
4
7. Bachelorpodium | Projekt | betreuendes Fachgebiet | 2. Juli 2010
Messungen
5
OCL-Bedingungen OCL (in ms) MQL (in ms) Query2 (in ms) buildResult (in ms)
context employee body:Employee.allInstances()-> select(e:Employee|e.age > 55) 11.209804 100.464445 7.781506 0.178654
context employee body:Employee.allInstances()-> select(e:Employee|e.age = 55) 34.068296 72.409343 8.777722 0.057479
context employee body:Employee.allInstances()-> select(e:Employee|e.secretary.age = 0) 11.770909 107.731569 53.490458 0.045257
context employee body:Employee.allInstances()-> select(e:Employee|e.name = e.secretary.name) 12.39138 140.468131 88.977859 0.00461
context employee body:Employee.allInstances()-> select(e:Employee|e.age = e.salary) 12.511367 84.984544 35.741065 0.098197
context employee body:Employee.allInstances()-> collect(p:Employee|p.age) 11.416325 84.961846 36.576646 0.373302
context employee body:Employee.allInstances()-> collect(p:Employee|p.directed) 13.245678 110.080261 58.146357 4.79167
■ schlechtere Zeiten
■ Gründe:
□ doppeltes traversieren des AST
□ Query Implementierung
OCL am AST
■ „parse OCL Annotations“
■ Speicherung des AST im content der Annotation
■ Kontextabhängige Interpretation der Annotations
Rückwärtsnavigation
■ Erweiterung des OCL-Metamodells
■ oppositePropertyCallExp
■ Urspr. Model Query2