0% found this document useful (0 votes)
37 views63 pages

KRR IV

The document discusses the classification and representation of processes, events, and situations in logic and AI, emphasizing the importance of treating events as dynamic entities rather than static objects. It covers various types of processes, including continuous and discrete, and introduces conceptual graphs for representing time-dependent events and their relationships. Additionally, it highlights the complexities of plural markers, adverbial modifiers, and the implications of context in understanding language and logical structures.

Uploaded by

Shaik Abuzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views63 pages

KRR IV

The document discusses the classification and representation of processes, events, and situations in logic and AI, emphasizing the importance of treating events as dynamic entities rather than static objects. It covers various types of processes, including continuous and discrete, and introduces conceptual graphs for representing time-dependent events and their relationships. Additionally, it highlights the complexities of plural markers, adverbial modifiers, and the implications of context in understanding language and logical structures.

Uploaded by

Shaik Abuzar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 63

• UNIT IV

• Processes: Times, Events and Situations, Classification of processes,


Procedures, Processes and Histories, Concurrent processes,
Computation, Constraint satisfaction, Change Contexts: Syntax of
contexts, Semantics of contexts, First-order reasoning in contexts,
Modal reasoning in contexts, Encapsulating objects in contexts
Times, Events, and Situations

• SITUATIONS AND EVENTs.


• MULTIPLE OCCURRENCES
• ADVERBIAL MODIFIERS
• ACTIONS AS RoLEs
processes
• 4.1Times, Events, and Situations
• Events vs. Objects in Logic
1. Charles Sanders Peirce was the first to treat events (like actions) as separate
from objects (things involved in actions).
2. Alfred North Whitehead later emphasized processes (events) as the most
important part of reality.
3. Traditional logic often simplifies events too much, treating them like static
objects instead of dynamic actions.
2. Limitations of Basic Logical Representations
1. Sentences like "Brutus stabbed Caesar" are often translated in logic as
stabbed(Brutus, Caesar).
2. This basic translation ignores details like time (past, present, future), manner
(violently), and tools used (a shiny knife).
3. It also fails to connect events with related sentences, like "The stabbing was
violent.“
3.Rediscovery of Events in the 1960s
•Philosophers, linguists, and AI researchers realized events
should be treated as important as objects.

•Donald Davidson (1967) pushed for using event variables in


logic.

•Terence Parsons (1990) created a detailed event-based logical


representation that captured more meaning from sentences.
4.Situations and Conceptual Graphs
•Early AI researchers (Ceccato, Quillian, Schank, Tesler) developed ways to
represent words as connected concepts in networks.

•Conceptual graphs use Peirce’s logic to map sentences into structured


representations.

•Example: The sentence "Brutus stabbed Caesar violently with a shiny knife." is
broken down into:

•Agent (who did the action) → Brutus


•Patient (who received the action) → Caesar
•Instrument (what was used) → Knife
•Manner (how it happened) → Violently
5.Time Representation in Conceptual Graphs

•Time is represented using indexicals (context-dependent markers like #now


for the present time).

•Other indexicals include #I (speaker), #you (listener), #this (near object), and
#that (far object).

•This helps link events to time and context dynamically.

• Treating events as first-class entities allows for a more accurate and


detailed understanding of language, making logic and AI better at processing
real-world situations.
key points:
1.The proposition describes a past situation where Brutus stabbed
Caesar violently with a shiny knife.

2.The conceptual graph representation breaks down the sentence


into structured elements:

1.Agent (Agnt): Brutus


2.Patient (Ptnt): Caesar
3.Instrument (Inst): Knife
4.Attribute (Attr): Shiny
5.Manner (Manr): Violent
3.The graph uses abbreviations for time and situation, which
are later expanded.

4.Before translating into predicate calculus, indexicals like


#now must be replaced with specific constants.

5.Assuming the utterance occurred on March 15, 1996,


#now is replaced with 15Mar1996.

6.The final translation into predicate calculus uses existential


quantifiers and logical relations to formally represent the
statement.

This structured breakdown helps in logically analyzing and


formalizing natural language statements.
The formula expresses that a situation (s) happened at a specific time
(t), which follows March 15, 1996.

•The situation describes a stabbing event involving

•Brutus (agent) stabbing Caesar (patient)


