Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :-export((kb_t/1)).
- kb_t(Call):- into_plist(Call,PLIST),[AH|LIST]=PLIST,!, kb_t(AH,LIST,PLIST).
- into_plist(PLIST,PLIST):- var(PLIST),!,between(2,19,X),length(PLIST,X). % allows users TO make calls like kb_t(ALL).
- into_plist([P|LIST],[P|LIST]):-var(P),!.
- into_plist([dbase_t|PLIST],PLIST). % dbase_t is our versuion of '$holds' or call/N
- into_plist(plist(P,LIST),[P|LIST]).
- into_plist(Call,PLIST):-Call=..PLIST. % finally the fallthrue
- kb_t(AH,_,PLIST):-var(AH),!,kbp_t(PLIST).
- kb_t(dbase_t,PLIST,_):- !,kbp_t(PLIST). % dbase_t is our versuion of '$holds' or call/N
- kb_t(subclass,PLIST,_):- !,kbp_t([genls|PLIST]). % rewrite hack FOR SUMO callers
- % kb_t(AH,PLIST,_):- is_holds_true(AH),!,kb_t(PLIST). % is_holds_true/1 is temp disabled FOR speed
- kb_t(AH,PLIST,_):- is_holds_false(AH),!,kb_f(PLIST). % is_holds_false(NOT).
- kb_t(_,_,PLIST):- kbp_t(PLIST).
- :-export(kbp_t/1).
- kbp_t(_):- NOT(loaded_external_kbs),!,fail.
- % kbp_t(PLIST):- ground(PLIST),!,no_repeats(call_no_cuts(hook:kbp_t_list_prehook(PLIST,PLISTO))),kbp_t_list(PLISTO).
- % kbp_t(PLIST):- hook:kbp_t_list_prehook(PLIST,PLISTO),kbp_t_list(PLISTO).
- kbp_t(PLIST):- append(PLIST,[_MT,_PROOF],PLISTO), apply(el_holds,PLISTO). % el_holds has 2 extra args our callers shouldnt be forced TO use.. but this is a big slowdown
- ..... example of el_holds/N
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?BOX','Box-Container'],[isa,'?THROWING','ThrowingAnObject'],[isa,'?PLANET','Planet'],[except,['ASSERTION',4113449]],[groundOf,'?PLANET','?GROUND'],[isa,'?ASTRONAUT','Astronaut'],[performedBy,'?THROWING','?ASTRONAUT'],['no-GenQuantRelnFrom','in-ImmersedFully','?PLANET','Atmosphere'],[eventOccursNear,'?THROWING','?GROUND'],[objectThrown,'?THROWING','?BOX'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Speed'],'?BOX'],['StartFn','?UPWARD-MOVEMENT']],['MetersPerSecond',4.0]],[isa,'?MOVEMENT','ProjectileMotion'],[eventOutcomes,'?THROWING','?MOVEMENT'],[primaryObjectMoving,'?MOVEMENT','?BOX'],[isa,'?UPWARD-MOVEMENT','ProjectileMotion'],[firstSubEvents,'?MOVEMENT','?UPWARD-MOVEMENT'],[maximumMotionInDirection,'?MOVEMENT','?UPWARD-MOVEMENT','Up-Directly'],[primaryObjectMoving,'?UPWARD-MOVEMENT','?BOX'],['directionOfTranslation-Throughout','?UPWARD-MOVEMENT','Up-Directly'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Altitude'],'?BOX'],['EndFn','?UPWARD-MOVEMENT']],['Meter',5.0]],[isa,'?CABLE','Cable'],[isa,'?PULLING','PullingAnObject'],[isa,'?PULLING','PurposefulAction'],[performedBy,'?PULLING','?ASTRONAUT'],[eventOccursAt,'?PULLING','?PLANET'],[startsAfterEndingOf,'?PULLING','?MOVEMENT'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Mass'],'?BOX'],'?PULLING'],['Kilogram',10]],[valueOf,['MeasurementAtFn',[['QPQuantityFn','TensileForceQuantity'],'?BOX'],'?PULLING'],['Newton',100]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[thingAttachedTo,'?CONNECT','?BOX'],[thingAttached,'?CONNECT','?CABLE'],[directionOfPulling,'?PULLING','Up-Directly'],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-Query-11-6'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(4116399)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[isa,'?BOX','Box-Container'],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Mass'],'?BOX'],'?PULLING'],['Kilogram',8]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[thingAttachedTo,'?CONNECT','?BOX'],[thingAttached,'?CONNECT','?CABLE'],[directionOfPulling,'?PULLING','Up-Directly'],[temporallySubsumes,'?CONNECT','?PULLING'],['causes-SitProp','?PULLING',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]]],[thereExists,'?TENSION',[and,[consistent,[valueOf,['MeasurementAtFn',[['QPQuantityFn','TensileForceQuantity'],'?BOX'],'?PULLING'],'?TENSION']],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?TENSION',['Newton',80]],[equals,'?TENSION',['Newton',20]],[equals,'?TENSION',['Newton',40]],[equals,'?TENSION',['Newton',100]]]]]]]],['TestQueryFn','ETS-Query-11-3'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(4115492)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[isa,'?BOX','Box-Container'],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Mass'],'?BOX'],'?PULLING'],['Kilogram',8]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[thingAttachedTo,'?CONNECT','?BOX'],[thingAttached,'?CONNECT','?CABLE'],[valueOf,['MeasurementAtFn',[['VectorQuantityOfFn','Tension'],'?CABLE'],'?PULLING'],['VectorFn',['Newton',72],'Up-Directly']],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-Query-11-2'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(4273399)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[isa,'?BOX','Box-Container'],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Mass'],'?BOX'],'?PULLING'],['Kilogram',8]],[valueOf,['MeasurementAtFn',[['QPQuantityFn','TensileForceQuantity'],'?BOX'],'?PULLING'],['Newton',104]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[thingAttachedTo,'?CONNECT','?BOX'],[thingAttached,'?CONNECT','?CABLE'],[directionOfPulling,'?PULLING','Up-Directly'],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-Query-11-0'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(3968221)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[isa,'?BOX','Box-Container'],[isa,'?TENSION','TensileForceVector'],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[massOfObject,'?BOX',['Kilogram',8]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[configuredObjects,'?CONNECT','?BOX'],[configuredObjects,'?CONNECT','?CABLE'],[vectorMagnitude,'?TENSION',['Newton',104]],[vectorDirection,'?TENSION','Up-Directly'],[actingForces,'?PULLING','?TENSION'],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[constantThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[increasesThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION'],[constantThroughoutEvent,'accelerationOfObject-Translation','?BOX','?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[increasesThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION'],[increasesThroughoutEvent,'accelerationOfObject-Translation','?BOX','?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-PhysicsSampleQuery-11-New'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(3966599)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[isa,'?BOX','Box-Container'],[isa,'?TENSION','Tension'],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[massOfObject,'?BOX',['Kilogram',8]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[configuredObjects,'?CONNECT','?BOX'],[configuredObjects,'?CONNECT','?CABLE'],[vectorMagnitude,'?TENSION',['Newton',104]],[vectorDirection,'?TENSION','Up-Directly'],[actingForces,'?PULLING','?TENSION'],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[constantThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[increasesThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION'],[constantThroughoutEvent,'accelerationOfObject-Translation','?BOX','?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],[increasesThroughoutEvent,'speedOfObject-Translation','?BOX','?TRANSLATION'],[increasesThroughoutEvent,'accelerationOfObject-Translation','?BOX','?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-PhysicsSampleQuery-11-New'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(3964095)]).
- el_holds(sentenceParameterValueInSpecification,['Quote',[implies,[and,[isa,'?CABLE','Cable'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Length'],'?CABLE'],'?PULLING'],['Meter',40]],[isa,'?BOX','Box-Container'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Width'],'?BOX'],'?PULLING'],[['Centi','Meter'],200]],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Length'],'?BOX'],'?PULLING'],[['Centi','Meter'],340]],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Height'],'?BOX'],'?PULLING'],[['Centi','Meter'],90]],[isa,'?PULLING','PullingAnObject'],[pullee,'?PULLING','?BOX'],[puller,'?PULLING','?CABLE'],[valueOf,['MeasurementAtFn',[['QPQuantityFn','Mass'],'?BOX'],'?PULLING'],['Kilogram',8]],[valueOf,['MeasurementAtFn',[['QPQuantityFn','TensileForceQuantity'],'?BOX'],'?PULLING'],['Newton',104]],[isa,'?CONNECT','PhysicalConnection-Configuration'],[thingAttachedTo,'?CONNECT','?BOX'],[thingAttached,'?CONNECT','?CABLE'],[directionOfPulling,'?PULLING','Up-Directly'],[temporallySubsumes,'?CONNECT','?PULLING']],[thereExists,'?PROP',[and,['causes-SitProp','?PULLING','?PROP'],[goodChoiceAmongSentences,'?ANSWER',[[equals,'?PROP',[objectStationary,'?PULLING','?BOX']],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['constantThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]],[equals,'?PROP',[thereExists,'?TRANSLATION',[and,[isa,'?TRANSLATION','Translation-SingleTrajectory'],[subEvents,'?PULLING','?TRANSLATION'],[cotemporal,'?PULLING','?TRANSLATION'],[primaryObjectMoving,'?TRANSLATION','?BOX'],['directionOfTranslation-Throughout','?TRANSLATION','Up-Generally'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Speed'],'?BOX'],'?TRANSLATION'],['increasesThroughoutEvent-Fluent',[['QPQuantityFn','Acceleration'],'?BOX'],'?TRANSLATION']]]]]]]]]],['TestQueryFn','ETS-Query-11-4'],'TestVocabularyMt',[amt('TestVocabularyMt'),dir(':FORWARD'),refcl(4116413)]).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement