CAPÍTULO 4. RESULTADOS
4.2. Modificaciones de Resoluciones de Superintendencia
4.2.1. Sujetos Obligados a emitir electrónicamente comprobantes de pago
Grosskreutz (2002) proposed the extensionsCCGOLOGandPGOLOG.CCGOLOGdeals with con- tinuous change, an extension to overcome the limitation of GOLOGthat the world only evolves from situation to situation and, especially for projections, continuous processes cannot be mod- eled. PGOLOGextends GOLOGwith a notion of probability. With this it is possible to assign a probability to a program and with that reason with uncertainty. So, it can be projected if a formula ϕ holds with a certain probability.
Continuous Change
InCCGOLOGa new type of fluent is introduced, so-called continuous fluents. As a motivating example consider a navigation task of a robot. A fluent robotLoc denotes the location of the robot. When an action startGo(v) with v the speed of the robot is initiated the position of the robot at each point in time can be characterized by the functionpos(t) = x0+ v · (t − t0). Fluents,
whose values can be characterized by a function of time, can be modeled as continuous fluents.
5We make use of these kind of guards in our implementation of READYLOG. In the implementation (Chapter 5)
3.3. REASONING ABOUT ACTION AND CHANGE 53
He therefore introduces a time line intoCCGOLOGand a new sortt-function, which are functions of time. New axiomsval are added to the action theory defining the value of a t-function:
val(constant(x0, . . . , xn), t) = hx0, . . . , xni
val(linear(x0, . . . , xn, v0, . . . , vn, t0), t) =x′0, . . . , x′n ≡
x′
0= x0+ v0· (t − t0) ∧ · · · ∧ x′n= xn+ vn· (t − t0)
With these axioms and the time line it is possible to define condition-bounded actions. The new action type is thewaitF or(τ ) action. The argument τ is called t-f orm, a Boolean combination of closed atomic formulas of the form(F op r) with F being a continuous fluent, op ∈ {<, =}, andr a real number. τ [s, t] denotes the evaluation of a t-f orm in situation s at time t. Every occurrence of a continuous fluentF in the formula τ is replaced by val(F (s), t). The fluent formula is replaced by itst-function on s and t. The idea of the waitFor action is that as soon as the conditionτ holds the action terminates. To evaluate this point in time the notion of the least time pointltp(τ, s, t) is needed. It is an abbreviation for the formula
τ [s, t] ∧ t ≥ start(s) ∧ ∀t′.start(s) ≤ t′< t ⊃ ¬τ[s, t′], (3.16)
which is the earliest point in time where after the start ofs τ becomes true. With notion at hand, one can define the precondition axiom forwaitF or(τ ):
Poss(waitF or(τ ), s) ≡ ∃t.ltp(τ, s, t).
The successor state axiom for the fluentstart mentioned in Eq. 3.16 is modeled as P oss(a, s) ⊃ (start(do(a, s)) = t ≡
∃τ.a = waitF or(τ) ∧ ltp(τ, s, t) ∨ ∀τ.a 6= waitF or(τ) ∧ t = start(s))
With the notion of the least time point the semantics of concurrently executing programs changes to
T rans((σ1|| σ2), s, δ, s′) ≡
¬F inal(σ1, s) ∧ ¬F inal(σ2, s) ∧
(∃δ1.T rans(σ1, s, δ1, s′) ∧ δ = (δ1|| σ2) ∧
(∀δ2, s2.T rans(σ2, s, δ2, s2) ⊃ start(s′) ≤ start(s2)) ∨
(∃δ2.T rans(σ2, s, δ2, s′) ∧ δ = (σ1, δ2) ∧
(∀δ1, s1.T rans(σ1, s, δ1, s1) ⊃ start(s′) < start(s1)))
F inal(σ1|| σ2, s) ≡ F inal(σ1, s) ∨ F inal(σ2, s)
If a transition fromhσ1, si to hδ1, s′i exists and no transition of σ2with an earlier start point,σ1
is executed. Clearly, the statement is final ifσ1orσ2is final. We omit the semantic definitions of
the other language constructs ofCCGOLOGhere. We will come back to them in Chapter 4 as part of the language READYLOG.
Further, Grosskreutz (2002) proposes a control architecture where the high-level GOLOGcon- troller settles commands via a special fluent register by performing a special send action. By this, the low-level task is invoked and runs asynchronously to the high-level controller. When the low-level task is accomplished, it signals this by means of a reply message. For example, when the robot should navigate to a certain position, a startGo action is initiated. The high-level controller can go on with other tasks, while the low-level system of the robot will control the navigation task. When the robot reaches its destination it signals the completion of the navigation task. This is modeled as an exogenous action.
The successor state axiom for the action register is Poss(a, s) ⊃ [reg(id, do(a, s)) = val ≡
a = send(id, val) ∨ a = reply(id, val) ∨
reg(id, s) = val ∧ ¬∃v.(a = send(id, v) ∨ a = reply(id, v))]
This allows the high-level controller more flexibility. As a natural further step this architecture de- mands that complex tasks have so-called low-level models. The high-level controller just invokes low-level tasks which are conducted by the robot control system. Nevertheless, the high-level con- troller must have an idea what the low-level system does. For projection tasks, where no action is executed the high-level controller needs a model of the low-level tasks in order to predict the results appropriately. A projection over a low-level module is defined as
P roj(s, σ, llmodel, s′) def
= Do(s, withP ol(llmodel, σ, s′)),
wherewithP ol(llmodel, σ) is an abbreviation for ((llmodel; false?) || σ). σ is a high-level program,
andllmodelis a program which models the effects ofσ on the low-level system. The program and
the low-level task are executed concurrently. ThewithP ol statement guarantees that both, σ and llmodel, become final.
Two special actionssetOnline and clipOnline were added. They turn theCCGOLOGinter- preter into an on-line mode, or into an off-line mode respectively. This is realized by the fluent online. Its successor state axiom is
P oss(a, s) ⊃ (online(do(a, s) ≡ a = setOnline ∨ (online(s) ∧ ¬a = clipOnline)). During off-line projections actions likewaitF or or continuous fluents are projected according to their least point in time. In the on-line mode, thewaitF or becomes an ordinary test action, and continuous fluents are evaluated according to the time that passed by during execution.
One needs a special treatment for updating continuous fluents. A special update action ccU pdate has been introduced for this purpose. The value of a continuous fluent is set to the latest estimate of a low-level process in projections and to the result of the real execution in the on-line case.ccU pdate is realized as an exogenous action which returns the result of the contin- uous fluent. The actionccU pdate is possible when it occurs after the earliest point in time of the current situation:P oss(ccU pdate(~x, t), s) ≡ t ≥ start(s). With ccUpdate the successor state
3.3. REASONING ABOUT ACTION AND CHANGE 55
axiom of the fluentstart has to be modified: P oss(a, s) ⊃ (start(do(a, s)) = t ≡
∃τ.a = waitF or(τ) ∧ ¬online(s) ∧ ltp(τ, s, t) ∨ ∃~xu.a = ccU pdate(~xu, t) ∧ online(s) ∨
(∀τ.a 6= waitF or(τ) ∨ online(s)) ∧ (∀~x.a 6= ccUpdate(~x) ∨ ¬online(s)) ∧ t = start(s)).
To summarize,CCGOLOGintroduces continuous fluents, together with a special fluent update action, a notion of on-line and off-line modes of the interpreter, low-level models of complex tasks, and a system architecture where, from the high-level control point of view, processes can be started in the background.
Reasoning with uncertainty
PGOLOGallows for probabilistic projections over programs. In order to achieve this Grosskreutz (2002) replaces theT rans predicates with functions over probabilities. In particular, he introduces the statementprob(p, σ1, σ2) with the following semantics:
trans(prob(p, σ1, σ2), s, δ, s′) = pr ≡
δ = σ1∧ s′= do(tossHead, s) ∧ pr = p ∨
δ = σ2∧ s′= do(tossT ail, s) ∧ pr = (1 − p) ∨
¬((δ = σ1∧ s′= do(tossHead, s) ∨
δ = σ2∧ s′= do(tossT ail, s)) ∧ pr = 0.
This means that with probabilityp the program σ1is executed;σ2with probability1 − p. Note
thatT rans has been replaced by the function trans : prog × s × prog × s → [0, 1]. It holds that trans(σ, s, δ, s′) > 0 iff T rans(σ, s, δ, s′)
for all language constructs of CCGOLOGnot mentioningprob. tossHead and tossT ail are dummy actions which are needed to distinguish between the different branches induced by the prob statement. In order to reason withPGOLOGone has to define the transitive closure of trans w.r.t.s:
trans∗(σ, s, δ, s′) = p ≡ ∀t[. . . ⊃ t(σ, s, δ, s′) = p)∨
p = 0 ∧ ¬∃p′.∀t(. . . ⊃ t(σ, s, δ, s′) = p′)
where the ellipsis stands for the universal closure of the conjunction of the following formulas: t(σ, s, σ, s) = 1
(t(σ, s, σ∗, s∗) = p
2∧ trans(σ∗, s∗, δ, s′) = p1∧ p1> 0 ∧ p2> 0)
⊃ t(σ, s, δ, s′) = p1· p2
The formula states that trans∗is equal to the product of the transition probabilitiesp along its path
and that these weights are unique for each path. Grosskreutz (2002) proved that for every modelM of the domain axiomatization:M |= trans∗(σ, s, δ, s′) > 0 iff there exist σ
1, s1, . . . , σn, snsuch
thatσ1= σ, s1= s, σn= δ, sn= s′andM |= trans(σi, si, σi+1, si+1) > 0 for i = 1, . . . , n−1.
To be able to probabilistically projectPGOLOGprograms one has to define the probability that the execution ofσ in s results in an execution trace s′:
doP r(σ, s, s′) = p ≡
∃δ.trans(σ, s, δ, s′) > 0 ∧ F inal(δ, s′) ∧ p = trans(σ, s, δ, s′) ∨
¬(∃δ.trans(σ, s, δ, s′) > 0 ∧ F inal(δ, s′)) ∧ p = 0.
We will not define the whole semantics of the statement ofPGOLOGhere, instead referring to (Grosskreutz 2002). The definitions will be given also in Chapter 4 in the definition of the language READYLOG.
To describe the belief of the agent about the world about a formulaϕ in a situation s the Bel(ϕ, s) = p is introduced as proposed by (Bacchus et al. 1995). Bel is is an abbreviation for the second-order formula
P
{s′|ϕ[s′]}p(s′, s)
P
s′p(s′, s)
= p.
The projected belief that a sentenceϕ will hold after a program σ and the low-level model llmodel
ofσ in situation s is defined by P Bel(ϕ, s, σ, llmodel) = pdef=
P
{s′,s∗|ϕ[s∗]}p(s′, s) · doP r(withP ol(llmodel, σ), s, s∗)
P
s′p(s′, s)
= p.
The result ofP Bel(ϕ, s, σ, llmodel) represents the weight of all paths that reach a final configura-
tionhδ∗, s∗i where ϕ[s∗] holds normalized by all possible path from s to s′.
Summarizing,PGOLOGintroduces a notion of uncertainty with theprob statement. With the assignment of probabilities to programs, probabilistic projections can be defined which yield the probability that a logical formulaϕ holds in some future situation given by a program σ and a low-level modelllmodel. In Chapter 5.2.2 we will give an example how this can be used for the
decision making of a simulated soccer agent when planning a double pass.