Skip to content

Commit dbeb3c6

Browse files
author
x97davka
committed
Doc fixes
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@266 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 05d3613 commit dbeb3c6

File tree

12 files changed

+487
-350
lines changed

12 files changed

+487
-350
lines changed

modeq/absyn.rml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,43 @@ module Absyn:
1010
with "exp.rml"
1111
with "types.rml"
1212

13-
(** These types are imported from other modules and given unqualified *)
14-
(** names to help the readibility, and for backwards compatibility *)
15-
(** with older versions. This should be changed. *)
13+
(** - Imported types *)
14+
(** These types are imported from other modules and given unqualified *)
15+
(** names to help the readibility, and for backwards compatibility *)
16+
(** with older versions. This should be changed. *)
1617

1718
type Ident = Exp.Ident
1819
type Path = Exp.Path
1920
type Subscript = Exp.Subscript
2021
type ClassRestriction = Types.Restriction
2122

22-
(** Types
23-
**
24-
** A program is simply a list of class definitions declared at top
25-
** level in the source file.
26-
**)
27-
23+
(** - Programs *)
2824
type Program = Class list
25+
(** A program is simply a list of class definitions declared at top
26+
** level in the source file.
27+
**)
2928

30-
(** A class definition consists of a name, a flag to indicate if this *)
31-
(** class is declared as `partial', the declared class restriction, *)
32-
(** and the body of the declaration. *)
33-
29+
(** - Classes *)
3430
datatype Class = CLASS of Ident (* Name *)
3531
* bool (* Partial *)
3632
(* FIXME: final *)
3733
* ClassRestriction (* Restricion *)
3834
* ClassDef (* Body *)
35+
(** A class definition consists of a name, a flag to indicate if this *)
36+
(** class is declared as `partial', the declared class restriction, *)
37+
(** and the body of the declaration. *)
3938

40-
(** The `ClassDef' type contains the definition part of a class *)
41-
(** declaration. The definition is either explicit, with a list of *)
42-
(** parts (`public', `protected', `equation' and `algorithm'), or it *)
43-
(** is a definition derived from another class. In the latter case *)
44-
(** this types contains the name of the derived class and an optional *)
45-
(** array dimension and a list of modifications. *)
4639

4740
datatype ClassDef = PARTS of ClassPart list
4841
| DERIVED of Path
4942
* Types.ArrayDim option
5043
* ElementArg list
44+
(** The `ClassDef' type contains the definition part of a class *)
45+
(** declaration. The definition is either explicit, with a list of *)
46+
(** parts (`public', `protected', `equation' and `algorithm'), or it *)
47+
(** is a definition derived from another class. In the latter case *)
48+
(** this types contains the name of the derived class and an optional *)
49+
(** array dimension and a list of modifications. *)
5150

5251
datatype ClassPart = PUBLIC of Element list
5352
| PROTECTED of Element list

modeq/builtin.rml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
(** file: builtin.rml *)
2+
3+
(** - Module header
4+
**
5+
** The only exported relation is `initial_env'.
6+
**)
7+
18
module Builtin:
29

310
with "absyn.rml"
@@ -15,11 +22,15 @@ module Builtin:
1522

1623
end
1724

25+
(**)
26+
1827
with "exp.rml"
1928
with "types.rml"
2029
with "mod.rml"
2130
with "classinf.rml"
2231

32+
(** - The primitive types *)
33+
2334
val rl_type = Explode.CLASS("RealType",false,ClassInf.R_PREDEFINED_REAL,
2435
Explode.PARTS([],[],[]))
2536
val int_type = Explode.CLASS("IntegerType",false,ClassInf.R_PREDEFINED_INT,
@@ -29,6 +40,8 @@ val str_type = Explode.CLASS("StringType",false,ClassInf.R_PREDEFINED_STRING,
2940
val bool_type = Explode.CLASS("BooleanType",false,ClassInf.R_PREDEFINED_BOOL,
3041
Explode.PARTS([],[],[]))
3142

43+
(** - The `Real' type *)
44+
3245
val real_type =
3346
Explode.CLASS("Real",false,ClassInf.R_PREDEFINED_REAL,
3447
Explode.PARTS
@@ -55,6 +68,8 @@ Explode.CLASS("Real",false,ClassInf.R_PREDEFINED_REAL,
5568
[],
5669
[]))
5770

71+
(** - The `Integer' type *)
72+
5873
val integer_type =
5974
Explode.CLASS("Integer",false,ClassInf.R_PREDEFINED_INT,
6075
Explode.PARTS
@@ -81,6 +96,8 @@ Explode.CLASS("Integer",false,ClassInf.R_PREDEFINED_INT,
8196
[],
8297
[]))
8398

99+
(** - The `String' type *)
100+
84101
val string_type =
85102
Explode.CLASS("String",false,ClassInf.R_PREDEFINED_STRING,
86103
Explode.PARTS
@@ -97,6 +114,8 @@ Explode.CLASS("String",false,ClassInf.R_PREDEFINED_STRING,
97114
[],
98115
[]))
99116

117+
(** - The `Boolean' type *)
118+
100119
val boolean_type =
101120
Explode.CLASS("Boolean",false,ClassInf.R_PREDEFINED_BOOL,
102121
Explode.PARTS
@@ -114,6 +133,8 @@ Explode.CLASS("Boolean",false,ClassInf.R_PREDEFINED_BOOL,
114133
[]))
115134

116135

136+
(** - Initial environment *)
137+
117138
relation initial_env =
118139

119140
rule Env.open_scope(Env.empty_env) => env &

modeq/classinf.rml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,18 @@ end
229229

230230
relation start : (Restriction, string) => State =
231231

232-
axiom start (R_CLASS, s) => UNKNOWN(s)
233-
axiom start (R_MODEL, s) => MODEL(s)
234-
axiom start (R_RECORD, s) => RECORD(s)
235-
axiom start (R_BLOCK, s) => BLOCK(s)
236-
axiom start (R_CONNECTOR, s) => CONNECTOR(s)
237-
axiom start (R_TYPE, s) => TYPE(s)
238-
axiom start (R_PACKAGE, s) => PACKAGE(s)
239-
axiom start (R_FUNCTION, s) => FUNCTION(s)
240-
axiom start (R_PREDEFINED_INT, s) => TYPE_INTEGER(s)
241-
axiom start (R_PREDEFINED_REAL, s) => TYPE_REAL(s)
232+
axiom start (R_CLASS, s) => UNKNOWN(s)
233+
axiom start (R_MODEL, s) => MODEL(s)
234+
axiom start (R_RECORD, s) => RECORD(s)
235+
axiom start (R_BLOCK, s) => BLOCK(s)
236+
axiom start (R_CONNECTOR, s) => CONNECTOR(s)
237+
axiom start (R_TYPE, s) => TYPE(s)
238+
axiom start (R_PACKAGE, s) => PACKAGE(s)
239+
axiom start (R_FUNCTION, s) => FUNCTION(s)
240+
axiom start (R_PREDEFINED_INT, s) => TYPE_INTEGER(s)
241+
axiom start (R_PREDEFINED_REAL, s) => TYPE_REAL(s)
242242
axiom start (R_PREDEFINED_STRING, s) => TYPE_STRING(s)
243-
axiom start (R_PREDEFINED_BOOL, s) => TYPE_BOOL(s)
243+
axiom start (R_PREDEFINED_BOOL, s) => TYPE_BOOL(s)
244244

245245
end
246246

@@ -293,7 +293,7 @@ relation trans : (State, Event) => State =
293293
axiom trans(FUNCTION(s), FOUND_EQUATION) => fail
294294
axiom trans(HAS_EQUATIONS(s), FOUND_EQUATION) => HAS_EQUATIONS(s)
295295

296-
rule print "- trans fallthru: " & print_state st &
296+
rule print "- trans failed: " & print_state st &
297297
print ", " & print_event ev & print "\n"
298298
--------------------------------------------------------
299299
trans(st, ev) => fail

0 commit comments

Comments
 (0)