123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- 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
|