let‘s build like they build · apps/algos like this, efficiency of algo development is key....

Post on 22-Mar-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Let‘sbuild

MarkusVöltervoelter@acm.orgwww.voelter.de@markusvoelter

liketheybuild

BerndKolbkolb@itemis.dewww.itemis.de

@berndkolb

0Motivation

B

1Examples

Healthcare

M

Context&MotivationMobileAppsthathelppatientsw/treatmentsMonitorside-effectsandrecommendactionsManagedosageofmedications

Context&MotivationMobileAppsthathelppatientsw/treatmentsMonitorside-effectsandrecommendactionsManagedosageofmedications

“Algorithms“forrecommendationsanddosageatthecoreoftheseapps.Safety-critical,sincetheycouldhurtpatients.

Customerdevelopsmanydifferentapps/algoslikethis,efficiencyofalgodevelopmentiskey.

Context&Motivation

Healthcareprofessionalsdirectly„code“algos,usingasuitablelanguage.Avoidsindirectionsthroughrequirementsdocs.Speedupdevsignificantly.

} PrettytypicalDSL-baseddev-approach.

SomeLanguageImpressionsI

SomeLanguageImpressionsII

SomeLanguageImpressionsIII

Insurance

B

Context&Motivation

InsurancePrograms

Specify/Program

WriteformalcodeinaDSLmixedwithtablesandtext

NotoolsupportwhatsoeverNotesting(exceptinspection)

NoreuseNomodularityNovaribility

Context&Motivation

InsurancePrograms

Specify/Program

WriteformalcodeinaDSLmixedwithtablesandtext

NotoolsupportwhatsoeverNotesting(exceptinspection)

NoreuseNomodularityNovaribility

ArealExample:Legacy

InsurancePrograms

„Pixelcrap“ CCode

Debug

Implement

Specify/Program

WriteformalcodeinaDSLmixedwithtablesandtext

NotoolsupportwhatsoeverNotesting(exceptinspection)

Printed,PDF Developerreads„spec“Veryidiomaticimplementation

DevactsasahumancompilerandimplementsitinC

DebuggingdirectlyinCSearch-for-usebytextsearchDon‘ttrustthedocuments–

maybeoutdated!

NoreuseNomodularityNovaribility

SolutionApproach

InsurancePrograms

WriteformalcodeinaDSLmixedwithtablesandtext

NowwithIDEsupportandexecutabletests

Thesamenotation!

Specify/Program/Test/Debug

ArealExample:Future

InsurancePrograms

CCode

Generate

IncrementalRefinement/Refactoringoflanguages:

PartiallyautomatedmigrationofmodelsAddmodelnaturalnotations(insurance-specific,math)AddSupportformodularity,reuse,variants

StillexactlythesameCcode,orimprovedasneeded.

Specify/Program/Test/Debug

Salary

M

Context&MotivationCalculateSalaries+TaxesforEmployeesVariousdeploymentplatforms

Variabilityover16StatesBasedonevolvingLaw

ComplexBusinessLogic

TemporalData+ArithmeticsReactiveRules

Dates&Currencies

CurrenciesandDates

TemporalData

ResultDataandRules

ResultDataandRules

IDESupport

2ApproachinaNutshell

B

IntegrationofFachler

[BusinessKnowledge]It‘s what makes a business tick.

Distinguishes the business.Business Rules

(Financial) CalculationsData Structures

Mappings or QueriesValidations

Scientific ProcessesContracts

ProcessesUIs

}

[BusinessKnowledge]It‘s what makes a business tick.

Distinguishes the business.

Contributed not by developers

... but typically implemented in software

[BusinessKnowledge]SO HOW DOES IT GETINTO THE SOFTWARE?

Contributed not by developers

... but typically implemented in software

Reality

Goal!?

LetBusiness/Domainpeoplecontributedirectly!

Givethemexpressive,productivetoolstodoso!

ExpressivityforCoreDomainKnowledge

User-FriendlyNotationGreatTool/IDE

Testing

MeaningfulAnalyses

SynthesisofSoftware

SeparationfromTechnology

B

OutdatedTechnologyObscureBusinessLogic

OutdatedTechnologyNon-UnderstandableLogicExpensivetoEvolve

Fachlichkeit„burried“inimplementationcode.

Technology&BusinessLogicnowhaveconnectedlifecycles.

Goal:SeparatetheLifecycles

Fachlichkeit Technology

3Technical

M

OutdatedTechnologyNon-UnderstandableLogicExpensivetoEvolve

BusinessLogic

Technology

MetamodelforBusinessLogic

Clearlydefineddatastructuretoexpressallbusiness-relevantstructures,behaviorsand

non-functionalconcerns.

