update bimetatrans tests
This commit is contained in:
@@ -1385,11 +1385,7 @@ test(46,
|
||||
|
||||
%% Try a more substantial test case.
|
||||
test(47,
|
||||
[(mtow('$V'(kg)) :- aircraftType('$V'(type)), aircraftChar('$V'(type), '$V'(kg), '$V'(wingspan), '$V'(appSpeed))),
|
||||
(mtowPreceding('$V'(kg)) :- precedingAircraftType('$V'(type)), aircraftChar('$V'(type), '$V'(kg), '$V'(wingspan), '$V'(appSpeed))),
|
||||
(wingspan('$V'(feet)) :-aircraftType('$V'(type)), aircraftChar('$V'(type), '$V'(kg), '$V'(feet), '$V'(appSpeed))),
|
||||
(wingspanPreceding('$V'(feet)) :- precedingAircraftType('$V'(type)), aircraftChar('$V'(type), '$V'(kg), '$V'(feet), '$V'(appSpeed))),
|
||||
(runwayOneOrientation('$V'(runOneOr)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code))),
|
||||
[(runwayOneOrientation('$V'(runOneOr)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code))),
|
||||
(runwayTwoOrientation('$V'(runTwoOr)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code))),
|
||||
(runwayThreeOrientation('$V'(runThreeOr)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code))),
|
||||
(runwayFourOrientation('$V'(runFourOr)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code))),
|
||||
@@ -1400,98 +1396,6 @@ test(47,
|
||||
(distanceBetweenRunways('$V'(distanceBetweenRunways)) :- airportChar('$V'(code), '$V'(runOneOr), '$V'(runTwoOr), '$V'(runThreeOr), '$V'(runFourOr), '$V'(runOneName), '$V'(runTwoName), '$V'(runThreeName), '$V'(runFourName), '$V'(distanceBetweenRunways), '$V'(rules)), airportName('$V'(code)))],
|
||||
[],
|
||||
"<Assert mapClosure=\"universal\">\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>mtow</Rel>\
|
||||
<Var>kg</Var>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>aircraftType</Rel>\
|
||||
<Var>type</Var>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Var>type</Var>\
|
||||
<Var>kg</Var>\
|
||||
<Var>wingspan</Var>\
|
||||
<Var>appSpeed</Var>\
|
||||
</Atom>\
|
||||
</And>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>mtowPreceding</Rel>\
|
||||
<Var>kg</Var>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>precedingAircraftType</Rel>\
|
||||
<Var>type</Var>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Var>type</Var>\
|
||||
<Var>kg</Var>\
|
||||
<Var>wingspan</Var>\
|
||||
<Var>appSpeed</Var>\
|
||||
</Atom>\
|
||||
</And>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>wingspan</Rel>\
|
||||
<Var>feet</Var>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>aircraftType</Rel>\
|
||||
<Var>type</Var>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Var>type</Var>\
|
||||
<Var>kg</Var>\
|
||||
<Var>feet</Var>\
|
||||
<Var>appSpeed</Var>\
|
||||
</Atom>\
|
||||
</And>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>wingspanPreceding</Rel>\
|
||||
<Var>feet</Var>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>precedingAircraftType</Rel>\
|
||||
<Var>type</Var>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Var>type</Var>\
|
||||
<Var>kg</Var>\
|
||||
<Var>feet</Var>\
|
||||
<Var>appSpeed</Var>\
|
||||
</Atom>\
|
||||
</And>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
@@ -1765,14 +1669,9 @@ test(47,
|
||||
</Assert>").
|
||||
|
||||
test(48,
|
||||
[(icaoCategory(light) :- mtow('$V'(kg)), lessThanOrEqual('$V'(kg), 7000.0)),
|
||||
(icaoCategory(medium):- mtow('$V'(kg)), lessThan('$V'(kg), 136000.0), greaterThan('$V'(kg), 7000.0)),
|
||||
(icaoCategory(heavy) :- aircraftType('$V'(model)), notEqual('$V'(model),'A388'), notEqual('$V'(model),'A38F'), mtow('$V'(kg)), greaterThanOrEqual('$V'(kg), 136000.0)),
|
||||
(icaoCategory(super) :- aircraftType('A388')),
|
||||
(icaoCategory(super) :- aircraftType('A38F')),
|
||||
%(icaoCategory(super) :- aircraftType('A225')),
|
||||
|
||||
|
||||
[(icaoCategory('$V'(aircraft), light) :- aircraftChar(['$V'(aircraft), '$V'(kg) | '$V'(rest)]), lessThanOrEqual('$V'(kg), 7000.0)),
|
||||
(icaoCategory('$V'(aircraft), medium):- aircraftChar(['$V'(aircraft), '$V'(kg) | '$V'(rest)]), lessThan('$V'(kg), 136000.0), greaterThan('$V'(kg), 7000.0)),
|
||||
(icaoCategory('$V'(aircraft), heavy) :- aircraftChar(['$V'(aircraft), '$V'(kg) | '$V'(rest)]), greaterThanOrEqual('$V'(kg), 136000.0), \+ icaoCategory('$V'(aircraft), super)),
|
||||
(icaoCategoryPreceding(light) :- mtowPreceding('$V'(kgPreceding)), lessThanOrEqual('$V'(kgPreceding), 7000.0)),
|
||||
(icaoCategoryPreceding(medium) :- mtowPreceding('$V'(kgPreceding)), lessThan('$V'(kgPreceding), 136000.0), greaterThan('$V'(kgPreceding), 7000.0)),
|
||||
(icaoCategoryPreceding(heavy) :- precedingAircraftType('$V'(modelPreceding)), notEqual('$V'(modelPreceding),'A388'), notEqual('$V'(modelPreceding),'A38F'), notEqual('$V'(modelPreceding),'A225'), mtowPreceding('$V'(kgPreceding)), greaterThanOrEqual('$V'(kgPreceding), 136000.0)),
|
||||
@@ -1797,14 +1696,21 @@ test(48,
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Var>aircraft</Var>\
|
||||
<Data iso:type=\"symbol\">light</Data>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>mtow</Rel>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Plex>\
|
||||
<Var>aircraft</Var>\
|
||||
<Var>kg</Var>\
|
||||
<repo>\
|
||||
<Var>rest</Var>\
|
||||
</repo>\
|
||||
</Plex>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>lessThanOrEqual</Rel>\
|
||||
@@ -1818,14 +1724,21 @@ test(48,
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Var>aircraft</Var>\
|
||||
<Data iso:type=\"symbol\">medium</Data>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>mtow</Rel>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Plex>\
|
||||
<Var>aircraft</Var>\
|
||||
<Var>kg</Var>\
|
||||
<repo>\
|
||||
<Var>rest</Var>\
|
||||
</repo>\
|
||||
</Plex>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>lessThan</Rel>\
|
||||
@@ -1844,65 +1757,37 @@ test(48,
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Var>aircraft</Var>\
|
||||
<Data iso:type=\"symbol\">heavy</Data>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<And>\
|
||||
<Atom>\
|
||||
<Rel>aircraftType</Rel>\
|
||||
<Var>model</Var>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>notEqual</Rel>\
|
||||
<Var>model</Var>\
|
||||
<Ind>A388</Ind>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>notEqual</Rel>\
|
||||
<Var>model</Var>\
|
||||
<Ind>A38F</Ind>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>mtow</Rel>\
|
||||
<Rel>aircraftChar</Rel>\
|
||||
<Plex>\
|
||||
<Var>aircraft</Var>\
|
||||
<Var>kg</Var>\
|
||||
<repo>\
|
||||
<Var>rest</Var>\
|
||||
</repo>\
|
||||
</Plex>\
|
||||
</Atom>\
|
||||
<Atom>\
|
||||
<Rel>greaterThanOrEqual</Rel>\
|
||||
<Var>kg</Var>\
|
||||
<Data iso:type=\"number\">136000.0</Data>\
|
||||
</Atom>\
|
||||
<Naf>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Var>aircraft</Var>\
|
||||
<Data iso:type=\"symbol\">super</Data>\
|
||||
</Atom>\
|
||||
</Naf>\
|
||||
</And>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Data iso:type=\"symbol\">super</Data>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<Atom>\
|
||||
<Rel>aircraftType</Rel>\
|
||||
<Ind>A388</Ind>\
|
||||
</Atom>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
<Rel>icaoCategory</Rel>\
|
||||
<Data iso:type=\"symbol\">super</Data>\
|
||||
</Atom>\
|
||||
</then>\
|
||||
<if>\
|
||||
<Atom>\
|
||||
<Rel>aircraftType</Rel>\
|
||||
<Ind>A38F</Ind>\
|
||||
</Atom>\
|
||||
</if>\
|
||||
</Implies>\
|
||||
<Implies>\
|
||||
<then>\
|
||||
<Atom>\
|
||||
|
||||
Reference in New Issue
Block a user