Skip to content
  Kermeta  

Textual syntax changes between v0.3.2 and v0.4.2

Document Actions

Between version v0.3.2 and v0.4.0 Kermeta textual syntax has changed.

It consists in 2 modifications :

  • introduction of the new keyword "modeltype". This keyword will be used for the support of model types in Kermeta. (not available yet in v0.4.0)
  • modification of pre and post syntax. They are considered as part of the signature of the operation (invariants are not changed)

In v0.3.2 a classical declarations looked like this :

 operation foo(param : String) : String is
     pre myprecondition is param != ""
     do      
        result := param + " world"
     end
     post apostcondition is result.size > param.size


operation foo(param : Integer) : Integer is
     pre myprecondition is param != 0    
abstract
     post apostcondition is result > 0



Now in v0.4.0 they look like this


operation foo(param : String) : String 
pre myprecondition is param != ""
post apostcondition is result.size > param.size
is do      
        result := param + " world"
   end
    


operation foo(param : Integer) : Integer 
     pre myprecondition is param != 0
     post apostcondition is result > 0
     is abstract