Check-in [7526e249d0]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected a problem reporting the MUST_BE_SINGULAR error. Simple coding error that remained undetected. Improved the error message associated with transitions where the target state is undefined.
Timelines: family | ancestors | descendants | both | rosea-develop
Files: files | file ages | folders
SHA1: 7526e249d0d79a6fdae664429678f511b4c5b399
User & Date: andrewm 2020-06-22 15:34:14
Context
2020-06-22
15:36
Preparing for release of version 1.10.2 of rosea. check-in: 77f2fae1b1 user: andrewm tags: rosea-develop
15:34
Corrected a problem reporting the MUST_BE_SINGULAR error. Simple coding error that remained undetected. Improved the error message associated with transitions where the target state is undefined. check-in: 7526e249d0 user: andrewm tags: rosea-develop
2020-05-13
09:08
Corrected a problem where the delete operation was failed to be set for assigners on associative relationships. check-in: c9eedf8bcd user: andrewm tags: rosea-develop
Changes

Changes to rosea/doc/rosea.html.

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!-- Generated from file 'rosea.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2014-2020 by G. Andrew Mangogna
   -->
<!-- rosea.n
   -->
<body><div class="doctools">
<h1 class="doctools_title">rosea(n) 1.10.1 rosea &quot;XUML Data and Execution Architecture&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rosea - Relation Oriented Software Execution Architecture</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
................................................................................
</li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">rosea <span class="opt">?1.10.1?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li>Package Commands</li>
<li><a href="#1"><b class="cmd">::rosea configure</b> <i class="arg">script</i></a></li>
<li><a href="#2"><b class="cmd">::rosea configureFromChan</b> <i class="arg">channel</i></a></li>
<li><a href="#3"><b class="cmd">::rosea configureFromFile</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::rosea generate</b> <span class="opt">?<i class="arg">pattern</i>?</span> <span class="opt">?<i class="arg">nsqual</i>?</span></a></li>







|







 







|







94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!-- Generated from file 'rosea.man' by tcllib/doctools with format 'html'
   -->
<!-- Copyright &amp;copy; 2014-2020 by G. Andrew Mangogna
   -->
<!-- rosea.n
   -->
<body><div class="doctools">
<h1 class="doctools_title">rosea(n) 1.10.2 rosea &quot;XUML Data and Execution Architecture&quot;</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>rosea - Relation Oriented Software Execution Architecture</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
................................................................................
</li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">rosea <span class="opt">?1.10.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li>Package Commands</li>
<li><a href="#1"><b class="cmd">::rosea configure</b> <i class="arg">script</i></a></li>
<li><a href="#2"><b class="cmd">::rosea configureFromChan</b> <i class="arg">channel</i></a></li>
<li><a href="#3"><b class="cmd">::rosea configureFromFile</b> <i class="arg">filename</i></a></li>
<li><a href="#4"><b class="cmd">::rosea generate</b> <span class="opt">?<i class="arg">pattern</i>?</span> <span class="opt">?<i class="arg">nsqual</i>?</span></a></li>

Changes to rosea/doc/rosea.pdf.

cannot compute difference between binary files

Changes to rosea/src/Makefile.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

vpath %.pdf $(DOCDIR)
vpath %.html $(DOCDIR)
vpath %.test $(TESTDIR)
vpath %.uxf $(IMAGEDIR)

PROGNAME = rosea
VERSION=1.10.1

DOCSRC 	=\
	$(PROGNAME).aweb\
	$(NULL)

DIAGRAMS =\
	assoc-link.uxf\







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

vpath %.pdf $(DOCDIR)
vpath %.html $(DOCDIR)
vpath %.test $(TESTDIR)
vpath %.uxf $(IMAGEDIR)

PROGNAME = rosea
VERSION=1.10.2

DOCSRC 	=\
	$(PROGNAME).aweb\
	$(NULL)

DIAGRAMS =\
	assoc-link.uxf\

Changes to rosea/src/rosea-docinfo.xml.

313
314
315
316
317
318
319











320
    <date>May 13, 2020</date>
    <authorinitials>GAM</authorinitials>
    <revremark>
        Corrected a problem where the delete operation was failed to
        be set for assigners on associative relationships.
    </revremark>
  </revision>











</revhistory>







>
>
>
>
>
>
>
>
>
>
>

313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
    <date>May 13, 2020</date>
    <authorinitials>GAM</authorinitials>
    <revremark>
        Corrected a problem where the delete operation was failed to
        be set for assigners on associative relationships.
    </revremark>
  </revision>
  <revision>
    <revnumber>1.10.2</revnumber>
    <date>June 4, 2020</date>
    <authorinitials>GAM</authorinitials>
    <revremark>
        Corrected a problem reporting the MUST_BE_SINGULAR error.
        Simple coding error that remained undetected.
        Improved the error message associated with transitions where
        the target state is undefined.
    </revremark>
  </revision>
