1 / 9

Interchangability in software design notation: programs <-> models visual <-> textual

Interchangability in software design notation: programs <-> models visual <-> textual. Oct 2010 Timothy C. Lethbridge Andrew Forward, Omar Badreddin University of Ottawa. A fundamental shift is coming . Modeling will merge with programming We will look at two approaches

airlia
Download Presentation

Interchangability in software design notation: programs <-> models visual <-> textual

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interchangability in software design notation:programs <-> models visual <-> textual Oct 2010 Timothy C. Lethbridge Andrew Forward, Omar Badreddin University of Ottawa

  2. A fundamental shift is coming • Modeling will merge with programming • We will look at two approaches • Alf, the latest OMG draft standard • Umple, my research group’s work • Programming is textual • But in future model diagrams will co-exist with textual descriptions of the model • Both can be edited • Edits to diagram instantly reflected in text • Edits to text instantly reflected in diagram

  3. Alf • A complete new language • Loosely follows C-family syntax • Implements fUML (a UML subset) • Incorporates ideas from OCL too • Class and activity diagrams • No state diagram concepts yet • http://www.omg.org/spec/ALF/

  4. Classes in Alf abstract class Selection { // Abstract class public abstract getSelectionValue(): Money; // Abstract operation definition } class ProductSelection // Concrete subclass specializes Selection { private quantity: Count; // Attribute definition private unitPriceOfSelection: Money; public select // Operation stub declaration (in cart: Cart, in product: Product, in quantity: Count); public getQuantity(): Count { // Concrete operation definition return self.quantity; }

  5. Associations in Alf assoc IsSupervisedBy { public supervisor: Professor[0..2]; public supervisee: Student [*]; { • Ternary associations possible

  6. Activities in Alf activity Order_Behavior() { accept (checkout: Checkout); this.establishCustomer(checkout); do { accept (chargeSubmission: SubmitCharge); this.processCharge(chargeSubmission); accept (PaymentDeclined) { declined = true; this.declineCharge(); } or accept (PaymentApproved) { declined = false; } } while (declined); this.packAndShip(); accept (OrderDelivery); this.notifyOfDelivery(); }

  7. Other tidbits about Alf • Lots of alternative ways to do things • let interest : CurrencyAmount = this.principal * this.rate * period; • Or • CurrencyAmount interest = this.principal * this.rate * period; • Reclassification • classify monitor from InActiveMonitor to ActiveMonitor • Directives in comments • //@parallel • Active classes run as independent threads • Can accept signals

  8. UmpleUML Programming Language / Ample • Model-oriented programming • Adds UML abstractions to any OO language • Class and state diagrams • Removes boilerplate code • Allows simultaneous textual and diagrammatic modeling • Eliminates round-tripping • Don’t edit generated code, just embed your custom code

  9. UmplificationConverting to Umple / Amplification • Incremental reverse engineering • Performed on many systems including Umple itself • Results in simpler and more robust systems • 90% reduction in CRUD code • Any Java, PHP, Ruby program can currently be umplified • Other languages coming … • http://cruise.site.uottawa.ca/umpleonline/

More Related