|
@@ -0,0 +1,95 @@
|
|
|
+import models/SimpleClassDiagrams as SCD
|
|
|
+include "primitives.alh"
|
|
|
+
|
|
|
+SCD CausalBlockDiagrams{
|
|
|
+ Class Float {
|
|
|
+ $
|
|
|
+ if (bool_not(is_physical_float(self))):
|
|
|
+ return "Float has no float value"!
|
|
|
+ else:
|
|
|
+ return "OK"!
|
|
|
+ $
|
|
|
+ }
|
|
|
+
|
|
|
+ Class Block{
|
|
|
+ output : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ signal : Float {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class ConstantBlock{
|
|
|
+ value : Float {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class AdditionBlock{
|
|
|
+ input1 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ input2 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class NegatorBlock{
|
|
|
+ input1 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ input2 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class MultiplyBlock{
|
|
|
+ input1 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ input2 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class InverseBlock{
|
|
|
+ input1 : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Class DelayBlock{
|
|
|
+ input : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ initial : Block {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ memory : Float {
|
|
|
+ target_lower_multiplicity = 1
|
|
|
+ target_upper_multiplicity = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Inheritance (ConstantBlock, Block){}
|
|
|
+ Inheritance (AdditionBlock, Block){}
|
|
|
+ Inheritance (NegatorBlock, Block){}
|
|
|
+ Inheritance (MultiplyBlock, Block){}
|
|
|
+ Inheritance (InverseBlock, Block){}
|
|
|
+ Inheritance (DelayBlock, Block){}
|
|
|
+}
|
|
|
+
|
|
|
+export CausalBlockDiagrams to models/CausalBlockDiagrams
|