Pages

Wednesday, May 15, 2013

States and Situations

This article is an attempt of disambiguation and distinction of the terms situation and state. A classicle example of this overlap can be found in McCarthy and Hayes, Some philosophical problems from the standpoint of artificial intelligence (1969): "a situation s is the complete state of the universe at an instant of time."

In the theory of Finite-State Machines, an automaton may be in a finite number of states, but only in one state at a time. In an hardware device, interpreted as a FSM, the state corresponds to the values recorded in registers and memories. In a running software, it is the value assumed by all variables. Operators and functions perform transitions between states. In this case, the state is given by all the stored information, at a given time, to which the system has access.

The word state comes from the Latin status, which is past participle of the verb stare - “to stay”, also in the sense of “to stay still”. As a matter of fact, we cannot identify something that we are not able to discriminate from the flow of events. When this is possible, these discrete epistemic entities may be identified as corresponding to states. Following this interpretation, states is what is in between changes.

Furthermore, if we extend the assumption of impossibility of ubiquity, it should be not possible to stay in two different states at the same time. Is it true?

The problem is that state qualifications are easily extended to other frames. For example, we need cash and we go to the nearest Bancomat/ATM. There we found a message: "This device is blocked. We are sorry for the inconvenience". To what extent is the state of the machine blocked? Are we referring in this case to some information stored in the ATM device?

The source of the ambiguity may be explained in this way. At a design level, without considering the actual implementation, the service designer considers functional states like blocked, waiting for a payment card, asking the pin code, etc. At this level of abstraction, the system has been conceived and described using a few states, among which, blocked. Here, the ATM is actually blocked, and block is a state.

But what if we are referring to another level of abstraction? For example, the software level, as software developers do. Is blocked a state? In this frame, not properly. The states of this system are all the possible values assumed by the variables of the program. However, that blocked state may be translated as software states. Empirically, we may collect all combinations of variables occurring when a block state is recognized. This occurs sometimes  when a program fails: (partial) dumps of memory are sent through the web. Obviously, there is also an analytic solution. If we analyze the program, we may describe the blocked state as a logical combination of conditions of the variables. This is an example of the logical perspective.

Considering a more formal framework:
A state is a snapshot of the part of the world being modeled at a particular instant of time. State descriptions need to be composed of atomic propositions. This is vital for our purposes since actions typically affect only a small fraction of the environment - and in order to concentrate on this fraction when specifying the effects of an action we need to access to it. Otherwise, i.e., if states are represented as abstract objects without bearing an internal structure (as it is typical for automata theory, for instance), the impact of an action could only be specified by a complete state transition table. This would violate the most fundamental requirement for adequacy. - Michael Thielscher, Challenges for Action Theories (2000)
With this definition, describing a world in more than one state at the same time seems to be possible.  However, a trace toward a solution to this contradiction is given by the use of the expression "part of the world". The use of a state is strictly related to that system. All ambiguity comes from addressing only implicitly which systemic representation we are using, when talking about the world, or some part of it.

A system, when referred to something existing in the world of experience, corresponds to a layer of representation of reality, defined with a certain structure and behaviour. In general, this behaviour is given by a succession of states and transactions. However, "below" this representation, there is typically another representation, with greater information entropy, and less abstract components. And we may continue to descend, using lower representations, down to perceptions. "Behind" these, there is the actual world.

Interestingly, a disambiguation exists in some domains: when we refer to the marital status, or the status of an application, we are explicitly referring to the state of a certain sub-system, component in these cases of an institutional or service-oriented system.

Still, the problems remains. When we say that in order to cook something, the oven should be powered..
The powered condition is a state of the oven, but what is it, in the higher abstraction level concerning agents and objects? In this case, the word situation may be probably more pertinent, in the explicit sense of combination of circumstances.

Situation comes from the medieval Latin word situare, constructed on top of the word situs. The first meaning is place, but it is also the past participle of sinere, “to place”. As a matter of fact, we, as agents, need to place (or attribute) situations to components (which may be in turn sub-systems) of our representational system, in order to infer something about the world.

Returning to the example of blocked ATM, although the qualification remains the same:
  • when we refer to the ATM as a system, blocked is a state.
  • when we refer to the ATM as an object in a world system, the block of the ATM is a situation.  

Friday, April 26, 2013

Serial vs Parallel, Sequential vs Concurrent

In a Turing machine, instructions are executed one after the other, so, by definition, its behaviour is always sequential. However, in a multitasking system we have many and concurrent processes. The operating system reduces the concurrent programs to a definite sequence of operations (but not pre-determined, it is an on-the-fly operation and depends to the contingency of the processes). A multitasking system operates also on single-core computers. Parallel execution means that the system divide the instructions to different core processors. This may occurs both in single-task and multitasking systems.

The use of the term parallel and concurrent is widespread in other domains as well, like programming, but it has determined some confusion with the somehow related terms sequential and concurrent. I will try to highlight the differences, using some practical example. My goal is to explain this picture:



The serial/parallel and sequential/concurrent characterizations are orthogonal. From a common-sense point of view, this orthogonality can be associated to the ontological separation between space and time, form and behaviour, objects and processes, being and doing. Adding the zero points to both axis - i.e. when there is no change (static), or when there is no topological decomposition (unity), we may map our system description on this picture.

In electronics, serial (or series) and parallel identify wo different configurations of some components. 

By the sake of an example, let us consider this representation:

> component X >

where the ">" symbol identifies the input and output direction. 

The serial configuration is a sort of chain, where the output of the first element is the input of the second:

INPUT > component A > component B > .. > component N > OUTPUT 

On the contrary, the parallel configuration is a sort of knitting, created by connecting to one spot all the inputs, and to another spot all the outputs. 