</revhistory>

Changes to rosea/src/rosea.aweb.

3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
....
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
....
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
....
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
.....
13776
13777
13778
13779
13780
13781
13782
13783



13784
13785
13786
13787
13788
13789
13790
13791
.....
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
.....
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
You may link many referring instances to the same referenced instance,
but there can only be one referenced instance.

[source,tcl]
----
<<linkSimple: determine reference direction>>=
if {[relation cardinality $toinst] != 1} {
    tailcall MUST_BE_SINGULAR $torelvar [relation cardinality $toinst]
}
----

(((error code,MUST_BE_SINGULAR)))
[source,tcl]
----
<<error code formats>>=
................................................................................
<<updateAttribute: parse arguments>>=
if {[llength $args] % 2 != 0} {
    tailcall DeclError ARG_ERROR $args
}

lassign $instref relvar insts
if {[relation cardinality $insts] != 1} {
    tailcall MUST_BE_SINGULAR $relvar [relation cardinality $insts]
}
----

One complication of +updateAttribute+ is to disallow updates to identifying
attributes.
Changes to identifiers must be accomplished by creating and deleting instances.
So we want to make sure that none of the attributes listed in the
................................................................................
<<withAttribute: parse arguments>>=
if {[llength $args] < 2} {
    tailcall DeclError WITH_ATTR_USAGE
}

lassign $instref relvar insts
if {[relation cardinality $insts] != 1} {
    tailcall MUST_BE_SINGULAR $relvar [relation cardinality $insts]
}