MetamodelforBusinessLogic {DataStructures

BehavioralRulesExpressionsValidationsSpecialTypes(eg.temporal)...

MetamodelforBusinessLogic {DataStructures

BehavioralRulesExpressionsValidationsSpecialTypes(eg.temporal)...

Domainsoftenhavearichlanguage/vocabularyanyway;itjustneedstobeformalized.(DDD:UbiquituousLanguge)

MetamodelforBusinessLogic

Semantics

Clearlydefineddatastructuretoexpressallbusiness-relevantstructures,behaviorsand

non-functionalconcerns.

Well-definedmeaningofthisdatastructure

MetamodelforBusinessLogic

Clearlydefineddatastructuretoexpressallbusiness-relevantstructures,behaviorsand

non-functionalconcerns.

Well-definedmeaningofthisdatastructure

IDESupportispossibleEvolutionispossiblePortabilityispossible

TypeCheckingSolver-IntegrationModelCheckingContracts

Semantics

TechInfrastructure

MetamodelforBusinessLogic

Clearlydefineddatastructuretoexpressallbusiness-relevantstructures,behaviorsand

non-functionalconcerns.

Well-definedmeaningofthisdatastructure

ExecutionEngine

TechnicalPlatformforcorrect,efficientandscalableexecution

Semantics

MetamodelforBusinessLogic

Clearlydefineddatastructuretoexpressallbusiness-relevantstructures,behaviorsand

non-functionalconcerns.

Well-definedmeaningofthisdatastructure

TechnicalPlatformforcorrect,efficientandscalableexecution

TechInfrastructure

generatecode,deploy

transferdata,interpret

generatecode,deploy

transferdata,interpret

Semantics

MetamodelforBusinessLogic

TechInfrastructure

generatecode,deploy

transferdata,interpret

Semantics

TechInfrastructure

MetamodelforBusinessLogic

SemanticsSyntax

Language

generatecode,deploy

transferdata,interpret

TechInfrastructure

MetamodelforBusinessLogic

SemanticsSyntax

Language

generatecode,deploy

transferdata,interpret

Syntaxiscriticallyimportantfor

ProductivityCommunicationandReviewDomainExpertIntegration

OnlyButtonsandFormsdon‘twork!

TechInfrastructure

MetamodelforBusinessLogic

SemanticsSyntax

Language

generatecode,deploy

transferdata,interpret

LanguageWorbench

TechInfrastructure

MetamodelforBusinessLogic

SemanticsSyntax

Language

generatecode,deploy

transferdata,interpret

ALanguageWorkbench–atoolfordefining,composingandusingecosystemsoflanguages.

TUDelft

itemis/Typefox

CWIAmsterdam

Solmi/Persiani

Rascal

TheWholePlatform

OtherLanguageWorkbenches

http://voelter.de/data/pub/LWB-ResultsAndBenchmarks.pdf

4LessonsLearned

ALanguageisnotEnough

B

Language

GreatIDE

Analyses

Refactorings

Testing

Debuggers

AbstractionsNotations

SyntaxColoringCodeCompletionGotoDefinition

RelevantGoodErrors

AlignedwithProcesses

WriteTestsRunthem

ReportBack

AnimateExecutionSimulators

GOOD

GREAT

LanguageDesign::MorethanLang

NotationNotationNotation

B

Math

InsuranceMath

FeatureModels

ComponentArchitectures

DataflowDiagrams

FormStyle

FormStyle

Fixed

DS

InfluencesontheLanguage

M

DomainStructure

ModelPurpose

Analyze,Generate

UserSkills

SoftwareEngineeringPractices

NonFunctionalsPermissions,IP,Sharing

ToolCapabilities

Notations,Editing,Scale

Sep.ofConcernsDifferentViews

Getabetter tool:-)

RefactortowardsStructure

Educate,Putresultsincontext

LanguageDesign::Influences

DomainStructure

ModelPurpose

Analyze,Generate

UserSkills

SoftwareEngineeringPractices

NonFunctionalsPermissions,IP,Sharing

ToolCapabilities

Notations,Editing,Scale

Sep.ofConcernsDifferentViews

Getabetter tool:-)

RefactortowardsStructure

Educate,Putresultsincontext

LanguageDesign::Influences

HowtomakePeopleprecise?

M

Precision

Programming!={ Formulas,Rules

DataStructuresTablesValues

}PerformanceScalability

RobustnessDeployment

Doesthisscale?

B

Doestheapproachscale?

Ifstructure,formalization,andtoolsupportdon‘tscale,

Whatarethealternatives?Excel?Wikis?ProseDocuments?

thenwhatwill??

Dothetoolsscale?Intermsofoverallsystemsize?Yes,thesystemhastobebrokendownintomodelsofmanageablesize,asusual.Thisrequiressomethought.

