Menu

#42 Table constraints are not checked

open
nobody
5
2007-11-13
2007-11-13
counselour
No

Attached is an asn1 file that references a non-existent set in a table constraint.
I happened upon this when widdling down a more complex asn1 file into a smaller one.
This is a minor but annoying issue.

Discussion

  • counselour

    counselour - 2007-11-13

    asn1 file with a non-existent table constraint.

     
  • counselour

    counselour - 2007-11-13

    Logged In: YES
    user_id=1932039
    Originator: YES

    I have attached a fix.

    In the fix, I convert the table constraint to a type (the constrained set of types). I am going to generate some runtime code using AtNotation to further decode an ANY type created due to a class. So, in order to check the validity of the component reference I am going to use the type that was converted from a ATV_REFERENCED to compare against the component's constraint.

    E.g., the following should fail to compile:

    MySeq ::= SEQUENCE {
    id MYCLASS.&id({SomeSet})
    value MYCLASS.&value({SomeOtherSet}{@.id})
    }

    This should fail because the table constraints are different: SomeSet v SomeOtherSet.

    So, by converting the ATV_REFERENCED for SomeSet and SomeOtherSet to actual types it is simpler to check that the component relation is valid.

    The diff is against the svn revision 1396.

    File Added: table_constraint_check.diff

     
  • counselour

    counselour - 2007-11-13

    Adds table constraint check

     

Log in to post a comment.

MongoDB Logo MongoDB