Skip to content

OCL2CSP : navCSP on pointers, refactoring structural OCL constraints

Notifications You must be signed in to change notification settings

ArtemisLemon/navCSP_RMSTaskConstraints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

navCSP RMS Task Constraints

class Task { stage : 1-1 reference, characteristics : 1-* reference}
class Stage { machines : 0-* reference}
class Task { characteristics : 1-* reference}
class Characteristics {}

context Task inv SameCharacteristic:
  Machine.AllInstances()->select(m | m.characteristics->includesAll(self.characteristics))
    ->includesAll(self.var(stage).var(machines))


context Task inv Precedence:
  self.prev.stage =< self.stage

Compilation & exécution

# build
./gradlew build

# run
./gradlew run

OCL Refactor

This also demonstraits our refactoring around annotations, the original charachteristics constraint being:

context Task inv SameCharacteristic:
  self.var(stage).var(machines).forall(m | m.characteristics->includesAll(self.characteristics))

in the refactor, we determine candidates and constraint the variable query `self.var(stage).var(machines) to be among them.

About

OCL2CSP : navCSP on pointers, refactoring structural OCL constraints

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages