Skip to content

Commit

Permalink
new tests for Modals.java and THFnew.java translation to HOL
Browse files Browse the repository at this point in the history
  • Loading branch information
apease committed Jul 7, 2024
1 parent 70fe2d0 commit a6a1034
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 0 deletions.
45 changes: 45 additions & 0 deletions tests/TQM3.kif
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
; (note TQM3)
; (time 20)
; (file tinySUMO.kif)
; (file tinyHOL.kif)

;3. Bill believes that the Earth is flat. Is the Earth flat? Does Bill know that the Earth is flat?
; if you try to circumnavigate a flat earth you will fall off the edge and die
; Does Bill believe he will die if he tries to circumnavigate the Earth?

(believes Bill (attribute Earth Flat))

; believes has fewer successor worlds than knows
; a quantifier over fewer things is easier, therefore
; the implication is "backwards" from what one would
; expect

(=>
(believes ?H ?F)
(knows ?H ?F))

(=>
(and
(instance ?C Circumnavigation)
(located ?C ?E)
(attribute ?E Flat)
(agent ?C ?A))
(attribute ?A Dead)))

; We want to say if (X => Y) and A believes X then A believes Y - requires true HOL

(=>
(and
(=> ?X ?Y)
(believes ?A X))
(believes ?A ?Y))

(believes Bill
(and
(instance ?C Circumnavigation)
(located ?C ?E )
(attribute ?E Flat)
(agent ?C Joe)))


; (believes Bill (attribute ?P Dead))
46 changes: 46 additions & 0 deletions tests/TQM3.kif.tq
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
(note TQM3)
(time 20)
(file tinySUMO.kif)
(file tinyHOL.kif)

;3. Bill believes that the Earth is flat. Is the Earth flat? Does Bill know that the Earth is flat?
; if you try to circumnavigate a flat earth you will fall off the edge and die
; Does Bill believe he will die if he tries to circumnavigate the Earth?

(believes Bill (attribute Earth Flat))

; believes has fewer successor worlds than knows
; a quantifier over fewer things is easier, therefore
; the implication is "backwards" from what one would
; expect

(=>
(believes ?H ?F)
(knows ?H ?F))

(=>
(and
(instance ?C Circumnavigation)
(located ?C ?E)
(attribute ?E Flat)
(agent ?C ?A))
(attribute ?A Dead)))

; We want to say if (X => Y) and A believes X then A believes Y - requires true HOL

(=>
(and
(=> ?X ?Y)
(believes ?A X))
(believes ?A ?Y))

(believes Bill
(and
(instance ?C Circumnavigation)
(located ?C ?E )
(attribute ?E Flat)
(agent ?C Joe)))


; (believes Bill
; (attribute ?P Dead))
5 changes: 5 additions & 0 deletions tinyHOL.kif
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(domain modalAttribute 1 Formula)
(domain modalAttribute 2 NormativeAttribute)
(instance modalAttribute BinaryPredicate)

(subclass Formula Physical)
(subclass DeonticAttribute Attribute)
Expand All @@ -13,6 +14,10 @@
(domain knows 1 AutonomousAgent)
(domain knows 2 Formula)

(instance believes BinaryPredicate)
(domain believes 1 AutonomousAgent)
(domain believes 2 Formula)

(instance Bill Human)
(instance Joe Human)

Expand Down

0 comments on commit a6a1034

Please sign in to comment.