2005-08-17 15:45:10 +00:00
|
|
|
|
(*****************************************************************************
|
2005-08-18 05:55:15 +00:00
|
|
|
|
* su4sml - a SecureUML repository for SML
|
2005-08-17 15:45:10 +00:00
|
|
|
|
*
|
|
|
|
|
* xmi_umlcore.sig - XMI-UML-Core datatypes for the import interface for su4sml
|
|
|
|
|
* Copyright (C) 2005 Achim D. Brucker <brucker@inf.ethz.ch>
|
|
|
|
|
* J<EFBFBD>rgen Doser <doserj@inf.ethz.ch>
|
|
|
|
|
*
|
|
|
|
|
* This file is part of su4sml.
|
|
|
|
|
*
|
|
|
|
|
* su4sml is free software; you can redistribute it and/or modify it under
|
|
|
|
|
* the terms of the GNU General Public License as published by the Free
|
|
|
|
|
* Software Foundation; either version 2 of the License, or (at your option)
|
|
|
|
|
* any later version.
|
|
|
|
|
*
|
|
|
|
|
* su4sml is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
|
* details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
******************************************************************************)
|
|
|
|
|
|
|
|
|
|
|
2005-08-19 11:39:04 +00:00
|
|
|
|
(* ---------------------------------------------------------------------------
|
|
|
|
|
* The types in these structures are supposed to define a representation of
|
|
|
|
|
* the XML elements found in UML-XMI files. It is reasonably close to the UML
|
|
|
|
|
* metamodel and the XMI representation of it, while simplifying some kinds
|
|
|
|
|
* of references.
|
|
|
|
|
* --------------------------------------------------------------------------*)
|
|
|
|
|
|
2005-09-07 17:02:47 +00:00
|
|
|
|
structure XMI_ModelManagement =
|
2005-08-19 11:39:04 +00:00
|
|
|
|
(* from UML 1.5 Model Management Overview: ------------------------------------
|
|
|
|
|
* The Model Management package is dependent on the Foundation package. It
|
|
|
|
|
* defines Model, Package, and Subsystem, which all serve as grouping units
|
|
|
|
|
* for other ModelElements.
|
|
|
|
|
* Models are used to capture different views of a physical system. Packages
|
|
|
|
|
* are used within a Model to group ModelElements. A Subsystem represents a
|
|
|
|
|
* behavioral unit in the physical system. UML Profiles are packages
|
|
|
|
|
* dedicated to group UML extensions.
|
|
|
|
|
* --------------------------------------------------------------------------*)
|
|
|
|
|
struct
|
2005-09-07 17:02:47 +00:00
|
|
|
|
open XMI_Core XMI_ActivityGraphs
|
2005-08-17 15:45:10 +00:00
|
|
|
|
(* from UML 1.5 Model Management: --------------------------------------------
|
|
|
|
|
* A package is a grouping of model elements.
|
|
|
|
|
* [...]
|
|
|
|
|
* A Package may only own or reference Packages, Classifiers, Associations,
|
|
|
|
|
* Generalizations, Dependencies, Comments, Constraints, Collaborations,
|
|
|
|
|
* StateMachines, Stereotypes, and TaggedValues.
|
|
|
|
|
* --------------------------------------------------------------------------*)
|
|
|
|
|
(* We treat "Model" the same way as a "Package". *)
|
2005-09-07 17:02:47 +00:00
|
|
|
|
datatype Package = Package of { xmiid : string,
|
|
|
|
|
name : string,
|
|
|
|
|
visibility : VisibilityKind,
|
|
|
|
|
packages : Package list,
|
|
|
|
|
classifiers : Classifier list,
|
|
|
|
|
statemachines : StateMachine list,
|
|
|
|
|
activitygraphs : ActivityGraph list,
|
|
|
|
|
associations : Association list,
|
2005-08-19 11:39:04 +00:00
|
|
|
|
generalizations: Generalization list,
|
2005-09-07 17:02:47 +00:00
|
|
|
|
constraints : Constraint list }
|
2005-08-17 15:45:10 +00:00
|
|
|
|
|
2005-08-19 11:39:04 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-09-07 17:32:04 +00:00
|
|
|
|
structure XMI =
|
2005-08-19 11:39:04 +00:00
|
|
|
|
struct
|
2005-09-07 17:02:47 +00:00
|
|
|
|
open XMI_Core XMI_ActivityGraphs XMI_ModelManagement
|
2005-08-17 15:45:10 +00:00
|
|
|
|
|
2005-09-07 17:02:47 +00:00
|
|
|
|
(* There may be (are) model elements outside of the UML model,
|
|
|
|
|
due to errors in the Dresden Package.
|
|
|
|
|
The only relevant Xmi Content is the head of the
|
|
|
|
|
package list. *)
|
2005-08-19 11:39:04 +00:00
|
|
|
|
type XmiContent = {classifiers: Classifier list,
|
|
|
|
|
constraints: Constraint list,
|
|
|
|
|
packages: Package list,
|
|
|
|
|
stereotypes: Stereotype list,
|
2005-08-17 15:45:10 +00:00
|
|
|
|
variable_declarations: VariableDeclaration list
|
2005-09-07 17:02:47 +00:00
|
|
|
|
}
|
2005-08-17 15:45:10 +00:00
|
|
|
|
|
|
|
|
|
end
|