walk-through for qf7.km halo pilot knowledge-base jason chaw [email protected]

28
Walk-Through for QF7.km Halo Pilot Knowledge- Base Jason Chaw [email protected]

Upload: keyla-ficke

Post on 14-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

Walk-Through for QF7.kmHalo Pilot Knowledge-Base

Jason Chaw

[email protected]

Page 2: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

Question QF7

a) NaCl

b) CH3COOH

c) NH3

d) Ba(OH)2

e) CH3CH2OH

Which of the following is a non-electrolyte?

Page 3: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

Question QF7

• Given five compounds, the question requires us to determine the compound which is a non-electrolyte.

• Strategy1. Determine the electrolyte status for each compound2. Placing the five compounds into an aggregate3. Sieve the aggregate for the compound which is a non-

electrolyte

Page 4: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM>

Page 5: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)

Create an instanceOf NaCl

Page 6: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM>

Create an instanceOf NaCl

Page 7: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)

Is NaClan Electrolyte?

Page 8: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)

Is NaClan Electrolyte?

Page 9: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)

Doing both in one step

Page 10: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)

Doing both in one step

Page 11: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)

Let’s try it forCH3COOH

Page 12: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)

Let’s try it forCH3COOH

Page 13: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)

Let’s try it forNH3

Page 14: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)(t)

Let’s try it forNH3

Page 15: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)(t)KM> ((a Ba_OH_2-Substance) isa Electrolyte)

Let’s try it forBa(OH)2

Page 16: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)(t)KM> ((a Ba_OH_2-Substance) isa Electrolyte)(t)

Let’s try it forBa(OH)2

Page 17: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)(t)KM> ((a Ba_OH_2-Substance) isa Electrolyte)(t)KM> ((a CH3CH2OH-Substance) isa Electrolyte)

Let’s try it forCH3CH2OH

Page 18: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 1

• Determine the electrolyte status of each compound

KM> (a NaCl-Substance)(_NaCl-Substance4845)KM> (NaCl-Substance4845 isa Electrolyte)(t)KM> ((a NaCl-Substance) isa Electrolyte)(t)KM> ((a CH3COOH-Substance) isa Electrolyte)(t)KM> ((a NH3-Substance) isa Electrolyte)(t)KM> ((a Ba_OH_2-Substance) isa Electrolyte)(t)KM> ((a CH3CH2OH-Substance) isa Electrolyte)(nil)

Let’s try it forCH3CH2OH

Page 19: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 2

• Placing the five compounds into an aggregate

KM>

Page 20: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 2

• Placing the five compounds into an aggregate

KM> (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance)))

Associate textwith coupound

Page 21: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 2

• Placing the five compounds into an aggregate

KM> (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance)))

Putting them intoan aggregate

Page 22: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 2

• Placing the five compounds into an aggregate

KM> (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance)))((:pair "(a) NaCl" _NaCl-Substance4930 #|"a Strong-Electrolyte&NaCl-Substance"|#) (:pair "(b) CH3COOH" _CH3COOH-Substance4944 #|"a Weak-Electrolyte&Monoprotic-Acid&CH3COOH-Substance"|#) (:pair "(c) NH3" _NH3-Substance4966 #|"a Weak-Electrolyte&NH3-Substance"|#) (:pair "(d) Ba(OH)2" _Ba_OH_2-Substance4983 #|"a Strong-Electrolyte&Salt-Substance&Ba_OH_2-Substance"|#) (:pair "(e) CH3CH2OH" _CH3CH2OH-Substance5006))KM>

Putting them intoan aggregate

Page 23: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 3

• Sieve the aggregate for the compound which is a non-electrolyte

KM>

Page 24: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 3

• Sieve the aggregate for the compound which is a non-electrolyte

KM> (forall (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance))) where (not ((the2 of It) isa Electrolyte))

(the1 of It))

Sieve for the compound that is a non-electrolyte

Page 25: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 3

• Sieve the aggregate for the compound which is a non-electrolyte

KM> (forall (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance))) where (not ((the2 of It) isa Electrolyte))

(the1 of It))

This is the condition for testing each compound at every iteration

Page 26: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 3

• Sieve the aggregate for the compound which is a non-electrolyte

KM> (forall (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance))) where (not ((the2 of It) isa Electrolyte))

(the1 of It))

For every satisfying tuple, we extract the text

Page 27: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

QF7 – Step 3

• Sieve the aggregate for the compound which is a non-electrolyte

KM> (forall (:set (:pair "(a) NaCl" (a NaCl-Substance)) (:pair "(b) CH3COOH" (a CH3COOH-Substance)) (:pair "(c) NH3" (a NH3-Substance)) (:pair "(d) Ba(OH)2" (a Ba_OH_2-Substance)) (:pair "(e) CH3CH2OH" (a CH3CH2OH-Substance))) where (not ((the2 of It) isa Electrolyte))

(the1 of It))(“(e) CH3CH2OH”)KM>

Sieve for the compound that is a non-electrolyte

Page 28: Walk-Through for QF7.km Halo Pilot Knowledge-Base Jason Chaw jchaw@cs.utexas.edu

Question Q7

a) NaCl

b) CH3COOH

c) NH3

d) Ba(OH)2

e) CH3CH2OH

Which of the following is a non-electrolyte?

Option (e) is the correct answer!