INPUT > component A > OUTPUT
      > component B > 
      > ..          > 
      > component N >

In electronics serial and parallel represent a type of static topology, determining the actual behaviour of the circuit. When there is no concurrency, parallelism is deterministic.

In order to describe dynamic, time-related phenomena, we use the term sequential and concurrent. For example, a certain outcome may be obtained via a certain sequence of tasks (eg. a recipe). When we are talking with someone, we are producing a sequence of words. However, in reality, many other processes occur in the same moment, and thus, concur to the actual result of a certain action. If a lot of people is talking at the same time, concurrent talks may interfere with our sequence, but the outcomes of this interference are not known in advance. Concurrency introduces indeterminacy.

We construct an example starting from digital communication, and then human communication. A decade ago, serial and parallel were commonly used to identify two kind of cables. In a serial adapter, a digital message is only temporally distributed along the same communication line (eg. one wire). In a parallel adapter, this is divided also on parallel communication lines (eg. many wires), and then reconstructed on the receiving end. 

Let us image a game, with 9 children. If we dispose them as a chain, give a message at the first and receive it at the end, we would have a serial communication. More words compose the message, consisting in a sequence of communication unities. For now, let us supposes a perfect communication between the children (similarly to digital communication with no failures).

I like ice-cream so much. > X > X > X > X > X > X > X > X > X > ....

This is a sequential process reproduced on a serial infrastructure.

Now, let us image to divide the children in groups of 3. We divide the phrase in three parts, give the first to the child of the line at our left, the second to the center line's child, etc.

I like ice-cream so much. > I like    > X > X > X > .... > ....
                          > ice-cream > X > X > X > ....
                          > so much   > X > X > X > ....

This is a sequential process reproduced on a parallel infrastructure (still partially serialized although). In both cases, because of the perfect transfer, the result is determined in advance.

However, if other people are talking to the first child at the same time as you, or, if we consider the actual individual interpretation performed by each child, then many interrelated concurrent processes will concur simultaneously to the final reconstruction. The outcome is non-determined in advance.

Wednesday, March 13, 2013

Conditions vs Requirements

This investigation started from this phrase:
The difference between a logical condition and a requirement may be understood in terms of the (Kantian) difference between analytic statements (logical conditions) and synthetic statements (requirement). [Lehmann, J., Breuker, J., & Brouwer, B. (2004). Causation in AI and Law. Artificial Intelligence and Law, 12(4), 279–315
In philosophy these concepts are usually defined along these terms: analytic propositions are true by virtue of their meaning (eg. robins are birds), i.e. truth seems to be knowable by knowing the meanings of the constituent words alone; synthetic propositions are true by how their meaning relates to the world (eg. robins fly), i.e. truth is knowable by both knowing the meaning of the words and something about the world. (See Analytic/Synthetic Distinction on the Stanford Encyclopedia of Philosophy.)

However, conditions and requirements have a quite different meaning in other domains. For example, general conditions refer usually to an inherent part of an agreement. They are more static (considering a certain domain), and remain the the same from contract to contract, dealing with contractual principles. Supplements are added for a particular contract. On the other hand, general requirements cover an inherent part of the specifications of the contract: they are more dynamic because they change from contract to contract, and deal with minute specifications applicable to that particular case.

In that article the quoted phrase followed these statements:
In other words, the grounds for responsibility attribution do not have the status of logical or strictly rational conditions. They rather are widely accepted requirements, which generally grow out of tradition and that are progressively codified by legislators in the Law. [ibidem]
Integrating this, we may infer the following general rule: conditions come from (logic) necessity, requirements come from use. Considering the examples given above, we may explain the different uses in this way: 
  • general conditions adhere necessarly to the current legal dispositions, while the description of the general requirements is a result of the expertises of the provider and user, 
  • grounds for responsibility grow up with the legal production, so they are requirements,
  • analythic propositions are logically necessary, while synthetic propositions result from our experience.

Conditions in Law

From West's Encyclopedia of American Law:

A condition may be either express or implied.
  • An express condition is clearly stated and embodied in specific, definite terms in a contract, lease, or deed, such as the provision in an installment credit contract that, if the balance is paid before a certain date, the debtor's interest will be reduced.
  • An implied condition is presumed by law based upon the nature of a particular transaction and what would be reasonable to do if a particular event occurred. If a woman leases a hall for a wedding on a certain date, her ability to use the hall is based on its implied continued existence. If the hall burns down before that date, use of the hall is impossible due to fire; therefore, the law would imply a condition excusing the lessor from liability. 
In the law of contracts, as well as estates and conveyancing, conditions precedent and subsequent may exist.
  • A condition precedent must occur before a right accrues. A woman may convey her house to her son based on the condition that the son marry by the age of twenty-five. If the son fails to marry by that age, he has lost his right to the house. Similarly, in contract law, if an agreement is signed by one party and sent to a second party with the intention that it will not become enforceable until the second party signs it, the second party's signature would be a condition precedent to its effectiveness. 
  • A condition subsequent means that a right may be taken away from someone upon the occurrence of a specified event. An owner of property may convey land to a town on the condition that it be used only for church purposes. If the land conveyed is used to build a shopping mall, then ownership would revert to the original owner. A condition subsequent may also affect a transaction involving a gift. In many states, an engagement ring is regarded as an inter vivos gift to which no conditions are attached. In some states, however, its ownership is considered to be conditioned upon the subsequent marriage of the couple involved; therefore, if a woman does not marry the man who gave her the engagement ring, ownership reverts to him and she must return it to him. 
  • Concurrent conditions are conditions in the law of contracts that each party to the contract must simultaneously perform.