const ICoordinateClass <- immutable class ICoordinateClass[x: Real, y: Real]
    export operation getX[] -> [r: Real]
       r <- x
    end getX
    export operation getY[] -> [r: Real]
       r <- y
    end getY
end ICoordinateClass

const CoordinateClass <- class CoordinateClass
    var x: Real <- 0.0
    var y: Real <- 0.0
    export operation setX[newX: Real]
       x <- newX
    end setX
    export operation setY[newY: Real]
       y <- newY
    end setY
    export operation getX[] -> [r: Real]
       r <- x
    end getX
    export operation getY[] -> [r: Real]
       r <- y
    end getY
    export operation getImmutable[] -> [r: ICoordinateClass]
       r <- ICoordinateClass.create[x,y]  
    end getImmutable
end CoordinateClass


const Prog1 <- object Prog1
  process
     var c: CoordinateClass
     var ic: ICoordinateClass
     c <- CoordinateClass.create[]
     ic <- c.getImmutable[]
  end process
end Prog1
