KSynthesis: ER12-refactoring.fml

File ER12-refactoring.fml, 1.0 KB (added by acher, 6 years ago)

Refactoring of FMs

Line 
1fm0 = FM (MI : ModalityAcquisition Format  ;
2                    ModalityAcquisition : (MRI|CT) ;
3                    Format : (DICOM|Nifti) [Anonymized] ;
4                    DICOM -> MRI ;
5                    MRI -> Anonymized ; )
6
7fm1 = FM (MI : ModalityAcquisition Format [Anonymized] ; // hum
8                    ModalityAcquisition : (DICOM|Nifti) ; // huh
9                    Format : (MRI|CT) ;  // huh
10                    !CT | !DICOM ; // well...
11                    CT | Anonymized ;
12                    )
13
14cmp01 = compare fm0 fm1
15
16
17fm2 = FM (MI : ModalityAcquisition Format [Anonymized] ;
18                    ModalityAcquisition : (MRI|CT) ;
19                    MRI : [DICOM] ;
20                    CT : [Nifti] ;
21                    !DICOM | !Nifti ; DICOM | Nifti ;
22                    MRI -> Anonymized ;
23                    )
24
25
26addConstraint constraint (Nifti -> CT) to fm0
27
28cmp02 = compare fm0 fm2
29println "cmp02: ", cmp02
30
31addConstraint constraint (Nifti -> CT) to fm1
32
33cmp12 = compare fm1 fm2
34println "cmp12: ", cmp12