Fixed subtyping

This commit is contained in:
Macocian Adrian Radu
2022-03-25 01:42:56 +01:00
parent a07fe3e67b
commit f18066e5da
11 changed files with 144 additions and 76 deletions

View File

@@ -14,6 +14,8 @@ type TestZeroOneType extends Period:
type ObservationPrimitive:
observationPrimitive int (1..1)
condition important: <"This is an important condition">
observationPrimitive < 0
func EquityPriceObservation: <"Function specification for the observation of an equity price, based on the attributes of the 'EquityValuation' class.">
inputs:
@@ -21,7 +23,6 @@ func EquityPriceObservation: <"Function specification for the observation of an
valuationDate ObservationPrimitive (0..1)
valuationTime int (0..1)
timeType TestType (0..1)
determinationMethod ObservationPrimitive (1..1)
output:
observation ObservationPrimitive (0..1)
@@ -38,6 +39,8 @@ func Something: <"asd">
func SomethingElse: <"dsa">
inputs:
num1 int (1..1)
num2 int (0..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..1)

View File

@@ -0,0 +1,36 @@
namespace test.all : <"Something">
version "${version.ok}"
type ObservationPrimitive:
observationPrimitive int (1..1)
condition important: <"This is an important condition">
observationPrimitive < 0
func UsingFunctions: <"This function will use the other functions">
inputs:
val ObservationPrimitive (1..1)
bol boolean (1..1)
output:
valuation ObservationPrimitive(0..*)
assign-output: if bol then Something (bol, val) else SomethingElse (1, 2, val)
func Something: <"asd">
inputs:
equity1 boolean (1..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..*)
assign-output: if True and False then valuationTime
func SomethingElse: <"dsa">
inputs:
num1 int (1..1)
num2 int (0..1)
valuationTime ObservationPrimitive (1..1)
output:
valuation ObservationPrimitive (0..1)
assign-output: if True and False then valuationTime