set body [lindex $args end]
set attrspecs [lrange $args 0 end-1]
set attrnames [list]
set varnames [list]
foreach attrspec $attrspecs {
................................................................................
relvar eval {
    relvar insert SuppliedOperation {
        Name                findRelated
        Command             ::rosea::InstCmds::findRelated
        RequiresStateModel  false
    } {
        Name                findUnrelated
        Command             ::rosea::InstCmds::findById
        RequiresStateModel  false
    } {
        Name                findRelatedWhere
        Command             ::rosea::InstCmds::findRelatedWhere
        RequiresStateModel  false
    } {
        Name                findUnrelatedWhere
................................................................................
                        defined on relationship, \"$Relationship\", which is\
                        not an association type relationship}
} {
    Relationship        R70
    RefClass            TransitionPlace
    RefType             refnone
    Format              {in domain, \"$Domain\", the state model for,\
                        \"$Model\", contains a transition for event,\



                        \"$Event\", but $Event was a polymorphic event\
                        consumed by a superclass of $Model}
} {
    Relationship        R72
    RefClass            StateTransition
    RefType             refnone
    Format              {in domain, \"$Domain\", the state model for,\
                        \"$Model\", contains the transition,\
................................................................................

proc ::K {x y} {set x}

namespace eval ::rosea {
    <<rosea exports>>
    namespace ensemble create

    variable version 1.10.1

    logger::initNamespace [namespace current]

    <<tclral imports>>
    namespace import ::ral::relvar
    <<rosea data>>
    <<rosea commands>>
................................................................................
=== Package Index

We also provide a root chunk to extract a package index file.

[source,tcl]
----
<<pkgIndex.tcl>>=
package ifneeded rosea 1.10.1 [list source [file join $dir rosea.tcl]]
----

=== Unit Tests

[source,tcl]
----
<<rosea.test>>=







|







 







|







 







|







 







|







 







|
>
>
>
|







 







|







 







|







3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
....
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
....
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
....
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
.....
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
.....
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
.....
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
You may link many referring instances to the same referenced instance,
but there can only be one referenced instance.

[source,tcl]
----
<<linkSimple: determine reference direction>>=
if {[relation cardinality $toinst] != 1} {
    tailcall DeclError MUST_BE_SINGULAR $torelvar [relation cardinality $toinst]
}
----

(((error code,MUST_BE_SINGULAR)))
[source,tcl]
----
<<error code formats>>=
................................................................................
<<updateAttribute: parse arguments>>=
if {[llength $args] % 2 != 0} {
    tailcall DeclError ARG_ERROR $args
}

lassign $instref relvar insts
if {[relation cardinality $insts] != 1} {
    tailcall DeclError MUST_BE_SINGULAR $relvar [relation cardinality $insts]
}
----

One complication of +updateAttribute+ is to disallow updates to identifying
attributes.
Changes to identifiers must be accomplished by creating and deleting instances.
So we want to make sure that none of the attributes listed in the
................................................................................
<<withAttribute: parse arguments>>=
if {[llength $args] < 2} {
    tailcall DeclError WITH_ATTR_USAGE
}

lassign $instref relvar insts
if {[relation cardinality $insts] != 1} {
    tailcall DeclError MUST_BE_SINGULAR $relvar [relation cardinality $insts]
}

set body [lindex $args end]
set attrspecs [lrange $args 0 end-1]
set attrnames [list]
set varnames [list]
foreach attrspec $attrspecs {
................................................................................
relvar eval {
    relvar insert SuppliedOperation {
        Name                findRelated
        Command             ::rosea::InstCmds::findRelated
        RequiresStateModel  false
    } {
        Name                findUnrelated
        Command             ::rosea::InstCmds::findUnrelated
        RequiresStateModel  false
    } {
        Name                findRelatedWhere
        Command             ::rosea::InstCmds::findRelatedWhere
        RequiresStateModel  false
    } {
        Name                findUnrelatedWhere
................................................................................
                        defined on relationship, \"$Relationship\", which is\
                        not an association type relationship}
} {
    Relationship        R70
    RefClass            TransitionPlace
    RefType             refnone
    Format              {in domain, \"$Domain\", the state model for,\
                        \"$Model\", contains a transition from state,\
                        \"$State\", caused by event, \"$Event\",\
                        but either $State is not defined or\
                        $Event is not defined or\
                        $Event was a polymorphic event\
                        consumed by a superclass of $Model}
} {
    Relationship        R72
    RefClass            StateTransition
    RefType             refnone
    Format              {in domain, \"$Domain\", the state model for,\
                        \"$Model\", contains the transition,\
................................................................................

proc ::K {x y} {set x}

namespace eval ::rosea {
    <<rosea exports>>
    namespace ensemble create

    variable version 1.10.2

    logger::initNamespace [namespace current]

    <<tclral imports>>
    namespace import ::ral::relvar
    <<rosea data>>
    <<rosea commands>>
................................................................................
=== Package Index

We also provide a root chunk to extract a package index file.

[source,tcl]
----
<<pkgIndex.tcl>>=
package ifneeded rosea 1.10.2 [list source [file join $dir rosea.tcl]]
----

=== Unit Tests

[source,tcl]
----
<<rosea.test>>=

Changes to rosea/src/rosea.tcl.

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
....
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
....
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
....
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
....
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
....
3750
3751
3752
3753
3754
3755
3756
3757



3758
3759
3760
3761
3762
3763
3764
3765
    
    namespace export tunnel
    
    namespace export trace
    
    namespace ensemble create

    variable version 1.10.1

    logger::initNamespace [namespace current]

    namespace import\
        ::ral::relation\
        ::ral::tuple\
        ::ral::relformat\
................................................................................
        proc updateAttribute {instref args} {
            if {[llength $args] % 2 != 0} {
                tailcall DeclError ARG_ERROR $args
            }
            
            lassign $instref relvar insts
            if {[relation cardinality $insts] != 1} {
                tailcall MUST_BE_SINGULAR $relvar [relation cardinality $insts]
            }
            set idattrs [list]
            foreach identifier [relvar identifiers $relvar] {
                ::struct::set add idattrs $identifier
            }
            set idupdates [::struct::set intersect $idattrs $args]
            if {![::struct::set empty $idupdates]} {
................................................................................
        proc withAttribute {instref args} {
            if {[llength $args] < 2} {
                tailcall DeclError WITH_ATTR_USAGE
            }
            
            lassign $instref relvar insts
            if {[relation cardinality $insts] != 1} {
                tailcall MUST_BE_SINGULAR $relvar [relation cardinality $insts]
            }
            
            set body [lindex $args end]
            set attrspecs [lrange $args 0 end-1]
            set attrnames [list]
            set varnames [list]
            foreach attrspec $attrspecs {
................................................................................
                set torelvar $relvar1
                set toinst $inst1
            } else {
                tailcall DeclError NON_PARTICIPANTS $relvar1 $relvar2 $rname\
                    $referringClass $referencedClass
            }
            if {[relation cardinality $toinst] != 1} {
                tailcall MUST_BE_SINGULAR $torelvar [relation cardinality $toinst]
            }
            set refedvalue [relation semijoin $toinst [relvar set $torelvar]]
            set tovalues [pipe {
                relation extend $referringAttrs rfa RefValue string {
                    [relation extract $refedvalue\
                        [tuple extract $rfa ReferencedAttribute]]} |
                relation dict ~ ReferringAttribute RefValue
................................................................................
        relvar eval {
            relvar insert SuppliedOperation {
                Name                findRelated
                Command             ::rosea::InstCmds::findRelated
                RequiresStateModel  false
            } {
                Name                findUnrelated
                Command             ::rosea::InstCmds::findById
                RequiresStateModel  false
            } {
                Name                findRelatedWhere
                Command             ::rosea::InstCmds::findRelatedWhere
                RequiresStateModel  false
            } {
                Name                findUnrelatedWhere
................................................................................
                                defined on relationship, \"$Relationship\", which is\
                                not an association type relationship}
        } {
            Relationship        R70
            RefClass            TransitionPlace
            RefType             refnone
            Format              {in domain, \"$Domain\", the state model for,\
                                \"$Model\", contains a transition for event,\



                                \"$Event\", but $Event was a polymorphic event\
                                consumed by a superclass of $Model}
        } {
            Relationship        R72
            RefClass            StateTransition
            RefType             refnone
            Format              {in domain, \"$Domain\", the state model for,\
                                \"$Model\", contains the transition,\







|







 







|







 







|







 







|







 







|







 







|
>
>
>
|







73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
....
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
....
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
....
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
....
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
....
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
    
    namespace export tunnel
    
    namespace export trace
    
    namespace ensemble create

    variable version 1.10.2

    logger::initNamespace [namespace current]

    namespace import\
        ::ral::relation\
        ::ral::tuple\
        ::ral::relformat\
................................................................................
        proc updateAttribute {instref args} {
            if {[llength $args] % 2 != 0} {
                tailcall DeclError ARG_ERROR $args
            }
            
            lassign $instref relvar insts
            if {[relation cardinality $insts] != 1} {
                tailcall DeclError MUST_BE_SINGULAR $relvar [relation cardinality $insts]
            }
            set idattrs [list]
            foreach identifier [relvar identifiers $relvar] {
                ::struct::set add idattrs $identifier
            }
            set idupdates [::struct::set intersect $idattrs $args]
            if {![::struct::set empty $idupdates]} {
................................................................................
        proc withAttribute {instref args} {
            if {[llength $args] < 2} {
                tailcall DeclError WITH_ATTR_USAGE
            }
            
            lassign $instref relvar insts
            if {[relation cardinality $insts] != 1} {
                tailcall DeclError MUST_BE_SINGULAR $relvar [relation cardinality $insts]
            }
            
            set body [lindex $args end]
            set attrspecs [lrange $args 0 end-1]
            set attrnames [list]
            set varnames [list]
            foreach attrspec $attrspecs {
................................................................................
                set torelvar $relvar1
                set toinst $inst1
            } else {
                tailcall DeclError NON_PARTICIPANTS $relvar1 $relvar2 $rname\
                    $referringClass $referencedClass
            }
            if {[relation cardinality $toinst] != 1} {
                tailcall DeclError MUST_BE_SINGULAR $torelvar [relation cardinality $toinst]
            }
            set refedvalue [relation semijoin $toinst [relvar set $torelvar]]
            set tovalues [pipe {
                relation extend $referringAttrs rfa RefValue string {
                    [relation extract $refedvalue\
                        [tuple extract $rfa ReferencedAttribute]]} |
                relation dict ~ ReferringAttribute RefValue
................................................................................
        relvar eval {
            relvar insert SuppliedOperation {
                Name                findRelated
                Command             ::rosea::InstCmds::findRelated
                RequiresStateModel  false
            } {
                Name                findUnrelated
                Command             ::rosea::InstCmds::findUnrelated
                RequiresStateModel  false
            } {
                Name                findRelatedWhere
                Command             ::rosea::InstCmds::findRelatedWhere
                RequiresStateModel  false
            } {
                Name                findUnrelatedWhere
................................................................................
                                defined on relationship, \"$Relationship\", which is\
                                not an association type relationship}
        } {
            Relationship        R70
            RefClass            TransitionPlace
            RefType             refnone
            Format              {in domain, \"$Domain\", the state model for,\
                                \"$Model\", contains a transition from state,\
                                \"$State\", caused by event, \"$Event\",\
                                but either $State is not defined or\
                                $Event is not defined or\
                                $Event was a polymorphic event\
                                consumed by a superclass of $Model}
        } {
            Relationship        R72
            RefClass            StateTransition
            RefType             refnone
            Format              {in domain, \"$Domain\", the state model for,\
                                \"$Model\", contains the transition,\

Changes to rosea/src/teapot.txt.

1
2
3
4
5
6
7
8
Package rosea 1.10.1
Meta description Rosea is a data and execution architecture for
Meta description translating XUML models using Tcl as the implementation
Meta description language.
Meta entrysource rosea.tcl
Meta included    rosea.tcl
Meta platform    tcl
Meta require     {Tcl 8.6}
|







1
2
3
4
5
6
7
8
Package rosea 1.10.2
Meta description Rosea is a data and execution architecture for
Meta description translating XUML models using Tcl as the implementation
Meta description language.
Meta entrysource rosea.tcl
Meta included    rosea.tcl
Meta platform    tcl
Meta require     {Tcl 8.6}