some documentation fixes
git-svn-id: https://projects.brucker.ch/su4sml/svn/infsec-import/trunk/src/su4sml@5702 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
parent
edb7b857e2
commit
a99a3d089c
|
@ -1,4 +1,13 @@
|
|||
structure SM_Helper =
|
||||
structure SM_Helper : sig
|
||||
val alwaysTrigger : Rep.Event
|
||||
val alwaysGuard : Rep.Guard
|
||||
val emptyEvent : Rep.Event
|
||||
val emptyGuard : Rep.Guard
|
||||
val emptyState : Rep.StateVertex
|
||||
val emptyTransition: Rep.Transition
|
||||
val lastGuard : Rep.Guard
|
||||
val emptyEffect : Rep.Procedure
|
||||
end =
|
||||
struct
|
||||
open Rep
|
||||
open Rep_OclType
|
||||
|
@ -7,8 +16,6 @@ open Rep_SecureUML_ComponentUML.Security
|
|||
open ComponentUML
|
||||
open XMI_DataTypes
|
||||
|
||||
val alwaysTrigger = CallEvent(["auto","auto","auto"],[])
|
||||
val alwaysGuard = OperationCall(Variable("self",DummyT), DummyT, ["alwaysG"],[],Boolean):Guard
|
||||
|
||||
val emptyEvent = CallEvent(["","","EMPTY"],[])
|
||||
val emptyGuard = OperationCall(Variable("",DummyT),DummyT,["EMPTY"],[],DummyT):Guard
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
(* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
|
||||
(*****************************************************************************************)
|
||||
|
||||
(** A cartridge supporting state machines. *)
|
||||
signature SM_CARTRIDGE =
|
||||
sig
|
||||
include CARTRIDGE
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** Compiler extenstions, like "eval" *)
|
||||
signature COMPILER_EXT =
|
||||
sig
|
||||
exception EvalNotSupported
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
(* a design language specifies what the protected resources and the *)
|
||||
(* possible actions on these resources are *)
|
||||
(** A Cartridge that contains a DESIGN_LANGUAGE. *)
|
||||
signature DESIGN_LANGUAGE_CARTRIDGE =
|
||||
sig
|
||||
|
||||
include BASE_CARTRIDGE
|
||||
structure Design: DESIGN_LANGUAGE
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** A Code generator *)
|
||||
signature GCG =
|
||||
sig
|
||||
|
||||
|
@ -31,6 +32,7 @@ val generate : Rep.Model -> string -> unit
|
|||
|
||||
end
|
||||
|
||||
(** builds a code generator from a cartridge chain. *)
|
||||
functor GCG_Core (C: CARTRIDGE): GCG =
|
||||
struct
|
||||
|
||||
|
|
|
@ -45,9 +45,9 @@ fun unpack (env : environment) = #extension env
|
|||
fun pack superEnv = {extension = superEnv} : environment
|
||||
|
||||
fun curClassifier env = SuperCart.curClassifier (unpack env)
|
||||
fun curArgument env = SuperCart.curArgument (unpack env)
|
||||
fun curOperation env = SuperCart.curOperation (unpack env)
|
||||
fun curAttribute env = SuperCart.curAttribute (unpack env)
|
||||
fun curArgument env = SuperCart.curArgument (unpack env)
|
||||
fun curOperation env = SuperCart.curOperation (unpack env)
|
||||
fun curAttribute env = SuperCart.curAttribute (unpack env)
|
||||
|
||||
(* internal translation table, blindly copied from C# *)
|
||||
fun super2Native "ClassifierScope" = "static"
|
||||
|
@ -63,14 +63,8 @@ fun super2Native "ClassifierScope" = "static"
|
|||
else if ((String.extract (s,0,SOME 3)) = "Set")
|
||||
then "System.Collections.Generic.List<"
|
||||
^(super2Native (String.substring(s,4,size s - 5)))^">"
|
||||
(*else (gcg_warning ("Couldn't lookup \""^s^
|
||||
"\" in c#_cartridge.super2Native !"); s)
|
||||
*)
|
||||
else s
|
||||
)
|
||||
handle Subscript =>
|
||||
(*(gcg_warning ("Couldn't lookup \""^s^"\" in c#_cartridge.super2Native !");s)*)
|
||||
s
|
||||
else s )
|
||||
handle Subscript => s
|
||||
|
||||
(* lookup environment -> string -> string
|
||||
* overrides some lookup entries of the base cartridge
|
||||
|
|
|
@ -23,7 +23,10 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
|
||||
(**
|
||||
* A Cartridge that supports the basic SecureUML concepts:
|
||||
* Permissions, Roles, and Constraints.
|
||||
*)
|
||||
signature SECUREUML_CARTRIDGE =
|
||||
sig
|
||||
|
||||
|
@ -45,7 +48,6 @@ end
|
|||
(**
|
||||
* A Cartridge that supports the basic SecureUML concepts:
|
||||
* Permissions, Roles, and Constraints.
|
||||
*
|
||||
*)
|
||||
functor SecureUML_Cartridge(structure SuperCart : BASE_CARTRIDGE;
|
||||
structure D: DESIGN_LANGUAGE)
|
||||
|
|
|
@ -36,4 +36,4 @@ datatype TemplateTree
|
|||
val printTTree : TemplateTree -> unit
|
||||
val parse : string -> TemplateTree
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** A parser for template files. *)
|
||||
signature TPL_PARSER =
|
||||
sig
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** "pretty printing" for OCL expressions. *)
|
||||
structure Ocl2String =
|
||||
struct
|
||||
open library
|
||||
|
@ -209,6 +210,7 @@ fun ocl2string show_types oclterm =
|
|||
end
|
||||
end
|
||||
|
||||
(** "pretty printing" of Repository models *)
|
||||
structure Rep2String =
|
||||
struct
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** A Package consisting of the OCL Library. *)
|
||||
signature OCL_LIBRARY=
|
||||
sig
|
||||
val oclLib : Rep_Core.Classifier list
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** Repository for UML models. *)
|
||||
signature REP =
|
||||
sig
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** Repository datatypes and helper functions for activity graphs. *)
|
||||
signature REP_ACTIVITY_GRAPH =
|
||||
sig
|
||||
include REP_STATE_MACHINE
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** Repository datatypes and helper functions for classifiers. *)
|
||||
signature REP_CORE =
|
||||
sig
|
||||
type Scope
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** Repository datatypes and helper functions for UML/OCL types. *)
|
||||
signature REP_OCL_TYPE =
|
||||
sig
|
||||
|
||||
|
@ -39,6 +40,7 @@ sig
|
|||
end
|
||||
|
||||
|
||||
(** Repository datatypes and helper functions for OCL expressions. *)
|
||||
signature REP_OCL_TERM =
|
||||
sig
|
||||
include REP_OCL_TYPE
|
||||
|
@ -170,5 +172,8 @@ and CollectionPart = CollectionItem of OclTerm * OclType
|
|||
| CollectionRange of OclTerm (* first *)
|
||||
* OclTerm (* last *)
|
||||
* OclType
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -353,11 +353,11 @@ fun transform_classifier t (XMI.Class {xmiid,name,isActive,visibility,isLeaf,
|
|||
(find_constraint t)) checked_invariants,
|
||||
associationends = map (transform_aend t)
|
||||
(find_aends t xmiid),
|
||||
stereotypes = map (find_stereotype t) stereotype,
|
||||
stereotypes = map (find_stereotype t) stereotype,
|
||||
interfaces = nil, (* FIX *)
|
||||
activity_graphs = List.concat [map (transform_activitygraph t) activity_graphs,
|
||||
map (transform_statemachine t) state_machines],
|
||||
thyname = NONE}
|
||||
activity_graphs = List.concat [map (transform_activitygraph t) activity_graphs,
|
||||
map (transform_statemachine t) state_machines],
|
||||
thyname = NONE}
|
||||
end
|
||||
| transform_classifier t (XMI.AssociationClass {xmiid,name,isActive,visibility,
|
||||
isLeaf,generalizations,attributes,
|
||||
|
@ -451,7 +451,15 @@ fun transformXMI ({classifiers,constraints,packages,
|
|||
let val (xmiid_table: (string,HashTableEntry) HashTable.hash_table) =
|
||||
HashTable.mkTable (HashString.hashString, (op =)) (101, Option)
|
||||
(* hack: insert a dummy type into the table *)
|
||||
val _ = HashTable.insert xmiid_table ("DummyT",Type (Rep_OclType.DummyT,nil,XMI.Primitive{name="DummyT",xmiid="DummyT",operations=[],generalizations=[],invariant=[]},nil))
|
||||
val _ = HashTable.insert xmiid_table ("DummyT",
|
||||
Type (Rep_OclType.DummyT,
|
||||
nil,
|
||||
XMI.Primitive{name="DummyT",
|
||||
xmiid="DummyT",
|
||||
operations=[],
|
||||
generalizations=[],
|
||||
invariant=[]},
|
||||
nil))
|
||||
(* for some reasons, there are model elements outside of the top-level *)
|
||||
(* model the xmi-file. So we have to handle them here seperately: *)
|
||||
val _ = map (insert_classifier xmiid_table nil) classifiers
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(** repository datatypes and helper functions for UML statemachines *)
|
||||
signature REP_STATE_MACHINE =
|
||||
sig
|
||||
|
||||
|
|
|
@ -43,17 +43,17 @@ fun capitalize s = let val slist = String.explode s
|
|||
(** gives the type of an OCL expression.
|
||||
* Should be moved to Rep_Ocl?
|
||||
*)
|
||||
fun type_of (Literal (_,t)) = t
|
||||
| type_of (CollectionLiteral (_,t)) = t
|
||||
| type_of (If(_,_,_,_,_,_,t)) = t
|
||||
| type_of (AssociationEndCall(_,_,_,t)) = t
|
||||
| type_of (AttributeCall(_,_,_,t)) = t
|
||||
| type_of (OperationCall(_,_,_,_,t)) = t
|
||||
fun type_of (Literal (_,t)) = t
|
||||
| type_of (CollectionLiteral (_,t)) = t
|
||||
| type_of (If (_,_,_,_,_,_,t)) = t
|
||||
| type_of (AssociationEndCall (_,_,_,t)) = t
|
||||
| type_of (AttributeCall (_,_,_,t)) = t
|
||||
| type_of (OperationCall (_,_,_,_,t)) = t
|
||||
| type_of (OperationWithType(_,_,_,_,t)) = t
|
||||
| type_of (Variable(_,t)) = t
|
||||
| type_of (Let(_,_,_,_,_,t)) = t
|
||||
| type_of (Iterate(_,_,_,_,_,_,_,_,t)) = t
|
||||
| type_of (Iterator(_,_,_,_,_,_,t)) = t
|
||||
| type_of (Variable (_,t)) = t
|
||||
| type_of (Let (_,_,_,_,_,t)) = t
|
||||
| type_of (Iterate (_,_,_,_,_,_,_,_,t)) = t
|
||||
| type_of (Iterator (_,_,_,_,_,_,t)) = t
|
||||
|
||||
fun self t = Variable ("self",t)
|
||||
fun result t = Variable ("result", t)
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
******************************************************************************)
|
||||
|
||||
(**
|
||||
* SecureUML is a simple security language based on RBAC.
|
||||
* Permissions relate roles with actions and can be further constrained
|
||||
* using OCL:
|
||||
*)
|
||||
signature SECUREUML =
|
||||
sig
|
||||
include SECURITY_LANGUAGE
|
||||
|
|
|
@ -44,6 +44,8 @@ Group is
|
|||
codegen/base_cartridge.sml
|
||||
codegen/c#_cartridge.sml
|
||||
codegen/c#_net1_cartridge.sml
|
||||
codegen/java_cartridge.sml
|
||||
codegen/junit_cartridge.sml
|
||||
codegen/secureuml_cartridge.sml
|
||||
codegen/design_cartridge.sig
|
||||
codegen/componentuml_cartridge.sml
|
||||
|
|
Loading…
Reference in New Issue