From: Mark Thom Date: Fri, 10 Jul 2020 16:26:48 +0000 (-0600) Subject: update bimetatrans tests X-Git-Tag: v0.8.127~16 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=3195042c7da78172b65398115d704ee2c4a7a814;p=scryer-prolog.git update bimetatrans tests --- diff --git a/src/examples/bimetatrans/bimetatrans_tests.pl b/src/examples/bimetatrans/bimetatrans_tests.pl index 52da5b71..8675dcde 100644 --- a/src/examples/bimetatrans/bimetatrans_tests.pl +++ b/src/examples/bimetatrans/bimetatrans_tests.pl @@ -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))), @@ -1401,378 +1397,281 @@ test(47, [], "\ \ - \ - \ - mtow\ - kg\ - \ - \ - \ - \ - \ - aircraftType\ - type\ - \ - \ - aircraftChar\ - type\ - kg\ - wingspan\ - appSpeed\ - \ - \ - \ - \ - \ - \ - \ - mtowPreceding\ - kg\ - \ - \ - \ - \ - \ - precedingAircraftType\ - type\ - \ - \ - aircraftChar\ - type\ - kg\ - wingspan\ - appSpeed\ - \ - \ - \ - \ - \ - \ - \ - wingspan\ - feet\ - \ - \ - \ - \ - \ - aircraftType\ - type\ - \ - \ - aircraftChar\ - type\ - kg\ - feet\ - appSpeed\ - \ - \ - \ - \ - \ - \ - \ - wingspanPreceding\ - feet\ - \ - \ - \ - \ - \ - precedingAircraftType\ - type\ - \ - \ - aircraftChar\ - type\ - kg\ - feet\ - appSpeed\ - \ - \ - \ - \ - \ - \ - \ - runwayOneOrientation\ - runOneOr\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayOneOrientation\ + runOneOr\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayTwoOrientation\ - runTwoOr\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayTwoOrientation\ + runTwoOr\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayThreeOrientation\ - runThreeOr\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayThreeOrientation\ + runThreeOr\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayFourOrientation\ - runFourOr\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayFourOrientation\ + runFourOr\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayOneName\ - runOneName\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayOneName\ + runOneName\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayTwoName\ - runTwoName\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayTwoName\ + runTwoName\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayThreeName\ - runThreeName\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayThreeName\ + runThreeName\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - runwayFourName\ - runFourName\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + runwayFourName\ + runFourName\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ \ - \ - \ - distanceBetweenRunways\ - distanceBetweenRunways\ - \ - \ - \ - \ - \ - airportChar\ - code\ - runOneOr\ - runTwoOr\ - runThreeOr\ - runFourOr\ - runOneName\ - runTwoName\ - runThreeName\ - runFourName\ - distanceBetweenRunways\ - rules\ - \ - \ - airportName\ - code\ - \ - \ - \ + \ + \ + distanceBetweenRunways\ + distanceBetweenRunways\ + \ + \ + \ + \ + \ + airportChar\ + code\ + runOneOr\ + runTwoOr\ + runThreeOr\ + runFourOr\ + runOneName\ + runTwoName\ + runThreeName\ + runFourName\ + distanceBetweenRunways\ + rules\ + \ + \ + airportName\ + code\ + \ + \ + \ \ - "). + "). 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)), @@ -1794,439 +1693,425 @@ test(48, [], "\ \ - \ - \ - icaoCategory\ - light\ - \ - \ - \ - \ - \ - mtow\ - kg\ - \ - \ - lessThanOrEqual\ - kg\ - 7000.0\ - \ - \ - \ - \ - \ - \ - \ - icaoCategory\ - medium\ - \ - \ - \ - \ - \ - mtow\ - kg\ - \ - \ - lessThan\ - kg\ - 136000.0\ - \ - \ - greaterThan\ - kg\ - 7000.0\ - \ - \ - \ - \ - \ - \ - \ - icaoCategory\ - heavy\ - \ - \ - \ - \ - \ - aircraftType\ - model\ - \ - \ - notEqual\ - model\ - A388\ - \ - \ - notEqual\ - model\ - A38F\ - \ - \ - mtow\ - kg\ - \ - \ - greaterThanOrEqual\ - kg\ - 136000.0\ - \ - \ - \ + \ + \ + icaoCategory\ + aircraft\ + light\ + \ + \ + \ + \ + \ + aircraftChar\ + \ + aircraft\ + kg\ + \ + rest\ + \ + \ + \ + \ + lessThanOrEqual\ + kg\ + 7000.0\ + \ + \ + \ \ \ - \ - \ - icaoCategory\ - super\ - \ - \ - \ - \ - aircraftType\ - A388\ - \ - \ + \ + \ + icaoCategory\ + aircraft\ + medium\ + \ + \ + \ + \ + \ + aircraftChar\ + \ + aircraft\ + kg\ + \ + rest\ + \ + \ + \ + \ + lessThan\ + kg\ + 136000.0\ + \ + \ + greaterThan\ + kg\ + 7000.0\ + \ + \ + \ \ \ - \ - \ - icaoCategory\ - super\ - \ - \ - \ - \ - aircraftType\ - A38F\ - \ - \ + \ + \ + icaoCategory\ + aircraft\ + heavy\ + \ + \ + \ + \ + \ + aircraftChar\ + \ + aircraft\ + kg\ + \ + rest\ + \ + \ + \ + \ + greaterThanOrEqual\ + kg\ + 136000.0\ + \ + \ + \ + icaoCategory\ + aircraft\ + super\ + \ + \ + \ + \ \ \ - \ - \ - icaoCategoryPreceding\ - light\ - \ - \ - \ - \ - \ - mtowPreceding\ - kgPreceding\ - \ - \ - lessThanOrEqual\ - kgPreceding\ - 7000.0\ - \ - \ - \ + \ + \ + icaoCategoryPreceding\ + light\ + \ + \ + \ + \ + \ + mtowPreceding\ + kgPreceding\ + \ + \ + lessThanOrEqual\ + kgPreceding\ + 7000.0\ + \ + \ + \ \ \ - \ - \ - icaoCategoryPreceding\ - medium\ - \ - \ - \ - \ - \ - mtowPreceding\ - kgPreceding\ - \ - \ - lessThan\ - kgPreceding\ - 136000.0\ - \ - \ - greaterThan\ - kgPreceding\ - 7000.0\ - \ - \ - \ + \ + \ + icaoCategoryPreceding\ + medium\ + \ + \ + \ + \ + \ + mtowPreceding\ + kgPreceding\ + \ + \ + lessThan\ + kgPreceding\ + 136000.0\ + \ + \ + greaterThan\ + kgPreceding\ + 7000.0\ + \ + \ + \ \ \ - \ - \ - icaoCategoryPreceding\ - heavy\ - \ - \ - \ - \ - \ - precedingAircraftType\ - modelPreceding\ - \ - \ - notEqual\ - modelPreceding\ - A388\ - \ - \ - notEqual\ - modelPreceding\ - A38F\ - \ - \ - notEqual\ - modelPreceding\ - A225\ - \ - \ - mtowPreceding\ - kgPreceding\ - \ - \ - greaterThanOrEqual\ - kgPreceding\ - 136000.0\ - \ - \ - \ + \ + \ + icaoCategoryPreceding\ + heavy\ + \ + \ + \ + \ + \ + precedingAircraftType\ + modelPreceding\ + \ + \ + notEqual\ + modelPreceding\ + A388\ + \ + \ + notEqual\ + modelPreceding\ + A38F\ + \ + \ + notEqual\ + modelPreceding\ + A225\ + \ + \ + mtowPreceding\ + kgPreceding\ + \ + \ + greaterThanOrEqual\ + kgPreceding\ + 136000.0\ + \ + \ + \ \ \ - \ - \ - icaoCategoryPreceding\ - super\ - \ - \ - \ - \ - precedingAircraftType\ - A388\ - \ - \ + \ + \ + icaoCategoryPreceding\ + super\ + \ + \ + \ + \ + precedingAircraftType\ + A388\ + \ + \ \ \ - \ - \ - icaoCategoryPreceding\ - super\ - \ - \ - \ - \ - precedingAircraftType\ - A38F\ - \ - \ + \ + \ + icaoCategoryPreceding\ + super\ + \ + \ + \ + \ + precedingAircraftType\ + A38F\ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 4\ - \ - \ - \ - \ - \ - icaoCategory\ - heavy\ - \ - \ - icaoCategoryPreceding\ - heavy\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 4\ + \ + \ + \ + \ + \ + icaoCategory\ + heavy\ + \ + \ + icaoCategoryPreceding\ + heavy\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 5\ - \ - \ - \ - \ - \ - icaoCategory\ - medium\ - \ - \ - icaoCategoryPreceding\ - heavy\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 5\ + \ + \ + \ + \ + \ + icaoCategory\ + medium\ + \ + \ + icaoCategoryPreceding\ + heavy\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 6\ - \ - \ - \ - \ - \ - icaoCategory\ - light\ - \ - \ - icaoCategoryPreceding\ - heavy\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 6\ + \ + \ + \ + \ + \ + icaoCategory\ + light\ + \ + \ + icaoCategoryPreceding\ + heavy\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 5\ - \ - \ - \ - \ - \ - icaoCategory\ - light\ - \ - \ - icaoCategoryPreceding\ - medium\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 5\ + \ + \ + \ + \ + \ + icaoCategory\ + light\ + \ + \ + icaoCategoryPreceding\ + medium\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - mrs\ - \ - \ - \ - \ - icaoCategoryPreceding\ - light\ - \ - \ + \ + \ + icaoSeparationMiles\ + mrs\ + \ + \ + \ + \ + icaoCategoryPreceding\ + light\ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - mrs\ - \ - \ - \ - \ - \ - icaoCategory\ - medium\ - \ - \ - icaoCategoryPreceding\ - medium\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + mrs\ + \ + \ + \ + \ + \ + icaoCategory\ + medium\ + \ + \ + icaoCategoryPreceding\ + medium\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - mrs\ - \ - \ - \ - \ - \ - icaoCategory\ - heavy\ - \ - \ - icaoCategoryPreceding\ - medium\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + mrs\ + \ + \ + \ + \ + \ + icaoCategory\ + heavy\ + \ + \ + icaoCategoryPreceding\ + medium\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - mrs\ - \ - \ - \ - \ - icaoCategory\ - super\ - \ - \ + \ + \ + icaoSeparationMiles\ + mrs\ + \ + \ + \ + \ + icaoCategory\ + super\ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 6\ - \ - \ - \ - \ - \ - icaoCategory\ - heavy\ - \ - \ - icaoCategoryPreceding\ - super\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 6\ + \ + \ + \ + \ + \ + icaoCategory\ + heavy\ + \ + \ + icaoCategoryPreceding\ + super\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 7\ - \ - \ - \ - \ - \ - icaoCategory\ - medium\ - \ - \ - icaoCategoryPreceding\ - super\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 7\ + \ + \ + \ + \ + \ + icaoCategory\ + medium\ + \ + \ + icaoCategoryPreceding\ + super\ + \ + \ + \ \ \ - \ - \ - icaoSeparationMiles\ - 8\ - \ - \ - \ - \ - \ - icaoCategory\ - light\ - \ - \ - icaoCategoryPreceding\ - super\ - \ - \ - \ + \ + \ + icaoSeparationMiles\ + 8\ + \ + \ + \ + \ + \ + icaoCategory\ + light\ + \ + \ + icaoCategoryPreceding\ + super\ + \ + \ + \ \ - "). + "). test(49, [(aircraftChar('A500',3175.144,44.0,97.5)),