mirror of
http://172.16.200.102/MOISE/Pattern-Instanciation-On-System-Engineering-Model.git
synced 2025-11-27 10:37:58 +01:00
Factorization of Link type grammar rule. Regenerated code.
This commit is contained in:
@@ -34,13 +34,13 @@ CardinalityElement returns CardinalityElement:
|
||||
;
|
||||
|
||||
PatternLink returns PatternLink:
|
||||
src=[PatternPort|QualifiedID] linkType=LinkType dst=[PatternPort|QualifiedID]
|
||||
src=[PatternPort|QualifiedID] '--{' linkType=LinkType '}->' dst=[PatternPort|QualifiedID]
|
||||
;
|
||||
|
||||
enum LinkType returns LinkType:
|
||||
TRANSPOSE = '-{Transpose}->' | IDENTITY = '-{Identity}->' | FIRST = '-{First}->' | ROTATE = '-{Rotate}->'
|
||||
| SHIFTC = '-{ShiftC}->' | SHIFTP = '-{ShiftP}->' | FLATTENC = '-{FlattenC}->' | FORKC = '-{ForkC}->' | FORKP = '-{ForkP}->'
|
||||
| JOINC = '-{JoinC}->' | JOINP = '-{JoinP}->' | LAST = '-{Last}->'
|
||||
TRANSPOSE = 'Transpose' | IDENTITY = 'Identity' | FIRST = 'First' | ROTATE = 'Rotate'
|
||||
| SHIFTC = 'ShiftC' | SHIFTP = 'ShiftP' | FLATTENC = 'FlattenC' | FORKC = 'ForkC' | FORKP = 'ForkP'
|
||||
| JOINC = 'JoinC' | JOINP = 'JoinP' | LAST = 'Last'
|
||||
;
|
||||
|
||||
enum PortDirection returns seim::PortDirection:
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
*/
|
||||
package com.irtsaintexupery.xtext.pseim.validation
|
||||
|
||||
import com.irtsaintexupery.pseim.pseim.Pattern
|
||||
import org.eclipse.xtext.validation.Check
|
||||
|
||||
/**
|
||||
* This class contains custom validation rules.
|
||||
@@ -22,4 +24,17 @@ class PatternValidator extends AbstractPatternValidator {
|
||||
// }
|
||||
// }
|
||||
|
||||
@Check
|
||||
def checkPattern(Pattern p) {
|
||||
// Static checking
|
||||
// Check if there exists a solution for the set of constraints induced by the pattern model (all links + constraints)
|
||||
// Warning: Two variables are necessarily identical -> Potential error as there is redundancy in the variables
|
||||
// -> Maybe it is not an error as in creates different interfaces for the pattern
|
||||
// Global arithmetic constraints may be added to the pattern language (no need for now)
|
||||
// TODO Dynamic synthesis (in the Mapping MM validator)
|
||||
// A synthesis tool synthesizes a solution for the mapping
|
||||
// If there is no solution, then the mapping is not correct
|
||||
// In both cases, we need a bridge between our model and a solver
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user