•A knife (instrument) used in the stabbing
•Violence (manner) in the action
•The knife being shiny (attribute)
•The conceptual graph (Figure 4.1) contains all details from the formula but is
easier to relate to English sentence structure.

•Each concept node in the graph represents key words in the sentence (like
"stab," "knife," "Brutus").
•The graph structure mirrors English grammar:Past tense (-ed) → (Past node)
•"With a knife" → (Inst: Instrument node)
•"Shiny knife" (adjective before noun) → (Attr: Attribute node)
•"-ly" in "violently" → (Manr: Manner node)
•Subject (Brutus) & Object (Caesar) → (Agnt & Ptnt nodes, based on word
order in English or case markers in other languages)
•This explanation shows how formal logic (predicate calculus) and
conceptual graphs can represent natural language meaning
systematically.
•MULTIPLE OCCURRENCES
•past Tense in Conceptual Graphs (CGs):
•The Past relation in a CG shows that an event happened in the
past.

•It can be attached to the verb (e.g., "Yojo chased a mouse"),


meaning the action occurred in the past but not necessarily the
other entities.

•It can also be attached to a Situation (e.g., "Yojo, the chase, and
the mouse were all part of a past event"), ensuring all elements
happened together.
Scope of the Past Tense:
•Attaching "Past" to just the verb means only the action is
marked as past.
•Attaching "Past" to a Situation means everything inside it
happened together in the past.
•Example:
• "Yojo chased a mouse" (Past applies to "Chase")—we
don't know if the mouse still exists.
• "Yojo chased two mice" (Past applies to "Chase")—
Yojo chased two mice, but not necessarily at the same
time.
Issues with Plural & Past Tense:
•If Yojo chased two mice separately, saying "Yojo chased two mice" with Past
applied to the entire Situation would be incorrect—it suggests he chased them
simultaneously, which may not be true.

•Instead, a plural marker (@2) is used to indicate two separate chases rather
than one event.
Diodorus Cronus' Paradox (4th Century B.C.):
•Some past-tense statements are true overall but never true at any single
moment in time.
Diodorus Cronus' paradox:
Example:
"Mark climbed five mountains."
This statement is true in the past tense, but at no single moment in time was
Mark climbing all five mountains simultaneously. Instead, he climbed them
one after another.
A distributive marker (Dist) can clarify that the action was spread over
different instances rather than occurring all at once.
•Key points

•Where you attach "Past" in a CG changes the meaning.

•Plural nouns in past tense can be tricky—they may mean


events happened separately.

•Some past-tense truths were never true in the present at


any moment.
Distributive vs. Collective Plurals in Conceptual Graphs
•Distributive Plural (Dist):
Each person or object is treated separately, meaning separate events happen
for each.

Example: "Mark climbed five mountains (M1, M2, M3, M4, M5)" → He
climbed them one at a time.

•The Past relation cannot be moved to a larger situation because each climb
happened at a different time.
Collective Plural (Col):

The people or objects are treated together, meaning a single event


applies to all.

Example:
"Mark climbed five mountains at once" → (if it happened, which it
didn’t).

•The Past relation could be moved to a larger situation because all


climbs happened at the same time.
Ambiguity of Plural Markers
•Some plural words don’t clarify whether events happened together or
separately.

•Example: "Yojo chased two mice.“

• It could mean Yojo chased them at the same time (collective).

• It could also mean he chased them one after another (distributive).

• Extra words like "together" or "simultaneously" help clarify the meaning.


ADVERBIAL MODIFIERS
Adverbs and Sentence Meaning
•Where you place an adverb changes what it modifies!
• Example:
• "John sang strangely." → How John sang was strange (maybe
he sang off-key).
• "Strangely, John sang." → The fact that he sang at all was
strange (maybe it was an inappropriate moment).

• conceptual graphs, this is represented as:


• If the adverb modifies how something happened → It’s linked to
the verb ("Sing").
• If the adverb modifies the whole situation → It’s linked to the
entire event ("Situation").
4. Adjectives vs. Adverbs in Different Languages
•English has -ly endings for adverbs (e.g., strangely vs. strange).
•Some languages (e.g., German, Chinese) don’t have this distinction.
• Instead, meaning is based on context rather than grammar.

•Example:
• "John’s singing was strange."
• Even though strange is an adjective, it still modifies how he sang rather
than describing singing as a thing.
Actions as Roles
•Some verbs describe actions directly, while others describe them by
their role.
•Example:
• "Mary hid the ball by placing it in a box.“

• "Hiding" and "placing" describe the same action, but from


different perspectives:

• "Placing" → Describes what she physically did.


• "Hiding" → Describes why she did it.

•Meaning depends on context, not just the words used.


Key outcomes :
Plural markers can be ambiguous (Did events happen together or
separately?).

Adverbs modify either the action or the whole situation, depending


on placement.

Some languages rely on context instead of grammar for


adverbs/adjectives.

Actions can be described based on form (what happened) or role


(why it happened).
4.2 Classification of Processes
4.2 Classification of Processes

1.Types of Processes
1.Continuous Processes: Changes happen smoothly without
interruption (e.g., weather changes gradually).
2.Discrete Processes: Changes happen in distinct steps with pauses in
between (e.g., computer programs).

2.Subcategories of Processes
1.Initiation: The process starts at a specific point.
2.Continuation: The process continues without a defined start or end.
3.Cessation: The process stops at a specific point.
• 3.Understanding Process Classification
• A continuous process can be represented as a wavy line (smooth
change).
• A discrete process is a series of states and events, shown as straight
and wavy lines with vertical bars (indicating stops and starts).
4.Agent’s Intentions Matter

•A process can be seen as a success or failure depending on whether it


meets the intended goal.

•Example: A farmer plowing fields over two days could be seen as:

•One successful event (if completing the task in two days was the
goal).

•Two separate events (if each field was considered separately).

•A failure (if the goal was to finish in one day).


5.Language and Process Classification

•Tense (Past, Present, Future): Tells when an event happens.

•Aspect (Initiation, Continuation, Completion): Describes how


an action unfolds over time.

•Verbs and wording can change how an event is classified


(success vs. failure).
4.2.1 Fluents
• Fluents
• Isaac Newton introduced the concept of fluents to describe time-
dependent physical quantities such as position, pressure, and
temperature.

• Gottfried Wilhelm Leibniz later developed the broader concept of


functions, which could depend on any type of argument, including
time
• Ways of Representing Time Dependencies:
1.Implicit Representation:
1. Temporal logic uses operators like D (always) and O (sometimes) to indicate time
dependencies.
2. Predicates within their scope (e.g., part(x, y)) are treated as fluents with an
implicit time quantifier.

3. Implicit: Time is assumed (e.g., "It is always hot in summer").

2.Explicit Representation:
1. Time quantifiers (e.g., ∀t. Time and ∃t. Time) make time an explicit argument.
2. Example: The predicate part(x, y, t) explicitly includes time (t) as an index for
different contexts.

3. Explicit: Time is mentioned directly (e.g., "The temperature at 3 PM was 30°C").


• Fluents and Context Dependency:
• Example of a logical fallacy:
Premises:
• "The president of the United States is elected every four years.“

• "Bill Clinton is the president of the United States."


Incorrect Conclusion: "Bill Clinton is elected every four years.“

• The fallacy arises because the president is a context-dependent fluent—its


meaning changes with each election.
4.2.2 Basic Distinctions
•Basic Distinctions of Processes (By Erik Sandewall)
•Discrete vs. Continuous:
•Discrete: Happens in steps (e.g., digital computers).
•Continuous: Happens smoothly (e.g., weather changes).

•Linear vs. Branching:


•Linear: Events happen one after another in a fixed way.
•Branching: Events can go in different directions based on conditions.

•Independent vs. Ramified:


•Independent: One event doesn’t affect others.
•Ramified: One event can cause multiple changes (local or widespread).
•Immediate vs. Delayed:
•Immediate: Changes happen instantly.
•Delayed: Effects appear later.

•Sequential vs. Concurrent:


•Sequential: Events happen one at a time.
•Concurrent: Multiple events happen at the same time.

•Predictable vs. Surprising:


•Predictable: Follows a known pattern.
•Surprising: Has unexpected events.

•Normal vs. Equinormal:


•Normal: One outcome is more likely than others.
•Equinormal: All outcomes are equally possible.
•Flat vs. Hierarchical:

•Flat: Simple event list.

•Hierarchical: Events contain sub-events (can be recursive)

• Timeless vs. Time-bound:Timeless: Fixed objects that don’t change.

• Time-bound: Objects can be created or destroyed.

• Forgetful vs. Memory-bound:Forgetful: Only the current state matters.

• Memory-bound: Past states influence the future.


• Process Complexity
• Combining these distinctions leads to 2304 possible types of
processes!
• Some processes are as simple as a clock, while others are highly
complex.

• Additional Considerations
• Processes can be local (inside one system) or distributed (across
networks).
• New classifications can always be added based on different needs.
4.3 Procedures, Processes, and
Histories
• Digital vs. Analog Simulation:
• Digital computers simulate discrete processes; analog computers
handle continuous processes more naturally.
• Small time steps in digital simulations can effectively mimic
continuous motion (e.g., movies and television).
• State-Transition Diagrams:
• Represent states with circles and events with arrows.
• Finite-state machines are a basic, widely used form of these diagrams.
• Petri Nets:
• Generalize state-transition diagrams to represent concurrent
processes.
• Use “places” (circles) for states and “transitions” (bars) for events.
• Widely applied in object-oriented design (basis for UML activity
diagrams).
• Flow Charts and Their Integration:
• Early programming for von Neumann machines used flow charts,
where boxes denote computational events and diamonds denote
decisions.
• A Petri net can merge flow charts and finite-state machines, linking
states (places) with events (transitions) to depict cause and effect
4.3.1 MAPPING TO LOGIC.
• Visual Representation to Logic:
• Diagrams like flow charts, finite-state machines, and Petri nets can be
translated into logical formulas using conceptual graphs or predicate
calculus.
• Key Components:
• States: Represent conditions (e.g., p, q, r).
• Events: Represent transitions (e.g., a, b, d).
• Conditions: Decide which state follows (e.g., condition c directing the
transition from state r to either s or t).
• Simple Example:
• Consider a simple Petri net with a state p, an event a, and a state q.
• Mapping:
• State p is the precondition for event a.
• Event a leads to state q (which is both the postcondition of a and the
precondition for the next event).
• Logical Formula Representation:
(∃p:State) [dscr(p, tp(p-graph)) ∧ next(p, a) ∧ dscr(a, tp(a-graph)) ∧ next(a,
q) ∧ dscr(q, tp(q-graph))].
• Distinctions:
• Procedure: A pattern or script specifying possible sequences (types of
states and events).
• Process: An actual instance (activation) of a procedure, with a current
state (marked by #now).
• History: A record of the sequence of states and events with time
stamps.
4.3.2 BRANCHES AND LOOPS.
• Branches:
• Definition: A branch splits the flow; only one path is taken based on a
condition.
• Logical Representation: Use an if-then-else structure to ensure only the taken
branch has valid states/events.
• Simple Example: At state r, if condition c is true, proceed to event d; if false,
proceed to event f.
• Loops:
• Definition: A loop occurs when the process revisits a state, creating a new
instance each time.
• Logical Representation: Represent each loop iteration as a new instance to
distinguish repeated visits.
• Simple Example: After event e, the process loops back to state q; each loop is
a new occurrence of q.
• 4.3.3 PROCEDURAL OR DECLARATIVE.
• Procedural Languages:
• Implicit sequence defined by the order of commands.
• Example: if condition: do_d() else: do_f()
• Declarative (Logic-Based) Languages:
• Explicitly state relationships using predicates to indicate order.
• Example:
• Represent the sequence as: next(start, d) if condition true; next(start, f) if
condition false.
• Key Insight:
• Logic can model procedures by explicitly specifying relationships, allowing
compilers to translate the same high-level ideas into either logic for analysis
or procedural code for execution.
4.4 Concurrent Processes
• Concurrent vs. Sequential:
• Unlike sequential processes shown in flow charts, concurrent
processes allow multiple events to occur simultaneously.

• Petri Nets for Concurrency:


• Use tokens flowing through places (states) and transitions (events) to model
parallel activities.
• Simple Example – Bus Stop:
• Tokens:
• Three tokens represent people waiting; one token represents an arriving
bus.
• Transitions:
• "Bus stops" moves the bus token to a waiting state.
• "One person gets on bus" fires repeatedly as long as both the bus and
waiting people tokens are present.

• Advanced Modeling:
• Colored Petri nets use token “colors” to indicate different types or attributes,
adding more detail to concurrent processes.
4.4.1FLOW OF ToKENS.
• Overview:
• In Petri nets, tokens represent states or conditions that evolve over time,
illustrating the execution of concurrent processes.
• Token Flow Rules:
• Enabled: A transition is ready if all its input places contain a token.
• Active: An enabled transition fires by removing one token from each input
place.
• Finished: Once fired, the transition adds one token to each of its output
places.
• Simple Example:
• At t=0: A token is in state A (e.g., a process starts).

• Transition B: When enabled by the token in A, it fires—removing the token


from A and placing tokens into states C, D, and E.

• Timing: The conceptual graph might show that state A lasted 5 seconds, then
event B took 3 seconds, leading to new states with specified durations.

• Extended Idea – Colored Petri Nets:


• Tokens can carry "colors" (data types) to represent different resources, tasks,
or conditions, as seen in project management tools like PERT charts.
4.4.2 TIMING DIAGRAM
• Timing Diagram Overview:
• A timing diagram is a specialized notation that maps the history of states and
events along a timeline, making the flow of time explicit.
• It uses a calibrated time arrow with vertical markers to indicate when events
occur and how long states last.
• Key Features:
• States: Represented by straight lines indicating periods of activity.
• Events: Shown as wavy lines, marking transitions between states.
• Parallel Processes: Multiple threads can run concurrently, similar to a
multithreaded system.
• Simple Example:
• At t = 0: State A begins and lasts until t = 5.
• At t = 5: Event B occurs (e.g., a transition) and lasts for 3 seconds.
• At t = 8: New states C, D, and E start concurrently.
• At t = 22: A subsequent event (e.g., F) completes, and a new cycle (state A)
begins.
4.4.3 MEASURING TIME.
• Regular Ticks as Time Units:
• Time is measured by counting regular events (e.g., heartbeats, water
drips, pendulum swings).
• Petri Net Clock:
• A Petri net models a clock where a "Tick" transition fires when
enabled, replacing a token and adding one to a “Time” place.
• Example: Four tokens in the "Time" place indicate four ticks, which
could represent different time units (e.g., 4 seconds or 4 months).
• Token Counting Mechanism:
• A simple one-bit counter Petri net has places for input, even (0), odd
(1), and carry (overflow).
• Multiple one-bit counters can be linked to count higher numbers,
similar to how gears or digital counters work in clocks.
4.4.4 SYNCHRONIZING PROCESSES.
• Petri Nets & Synchronization:
• Petri nets allow asynchronous, independent process flows but can also
synchronize interacting processes.
• Example – Producer and Consumer:
• Producers: Two loops independently produce messages.
• Consumer: One loop consumes messages.
• Synchronization:
• Buffer Empty Place: Holds tokens representing available empty buffers; a
producer must wait for one to produce a message.
• Buffer Full Place: Holds tokens representing filled buffers; the consumer
waits until a message is available.
• Semaphore Mechanism:
• P Operation ("Pass"): Requests a resource; waits if no token (resource) is
available.
• V Operation ("Free"): Releases a resource by adding a token, making it
available to others.
4.45 THEOREMS ABOUT PETRI NETS
• Static vs. Dynamic:
• The Petri net’s places and transitions define a fixed (static) structure, while
the tokens moving through them represent the dynamic state (active
instances).
• Net Gain Theorem:
• For any transition with n input places and m output places, each firing
changes the token count by (m – n).
• Example: A fork transition with 1 input and 3 outputs adds 2 tokens each time
it fires; a join transition with 2 inputs and 1 output loses 1 token.
• Constant Token Theorem:
• If every transition has the same number of inputs as outputs, the total
number of tokens remains constant (preventing issues like memory leaks in
multitasking systems).
• Cycle Theorem:
• In any cycle where each place has exactly one input arc and one output arc,
the number of tokens on that cycle remains constant, even if the overall
token count changes.

• Simple Example Summary:


• Fork: Transition A takes 1 token from place P and distributes it to places Q and
R (net gain = +1).

• Join: Transition B takes 1 token each from Q and R and produces 1 token in
place S (net loss = –1).

• Balancing these operations ensures that over cycles, the total tokens remain
within defined bounds.

You might also like