Cdm dmCL CL, a Specific Textual Constraint Language for Common - - PowerPoint PPT Presentation

cdm dmcl cl a specific textual constraint language for
SMART_READER_LITE
LIVE PREVIEW

Cdm dmCL CL, a Specific Textual Constraint Language for Common - - PowerPoint PPT Presentation

Cdm dmCL CL, a Specific Textual Constraint Language for Common Data Model Ahmed Ahmed, Paola Vallejo, Mickal Kerboeuf, Jean-Philippe Babau Lab-STICC, University Of Western Brittany - France alahmed4ever@yahoo.com,{vallejoco,kerboeuf,


slide-1
SLIDE 1

Cdm dmCL CL, a Specific Textual Constraint Language for Common Data Model

Ahmed Ahmed, Paola Vallejo, Mickaël Kerboeuf, Jean-Philippe Babau

Lab-STICC, University Of Western Brittany - France alahmed4ever@yahoo.com,{vallejoco,kerboeuf, babau}@univ-brest.fr

slide-2
SLIDE 2

Problem Overview (1/3)

Common Data Model (CDM)

  • Abstract data model for scientific datasets
  • General scientific data model
  • Network Common Data Format (.nc file)

Specific standards (OceanSITES)

  • A set of Constraints on CDM
  • Natural language
  • Domain specific tools
  • Code-oriented validation tool

21/10/2014 OCL WORKSHOP 2

NetCDF file {myData.nc} OceanSITES Manipulation Tools CDM compliant

slide-3
SLIDE 3

Problem Overview (1/3)

Common Data Model (CDM)

  • Abstract data model for scientific datasets
  • General scientific data model
  • Network Common Data Format (.nc file)

Specific standards (OceanSITES)

  • A set of Constraints on CDM
  • Natural language
  • Domain specific tools
  • Code-oriented validation tool

21/10/2014 OCL WORKSHOP 3

NetCDF file {myData.nc} OceanSITES Conformity Checker Valid Not Valid OceanSITES Manipulation Tools CDM compliant

slide-4
SLIDE 4

Common Data Model

Dimension: Array dimension size Variable: Multi-dimensional array of typed data Attribute: Meta-data Named Concepts

21/10/2014 OCL WORKSHOP 4

slide-5
SLIDE 5

Problem Overview(2/3)

Standard:

  • Textual constraints
  • Ambiguous

21/10/2014 OCL WORKSHOP 5

slide-6
SLIDE 6

Problem Overview(2/3)

Standard:

  • Textual constraints
  • Ambiguous
  • Multiple Versions

21/10/2014 OCL WORKSHOP 6

slide-7
SLIDE 7

Problem Overview(2/3)

Standard:

  • Textual constraints
  • Ambiguous
  • Multiple Versions

Validation tool modification

  • Professional interference

21/10/2014 OCL WORKSHOP 7

slide-8
SLIDE 8

Problem Overview(2/3)

Standard:

  • Textual constraints
  • Ambiguous
  • Multiple Versions

Validation tool modification

  • Professional interference

Use formal constraint language and existing checker OCL

21/10/2014 OCL WORKSHOP 8

slide-9
SLIDE 9

Solution: Object Constraint Language

21/10/2014 OCL WORKSHOP 9

  • Applied to specific Named Instance
  • Repeated Constraint structure
  • Exist, Select Structure

Mandatory Dimension Length Data type Shape Mandatory Dimension Variable Example OceanSITES Data CDM OCL conforms

slide-10
SLIDE 10

OCL Solution Problems (3/3)

Verbose Constraints

21/10/2014 OCL WORKSHOP 10

Example: Variable named TEMP holding attribute named standard_name should hold one of the values air_temperature, air_pressure, or air_pressure_at_sea_level,

  • r sea_water_temperature
slide-11
SLIDE 11

Problem Summary

30 pages of Textual Constraints

  • difficult to write correct (and read) OCL constraints

Similar repeated constraints

  • Exist, Select structure

Verbose

  • results in inaccurate and erroneous constraints

Hard for scientists

Proposal: CdmCL a domain specific constraint language for CDM

21/10/2014 OCL WORKSHOP 11

slide-12
SLIDE 12

Outlines

Problem Overview CdmCL language Tooling Conclusion

21/10/2014 OCL WORKSHOP 12

slide-13
SLIDE 13

CdmCL : based on CDM

A concept constraint or a set of constraints for each CDM concept

21/10/2014 OCL WORKSHOP 13

CDM CdmCL

slide-14
SLIDE 14

CdmCL : based on CDM

A concept constraint or a set of constraints for each CDM concept

21/10/2014 OCL WORKSHOP 14

CDM CdmCL

slide-15
SLIDE 15

CdmCL: CDM Constraints

Constraints are defined on features of each named CDM concepts

21/10/2014 OCL WORKSHOP 15

slide-16
SLIDE 16

CdmCL: CDM Constraints

Constraints are defined on features of each named CDM concepts

21/10/2014 OCL WORKSHOP 16

slide-17
SLIDE 17

CdmCL : based on CDM

Example: Constraints on Dimension Length

21/10/2014 OCL WORKSHOP 17

CDM CdmCL

slide-18
SLIDE 18

Constraint Concept Reference

Constraints applied on:

  • aConceptConstraint (a specific

dimension, variable, or attribute, e.g. TIME)

  • ConceptRegExConstraint (dimension,

variable or attribute that name matches a regex, e.g DEPTH[0-9])

  • ConceptListConstraint (a list of

dimension, variables or attributes names, e.g {TIME, DEPTH,…} )

21/10/2014 OCL WORKSHOP 18

  • A constraint is defined for a (or a set of) named instance(s) for each of

the main CDM concepts

slide-19
SLIDE 19

Cdm dmCL CL is a language

Xtext is used to define the textual grammar A semantic expressed in OCL

21/10/2014 OCL WORKSHOP 19

slide-20
SLIDE 20

Common Constraint Categories

Mandatory

21/10/2014 OCL WORKSHOP 20

Mandatory Global Attribute OceanSITES CdmCL OCL

slide-21
SLIDE 21

Common Constraint Categories

Mandatory Format

21/10/2014 OCL WORKSHOP 21

OceanSITES CdmCL OCL UpperCase Dimensions

slide-22
SLIDE 22

Common Constraint Categories

Mandatory Format Repetition

21/10/2014 OCL WORKSHOP 22

OCL Not Repeated Dimensions

slide-23
SLIDE 23

Common Constraint Categories

Mandatory Format Repetition User Defined Constraints

Constraints that are related to multiple CDM concepts at the same time E.g. verify if there exists a variable named “TIME”, either it has an attribute named “QC_Indicator” or there exists another variable named “TIME_QC” but not both

21/10/2014 OCL WORKSHOP 23

CdmCL OCL User Defined Constraints OceanSITES

slide-24
SLIDE 24

Specific Concept Constraints(1/2)

Dimensions length

21/10/2014 OCL WORKSHOP 24

Min Max Description x x length = x x y x<= length <= y x

  • 1

x <= length y length <= y

  • 1

No constraint

slide-25
SLIDE 25

Specific Concept Constraints(1/2)

Dimensions length Unlimited Dimension Variable shape

  • SimilarDimensionConstraint
  • PredefinedShape

21/10/2014 OCL WORKSHOP 25

slide-26
SLIDE 26

Specific Concept Constraints(1/2)

Dimensions length Unlimited Dimension Variable shape

  • SimilarDimensionConstraint
  • PredefinedShape

Variable shape Repetition

Variable and Attribute Data Type

21/10/2014 OCL WORKSHOP 26

OCL OceanSITES Not Repeated Variable Shape

slide-27
SLIDE 27

Specific Concept Constraints(2/2)

Attribute Value

  • Unique Value
  • Regular expression
  • Possible Values
  • Standard (ISO8601)

YYYY-MM-DDThh:mm:ssZ OR YYYY-MM-DDThh:mm:ss.sZ

  • Range (min, max)

21/10/2014 OCL WORKSHOP 27

CdmCL OCL

slide-28
SLIDE 28

Outlines

Problem Overview CdmCL language Tooling Conclusion

21/10/2014 OCL WORKSHOP 28

slide-29
SLIDE 29

Tool Architecture

  • NetCDF to CDM Translator
  • CDM generated code (EMF)
  • NetCDF API
  • CdmCL to OCL Translator
  • Xtext API
  • Our Transformation Library

(CdmCL2OCL)

  • OCL Checker
  • EMF Validation Framework

21/10/2014 OCL WORKSHOP 29

slide-30
SLIDE 30

TOOLING (1/3): NetCDF2CDM transformation

21/10/2014 OCL WORKSHOP 30

Dimension s Variables Global Attributes

slide-31
SLIDE 31

TOOLING (2/3): Cdm dmCl Cl2OCL Transformation

Mandatory Dimension TIME

  • Create invariant header
  • Create invariant body

Create OCL File

21/10/2014 OCL WORKSHOP 31

Header Body

slide-32
SLIDE 32

TOOLING (3/3): Validation (Invalid FILE)

21/10/2014 OCL WORKSHOP 32

Missing Mandatory Global Attribute OceanSITES CdmCL CDM Instance Tool

slide-33
SLIDE 33

Outlines

Problem Overview CdmCL language Tooling Conclusion

21/10/2014 OCL WORKSHOP 33

slide-34
SLIDE 34

CONCLUSION

CdmCL : A Domain Specific Constraint Language for CDM Human readable

  • Close to natural language
  • Meetings with standard users and writer (IRD, IFREMER)
  • tool developers

90% of constraints achieved

  • Unachieved constraints -> User Defined Constraints

Hide OCL complexity (50 line in CdmCL -> 400 line in OCL) One conformity checker tool for any standard

21/10/2014 OCL WORKSHOP 34

slide-35
SLIDE 35

Future Works

Error tracing

  • Based on CdmCL, debugging facilities

Migration tools

  • From different standards or different versions of a standard

Serialization format

  • Import and export

Data verification

  • CdmCL extension

Document Generation for Standards

21/10/2014 OCL WORKSHOP 35

slide-36
SLIDE 36

Thanks

21/10/2014 OCL WORKSHOP 36