Intermsofteamsize?Yes,sincewerelyonestablishedversioncontrolsystems(git)todealwithgroupwareaspects;andyes,diff/mergeworksasexpected.

Intermsoflanguagecomplexity?Yes,inparticular,sinceyoucanmodularizethelanguagedefinitions.

CanIfindthepeopletodothis?Yes,butitisasignificantchange,so:- itmaybeasignificanteducation/trainingeffort.- afewpeoplemightnotgetit- afewpeoplemaynotwanttodoit.

Thisisathreat!

B

PrecisionandFormalityDifferentProcessesHigherEfficiency

->NewSkills->RoleChange->JobLoss

AutomationFocusonEngineeringEmpowerBusinessPpl

->JobLoss->RoleChange->LessImportance

Somepeopleareafraidofthis.Takethemseriously.

Achangeof

thatmustbemanaged!

Isthisthenextlegacysystem?

M

„ “Today‘ssoftwareistomorrow‘slegacysystem.

Orisit?

„ “Today‘ssoftwareistomorrow‘s legacysystem.

BusinesschangeishardTechnologychangeishard

SeparationofConcernsKeepBLfreeoftechnology

Makeit„portable“

LanguageTech1

V1

RuntimeT1

Generator1

LanguageTech1

V1 V2 V3 ....

Evolution

ExistingmodelsbecomeincompatblewithnewlanguageÞ LanguageVersions

MigrationScripts

RuntimeT1

Generator1

LanguageTech1

V1 V2 V3 ....

Evolution

RuntimeT1

Generator1

RuntimeT2

Generator2

Retargetting

RuntimeTechoutdated,uncoolorslowÞKeepLangTechnology

KeepModelsBuildnewGenerator

LanguageTech1 LanguageTech2

....

Migration

V1 V2 V3 .... V4 V5 V6 ....

Evolution Evolution

RuntimeT1

Generator1

RuntimeT2

Generator2 Generator3

LanguageTechoutdated,uncoolÞBuildnewTool

MigrateData Simple,becauseitwell-defineddomainsemanticsandfreefrom„technologystuff“

Retargetting

„ “Today‘ssoftwareistomorrow‘slegacysystem.

No,itisnot.

InconflictwithAgile?

M

MD*andAgileisinConflict.„ “Project Language

DevelopmentSystem

DevelopmentDependon,use

Project1 LanguageDevelopment

Project2 SystemDevelopment

ProjectN…

Dep’don,use

Later:

1

2

MD*andAgileisinConflict.„ “Project Language

DevelopmentSystem

DevelopmentDependon,use

1

Framework

Library

Platform

Managelikeanyotherintra-projectdependency.

Evolutionofclientcodeiseasier thanforF/L/Pbecauseof

migrationsupport!

MD*andAgileisinConflict.„ “Project1 Language

Development

Project2 SystemDevelopment

…Dep’don,use

Later:

2

Framework Library Platform

Managelikeanyother3rdpartydepencency: DevelopmentRoadmap

IssueTrackerReleaseNotes...

MD*andAgileisinConflict.„ “Project2 System

Development3

ModelsandDSLsareanEnabler forAgility: IntegrationofDomainExperts

„Living“RequirementsDecoupledFachlichkeit&Technik

MD*andAgileisinConflict.„ “Project1 Language

Development4

LeadingLWBsaresoproductive,youcanliterallysitwiththedomainexpertsandinteractivelyprototypelanguages(andthencleanuplater)

I’velookedattheimplementationofthe

languageinMPS,butIdidn’tfindmuch.Isthisallthereis?

Where’sthemagic?

[Customer]

MD*andAgileisinConflict.„ “Project1 Language

Development4

LeadingLWBsaresoproductive,youcanliterallysitwiththedomainexpertsandinteractivelyprototypelanguages(andthencleanuplater)

Analyze Build Tryout

Cleanup

Stabilize

Validate

1to3days

1hour

I’velookedattheimplementationofthe

languageinMPS,butIdidn’tfindmuch.Isthisallthereis?

Where’sthemagic?

[Customer]

Skills?

B

Organizationsdonothavethenecessaryskills.True.But...„ “

AI BigData

R ES T

Sobuiltit.Evolve.Hire.Buy.

Rockets????

M

Furtherdomain-specificextensionstoC.Developedbyend-userlangengineer.

InfrastructureSpecifics inC

InfrastructureSpecifics inC

GeneratedDocumentation

Separationofconcernsiskeytoavoidthelegacytrap

DSLscanisolatebusinesslogiccompletelyfromtechnicalconcerns

DSLscanhelpintegratedomainexpertswithcommunication/revieworevencoding

LanguageWorkbenchesenableDSLsbyreducingefforttobuild,composeandmaintainthem

MigratingtoanewLWBisfeasibleb/csemanticsofallmodelsareknown,bydefinition.

top related