Menu

#2 Treat DEF statements correctly

Framework
open
nobody
5
2005-02-21
2005-02-21
No

DEF Statements are currently treated like LET
definitions, i.e. with context scope. Thus, the UML
WFRs (in fact no OMG standard document) can be
validated.

This implies that the framework cannot be used for
any practical validation purpose with existing
standards, as it rejects the respective input.

Maybe this should be corrected.
(submitted by jgsuess)

Discussion

  • Fadi Chabarek

    Fadi Chabarek - 2005-02-21

    Logged In: YES
    user_id=450963

    Date: 2004-12-17 13:40
    Sender: fchabar
    Logged In: YES
    user_id=450963

    The OCL chapter isn't clear about the scope of DEF
    statements. In my opinion the WFRs especially the recursive
    use of (DEF) attributes and the use of DEF statements across
    contexts are not compliant to the standard (or the standard
    does not come up to its needs, s. UML cha. 6.4.3). Recursive
    DEF statements of operations are supported.

    To develop recursive attributes and statements across
    context help is wanted!

    Date: 2004-09-24 08:47
    Sender: jgsuess
    Logged In: YES
    user_id=557658

    Seems a sensible suggestion. Actually, I thought with the
    current version, type declarations were already generally
    mandatory. (And I agree they should probably be anyway.) If
    cyclic definitions create to many difficulties, than linear
    dependencies would probably go a long way in resolving the
    problem.

    Date: 2004-09-23 19:36
    Sender: fchabar
    Logged In: YES
    user_id=450963

    I will see what I can do. The problem is that def statements
    must be declared before they are used. But the declared
    properties can be used in other def statements. The order of
    the calls is not defined, cycles of def properties can exist.
    I think I could restrict the language and define that def
    properties must be specified with a type. Then I shall be able
    to declare these properties in the in-phase while visiting
    corresponding AST-nodes so that these properties are
    available in the out-phase of the type check/evaluation. This
    could work around the need of a type inference algorithm.

     
  • Fadi Chabarek

    Fadi Chabarek - 2005-02-21
    • labels: --> Conformance to the Standard
    • milestone: --> Framework
     

Log in to post a comment.