back


; conflict.ops

(literalize country
        name
        president)

(literalize person
        firstname
        city
        state)

(literalize state
        abbrev
        country
        statename
        population)

(literalize senator
        lastname
        from)

(p startup
        (start)
    -->
        (make person ^firstname jan ^city phoenix ^state AZ)
        (make state ^abbrev AZ ^statename arizona ^population 3700000
                    ^country USA)
        (make senator ^lastname McCain ^from AZ)
        (make senator ^lastname DeConcini ^from AZ)
        (make person ^firstname scott ^city phoenix ^state AZ)
        (make person ^firstname jackie ^city scottsdale ^state AZ)
        (make person ^firstname ron ^city glendale ^state IL)
        (make state ^abbrev IL ^statename illinois ^population 11500000
                    ^country USA)
        (make senator ^lastname Braun ^from IL)
        (make senator ^lastname Simon ^from IL)
        (make person ^firstname mark ^city chicago ^state IL)
        (make person ^firstname ryne ^city chicago ^state IL)
        (make person ^firstname deborah ^city |HOFFMAN ESTATES| ^state IL)
)

(p rule1
        (state ^country )
      - (country ^name )
-->
        (make country ^name )
)

(p rule2
        (senator ^lastname  ^from )
        (senator ^lastname { <> } ^from )
-->
        (write (crlf) |The senators from |  | are:|
               (crlf)
               (crlf) 
               (crlf) )
        (remove 1)
        (remove 2)
)

(p rule3
        (state ^abbrev  ^population )
        (senator ^lastname  ^from )
        (senator ^lastname { <> } ^from )
      - (state ^population > )
-->
        (write (crlf) |The senators from the largest state (|  |) are:|
               (crlf)
               (crlf) 
               (crlf) )
        (remove 2)
        (remove 3)
)

(p rule4
        (state ^abbrev  ^population { > 1000000 < 5000000})
        (senator ^lastname  ^from )
        (senator ^lastname { <> } ^from )
-->
        (write (crlf) |The senators from |  | are:|
               (crlf)
               (crlf) 
               (crlf) )
        (remove 2)
        (remove 3)
)

(p rule5
        (state ^abbrev  ^statename 
               ^population { > 1000000 < 5000000})
        (senator ^lastname  ^from )
        (senator ^lastname { <> } ^from )
-->
        (write (crlf) |The senators from |  | are:|
               (crlf)
               (crlf) 
               (crlf) )
        (remove 2)
        (remove 3)
)