E&S CVS Commit: PEAK - Major refactoring of 'peak.model'. Changes include:

pje at eby-sarna.com pje at eby-sarna.com
Thu Feb 6 13:39:00 EST 2003


Module Name:	PEAK
Committed By:	pje
Date:		Thu Feb  6 18:38:50 UTC 2003

Modified Files:
	PEAK/src/peak: exceptions.py
	PEAK/src/peak/metamodels: MOF131.py
	PEAK/src/peak/metamodels/uml: MetaModel.py
	PEAK/src/peak/model: api.py datatypes.py interfaces.py
	    method_exporter.py persistent.py structural.py
	PEAK/src/peak/model/tests: __init__.py
	PEAK/src/peak/storage: xmi.py
	PEAK/src/peak/storage/tests: xmi.py
Added Files:
	PEAK/src/peak/model: enumerations.py

Log Message:
Major refactoring of 'peak.model'.  Changes include:

* Added 'enumerations' module with the new implementation of
  'model.Enumeration' -- read its (thorough) docs for details on the new
  features.  Changed existing uses/test cases for the new "spelling"
  of enumerations.

* The 'interfaces' module has been thoroughly revised to drop ancient
  TransWarp stuff, and to mostly match the actual structure of today's
  'peak.model' package.  It still needs to be gone over for errors and
  omissions, and the docs need to be fleshed out some more, but it
  should actually provide some useful information now.

* Features now support an 'implAttr' attribute which can specify what
  attribute is actually used to store the feature.  It defaults to being
  the same as the feature's name, but you can override it in the feature
  definition to redirect its storage to a private attribute.

* There is now a 'structField' feature type that can be used to define
  read-only fields for immutable types without having to keep typing
  'isChangeable = False'.

* Features now won't actually allow themselves to be changed, if their
  'isChangeable' flag is false.

* Many methods have moved around, in an attempt to consolidate the
  class hierarchy for features.  This process may continue for a bit.

This check-in completes about 60-80% of the 'peak.model' refactoring that
I announced on the mailing list.  It has now progressed far enough that I
can begin experimenting with the MOF and XMI features that were blocked
waiting for this work.  Implementing those features may drive further
changes to the 'peak.model' package, but I believe the API of
'peak.model' is no longer dangerously unstable.  (One known change
that's still to come: default constructor implementations for
'model.Immutable' and 'model.Element'.)

Prior to this refactoring, it was unclear what paradigms would come out
on top in certain areas, and that uncertainty is now mostly eliminated.
It's most likely that further refactorings in 'peak.model' will be mere
"spelling" or class hierarchy implementation issues, rather than
fundamental changes of approach.  But I'm going to wait until XMI
writing and MOF->Python code generation are further along before
declaring the API "stable" on the general mailing list.


To view diffs of this commit, you can use the following URL(s):
http://cvs.eby-sarna.com/PEAK/src/peak/exceptions.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PEAK/src/peak/metamodels/MOF131.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PEAK/src/peak/metamodels/uml/MetaModel.py.diff?r1=1.16&r2=1.17
http://cvs.eby-sarna.com/PEAK/src/peak/model/api.py.diff?r1=1.58&r2=1.59
http://cvs.eby-sarna.com/PEAK/src/peak/model/datatypes.py.diff?r1=1.1&r2=1.2
http://cvs.eby-sarna.com/PEAK/src/peak/model/enumerations.py?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.eby-sarna.com/PEAK/src/peak/model/interfaces.py.diff?r1=1.10&r2=1.11
http://cvs.eby-sarna.com/PEAK/src/peak/model/structural.py.diff?r1=1.10&r2=1.11
http://cvs.eby-sarna.com/PEAK/src/peak/model/method_exporter.py.diff?r1=1.4&r2=1.5
http://cvs.eby-sarna.com/PEAK/src/peak/model/persistent.py.diff?r1=1.3&r2=1.4
http://cvs.eby-sarna.com/PEAK/src/peak/model/tests/__init__.py.diff?r1=1.5&r2=1.6
http://cvs.eby-sarna.com/PEAK/src/peak/storage/xmi.py.diff?r1=1.11&r2=1.12
http://cvs.eby-sarna.com/PEAK/src/peak/storage/tests/xmi.py.diff?r1=1.3&r2=1.4

To generate a diff of this commit:
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/exceptions.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/metamodels/MOF131.py
cvs rdiff -r1.16 -r1.17 PEAK/src/peak/metamodels/uml/MetaModel.py
cvs rdiff -r1.58 -r1.59 PEAK/src/peak/model/api.py
cvs rdiff -r1.1 -r1.2 PEAK/src/peak/model/datatypes.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/model/enumerations.py
cvs rdiff -r1.10 -r1.11 PEAK/src/peak/model/interfaces.py \
    PEAK/src/peak/model/structural.py
cvs rdiff -r1.4 -r1.5 PEAK/src/peak/model/method_exporter.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/model/persistent.py
cvs rdiff -r1.5 -r1.6 PEAK/src/peak/model/tests/__init__.py
cvs rdiff -r1.11 -r1.12 PEAK/src/peak/storage/xmi.py
cvs rdiff -r1.3 -r1.4 PEAK/src/peak/storage/tests/xmi.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




More information about the source-changes mailing list