Skip to content

Commit 28d74db

Browse files
Rockjack00alex-quin-gabrieleinalex
authored
Engines can impart multiple properties (#11)
* adding reStructuredText documentation, converted by pandoc * Added back axioms for properties being exerted by engines * renamed docs folder again * removed rst docs * removed commented older formulation * changed inputs_match label --------- Co-authored-by: Alex Gabriel <[email protected]> Co-authored-by: Alex Gabriel <[email protected]>
1 parent a162b42 commit 28d74db

File tree

1 file changed

+64
-35
lines changed

1 file changed

+64
-35
lines changed

tff/model/properties.tff

Lines changed: 64 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ tff(decl_property_of_e, type,
3434
engine_has_property: (engine * property) > $o).
3535

3636
% Engine outputs have properties
37-
tff(decl_engine_output_properties, type,
38-
output_property_of_engine: engine > property).
37+
tff(decl_engine_imparts_output_properties, type,
38+
engine_imparts_output_property: (engine * property) > $o).
3939

4040
% Templates have requirements in terms of properties
4141
tff(decl_templates_have_requirements, type,
@@ -94,32 +94,65 @@ tff(formally_equivalent, axiom,
9494
)
9595
).
9696

97+
98+
99+
tff(property_meets_requirement_decl, type,
100+
property_meets_requirement : (property * requirement) > $o
101+
).
102+
103+
tff(axiom_property_meets_requirement, axiom,
104+
! [P: property, R: requirement]:
105+
(
106+
(
107+
(datatype_of_requirement(R) = datatype_of_property(P)) % property has correct correct data format/type for requirement
108+
&
109+
is_permissible(R, has_value(P)) % ensure that the property's value is permissible
110+
)
111+
=>
112+
property_meets_requirement(P, R)
113+
)
114+
).
115+
116+
117+
tff(modelet_meets_requirement_decl, type,
118+
modelet_meets_requirement : (modelet * requirement) > $o
119+
).
120+
121+
tff(axiom_modelet_meets_requirement, axiom,
122+
! [M : modelet, R : requirement, P: property]:
123+
(
124+
(
125+
modelet_has_property(M, P) % match modelet to property
126+
&
127+
property_meets_requirement(P, R)
128+
)
129+
=>
130+
modelet_meets_requirement(M, R)
131+
)
132+
).
133+
134+
135+
97136
% Modelets and Templates can have matching profiles
98137
tff(axiom_modelet_matches_template, axiom,
99138
! [M: modelet, T: template]:
100139
(
101140
(
102141
formally_equivalent(T, M)
103142
&
104-
! [R: requirement]:
143+
![R: requirement] :
105144
(
106145
is_part_of(R, T)
107146
=>
108-
? [P: property]:
109-
(
110-
modelet_has_property(M, P) % match modelet to property
111-
&
112-
(datatype_of_requirement(R) = datatype_of_property(P)) % property has correct correct data format/type for requirement
113-
&
114-
is_permissible(R, has_value(P)) % ensure that the property's value is permissible
115-
)
147+
modelet_meets_requirement(M, R)
116148
)
117149
)
118150
=>
119151
inputs_match(M, T)
120152
)
121153
).
122154

155+
123156
% Modelet sets match template sets if all their templates have a corresponding modelet with matching inputs inputs_match(M, T)
124157
%interfaces_match(MS, TS)
125158

@@ -146,27 +179,23 @@ tff(axiom_modelet_sets_matches_template_sets, axiom,
146179

147180

148181
% Engine outputs have properties
149-
%tff(exert_creates, axiom,
150-
% ! [Minput: modelet_set, E: engine]:
151-
% (
152-
% exertable(E, Minput)
153-
% =>
154-
% ? [Moutput: modelet]:
155-
% (
156-
% exert(E, Minput, Moutput)
157-
% &
158-
% ! [P: property]:
159-
% (
160-
% (
161-
% ~engine_has_property(E, P)
162-
% |
163-
% (
164-
% engine_has_property(E, P)
165-
% &
166-
% modelet_has_property(Moutput, P)
167-
% )
168-
% )
169-
% )
170-
% )
171-
% )
172-
%).
182+
tff(exert_creates, axiom,
183+
! [E: engine, MS: modelet_set, M: modelet, P: property]:
184+
(
185+
(
186+
exertable(E, MS)
187+
&
188+
exert(E, MS) = M
189+
&
190+
engine_imparts_output_property(E, P)
191+
)
192+
=>
193+
modelet_has_property(M, P)
194+
)
195+
).
196+
197+
198+
199+
% Modelets that are output from engines only have the properties imparted by
200+
% their engines
201+
% TODO: this is a strong assumption, do we really want it?

0 commit comments

Comments
 (0)