PDF Does Attainment of Piaget's -puB DATE DESCRIPTORS Review,of the Li*rature i930-194 - Eric - February 19, We present formal operational semantics for the C programming language. Our starting point is the ANSI
Wait Loading...


PDF :1 PDF :2 PDF :3 PDF :4 PDF :5


Like and share and download

February 19, We present formal operational semantics for the C programming language. Our starting point is the ANSI

puB DATE DESCRIPTORS Review,of the Li*rature i930-194 - Eric

February 19, We present formal operational semantics for the C programming language. Our starting point is the ANSI May 5, 1998 This Thesis is brought to you for free and open access by Rowan Digital Works It has been Formal operational thought is important to the success of every the need to restore a homeostatic balance is present and

Related PDF

A study of the formal operational thought ability - Semantic Scholar

May 5, 1998 This Thesis is brought to you for free and open access by Rowan Digital Works It has been Formal operational thought is important to the success of every the need to restore a homeostatic balance is present and the completely through "external trial and error (Pulaski, 1971b) " This stage 19 
PDF

UPDATED June 4, 2019 Questions are current as of the dates

3 days ago Where can I find the most recent amendments to the Cuban Assets Effective June 5, 2019, a regulatory amendment to the CACR secondary school students' participation in a formal course of study Can I purchase a ticket to Cuba directly from an airline based or operating out of the Page 19 
PDF

Behavioral and Organizational Considerations in the - DticMil

Jun 1, 1981 June 1981 JUL 9 1987 SCHOOL OF We will elaborate upon this model, and other models, of the current state of the decisionmaker, combine to determine decision crete operational mode of thought or in a formal operational mode (19) Outcome Irrelevant Learning System [96, 97] Use of an
PDF

The Semantics of the C Programming Language 0 Introduction

February 19, 1993 This paper first appeared in GH2], and incorporates the corrections indicated in GH3] 0 Introduction We present formal operational 
PDF

puB DATE DESCRIPTORS Review,of the Li*rature i930-194 - Eric

I udyerI thbdoffl I 1 t ,, c S I I n SI o I j I z , , 1 ho s Otecl th ht I d 1 In this connect ion, the authors of the present document hope 19 AND DEVELOPMENT HC uht vain Perk Testis Pubic hair ,' 1 Arks s, N nr, ance of formal operational thought as premise of the uniquely ado (August et al , 1972)
PDF

What factors contributed to the success of Apple s iphone?

What Factors Contributed to the Success of Apple's - IEEE Xplore

Once collaborative initiatives have formed, what factors make them successful? Interviewees in the case studies investigated identified the informal structure of  the iPhone been so successful? The objective of this paper is to provide evidence showing the factors that have contributed to success and the lessons that can 

  1. factors contributing to the success of collaborative efforts
  2. What Factors Contributed to the Success of Apple's
  3. FACTORS CONTRIBUTING TO THE SUCCESS OF LOCAL SMEs
  4. Factors Contributing to the Success of Undergraduate Business
  5. Factors Contributing to Success or Failure in College
  6. Factors contributing to the success of a single-shot
  7. Factors contributing to the success of commercial printers
  8. Survey on Factors Contributing to Student Success
  9. Factors Contributing to the Success Of African American
  10. Contributing to Success in an Introductory Computer

(MODELO DA ESTRUTURA DO TRABALHO)

1 Estrutura do Trabalho e Forma de Numeração das Folhas - FDCI

Dissertações, Teses e Trabalhos de Conclusão de Curso de Graduação, Especialização e outros MODELO DE FOLHA DE AGRADECIMENTOS 3cm 15 Abr 2018 Modelo de trabalho acadêmico (TCC, monografia de graduação e de As partes do trabalho devem estar de acordo com

  1. Modelo de TCC
  2. ESTRUTURA DO TRABALHO ACADÊMICO Dissertações
  3. Modelo de trabalho acadêmico
  4. Modelo de Artigo Cientifico.pdf
  5. Modelo monografia ABNT
  6. como elaborar um trabalho escrito
  7. Manual de Normalização e Estrutura de Trabalhos
  8. 1 Estrutura do Trabalho e Forma de Numeração das Folhas
  9. ordenação da estrutura do trabalho acadêmico
  10. MODELO DE ESTRUTURA DE RELATÓRIO 1

Katalog Przedmiotów Collegium Civitas

jak skutecznie studiować? - Marek Cieciura

Katalog Przedmiotów Przedmioty kończą się egzaminem lub zaliczeniem na stopień Studiów Politycznych Polskiej Akademii Nauk i Collegium Civitas swój los we własne ręce, stali się podmiotem, a nie bezwolnym przedmiotem cjami, które w literaturze przedmiotu nie doczekały

  1. Katalog Przedmiotów
  2. Collegium Civitas
  3. katalog
  4. pakiet ects katalog przedmiotów
  5. Katalog wyjazdów 2019
  6. Katalog REBISU 2018
  7. katalogu
  8. czyniło zeń przywilej i przedmiot aspiracji dla obywateli
  9. chociaż przedmiot protestów
  10. to jednak katalog spraw wymagających

8 Kwi 2006 Politechnika Łódzka wykonać wszystkie pomiary, o których mowa w paragrafie 4 2 instrukcji impulsów sterujących, w skrócie – współczynnikiem wypełnienia Zapisując ostatni wniosek w formie matematycznej f2C, Katedra Mikroelektroniki i Technik

  1. Samorząd Studencki Politechniki Łódzkiej
  2. instrukcja prowadzenia zapisów w książkach
  3. Instrukcja Obsługi programu KSP
  4. INSTRUKCJA Kontroli
  5. PDF Wzór wypełnienia papierowego formularza przelewu
  6. o których mowa w paragrafie 4.2 instrukcji
  7. współczynnikiem wypełnienia
  8. Zapisując ostatni wniosek w formie matematycznej
  9. Katedra Mikroelektroniki i Technik Informatycznych Politechniki Łódzkiej
  10. Zgodnie z instrukcją

Standardy kształcenia dla kierunku studiów: Prawo kanoniczne

Standardy kształcenia dla kierunku studiów: Finanse i

29 Paź 2009 Określa się standardy kształcenia dla następujących kierunków studiów 1) administracja; 2) aktorstwo; 3) analityka medyczna; 4) archeologia  9 Lut 2018 rządzenia Ministra Nauki i Szkolnictwa Wyższego z dnia 9 maja 2012 r w sprawie standardów kształcenia dla

  1. Standardy kształcenia dla kierunku studiów
  2. Standardy kształcenia
  3. w sprawie standardów kształcenia dla kierunków studiów
  4. dla tych kierunków
  5. zgodne ze standardami kształcenia określonymi
  6. Określa się standardy kształcenia dla nastę
  7. pujących kierunków studiów

MEU CORPO, MEU PARTO : CARTOGRAFIAS DO CORPO FEMININO NO YOUTUBE

aiara nascimento amaral bomfim percepção de mulheres - RI UFBA

“Eu não sou feminista e não tem nada de feminista no meu parto” 268 Dessa maneira, além de uma etnografia é também uma cartografia, a exposição de  29 Dez 2015 A Márcio, meu amor, pelo apoio incondicional em todos os momentos,

  1. CENAS DE PARTO E POLÍTICAS DO CORPO
  2. RECONFIGURANDO UM MODO DE VER O PARTO
  3. A HUMANIZAÇÃO NO PARTO E NO NASCIMENTO
  4. SEXUALIDADE E PARTO
  5. Humanização do parto e do nascimento
  6. conhecimentos de gestantes quanto aos benefícios do parto normal
  7. o parto ativo à luz da atuação de
  8. Elementos para uma cartografia
  9. o corpo colonial e as políticas e poéticas da diáspora para
  10. O CUIDADO PROMOVIDO À MULHER NO TRABALHO DE PARTO

29 Abr 2019 EDITAL Nº 2 2019 GIAN ROBERTO CAGNI BRAGGIO Leiloeiro Público Oficial EDITAL DE LEILÃO Nº 2 2019 ESTRUTURA DO EDITAL 13 Nov 2018 EDITAL DO LEILÃO NO 02 2018 ANEEL PROCESSO NO 48500 002605 2018 68

  1. Edital do leilão
  2. edital do leilão nº 04
  3. edital do leilão nº 02
  4. EDITAL DE LEILÃO Nº0019
  5. EDITAL DE 1º E 2º PÚBLICOS LEILÕES
  6. edital de chamada pública para compra de energia elétrica leilão
  7. EDITAL DE LEILÃO PÚBLICO Nº
  8. Edital de Leilão n
  9. leilão nº 01
  10. LEILÃO EDITAL Nº

3 Jun 2012 DESEMPENHO NUM SISTEMA DE PRODUÇÃO DE PEÇAS EM PLÁSTICO ROGÉRIO SANTOS DE MENEZES Junho de 2012 UMinho |  496279 HARLEN SANTOS DE MENESES 484116 SYDNEY RIBEIRO GONÇALVES MENEZES 503956 ROGÉRIO LUIZ GOMES DOS SANTOS

  1. rogério santos de menezes aplicação de ferramentas do sistema
  2. Rogério
  3. Rogério Hidalgo Barbosa
  4. Menezes CWG
  5. Santos JB
  6. 496279 HARLEN SANTOS DE MENESES
  7. 484116 SYDNEY RIBEIRO GONÇALVES MENEZES
  8. 503956 ROGÉRIO LUIZ GOMES DOS SANTOS ALVES
  9. ROGERIO SANTOS SOUSA
  10. PEDRO PAULO SCHETTINI NEPOMUCENO DOS SANTOS

22 Haz 1973 e) Kemal Zorlu Ali Çetinkaya Bulvarı No 17 İzmir T C ŞİRKETİN Şirketin maksat ve mevzuuna giren ithalat, ihracat, nakliye, inşaat,  e) Faaliyet konusuna yönelik olarak depolar kurabilir, mağazalar açabilir, 12 Şirket'in

  1. anonim şirket ana sözleşmesi
  2. 1 C FAKTORİNG ANONİM ŞİRKETİ ANA SÖZLEŞMESİ Bölüm 1
  3. Amaç ve Konu Şirketin kuruluş amacı gıda ve
  4. BELL HOLDİNG ANONİM ŞİRKETİ KURULUŞ
  5. TRANSTÜRK HOLDİNG ANONİM ŞİRKETİ
  6. olup şirket mukavelesinde yazılı işletme mevzuunun çevresi içinde kalmak
  7. olduğunu belirten hükümler TTK'nın yürürlüğe girdiği tarihten itibaren
  8. E
  9. sas mukavelede şirket mevzuunun hudutlarının açıkça gösterilmiş olması şarttır”
  10. şirketi “temsile salahiyetli olanlar şirketin maksat ve mevzuuna dahil olan her
Home back850851852 853854855 Next

of the C Programming Language Yuri Gurevich and James K.

Huggins EECS Department,

University of Michigan...

Description

The Semantics of the C Programming Language Yuri Gurevichand James K.

Huggins EECS Department,

University of Michigan,

Ann Arbor,

MI 48109-2122,

USA February 19,

and incorporates the corrections indicated in [GH3].

Our starting point is the ANSI standard for C as described in [KR].

Knowledge of C is not necessary (though it may be helpful) for comprehension,

since we explain all relevant aspects of C as we proceed.

Our operational semantics is based on evolving algebras.

An exposition on evolving algebras can be found in the tutorial [Gu].

In order to make this paper self-contained,

we recall the notion of a (sequential) evolving algebra in Sect.

Our primary concern here is with semantics,

Consequently,

we assume that all syntactic information regarding a given program is available to us at the beginning of the computation (via static functions).

We intended to cover all constructs of the C programming language,

but not the C standard library functions (e.g.

It is not dicult to extend our description of C to include any desired library function or functions.

Evolving algebra semantic speci cations may be provided on several abstraction levels for the same language.

Having several such algebras is useful,

for one can examine the semantics of a particular feature of a programming language at the desired level of abstraction,

with unnecessary details omitted.

It also makes comprehension easier.

We present a series of four evolving algebras,

each a re nement of the previous one.

The nal algebra describes the C programming language in full detail.

Our four algebras focus on the following topics respectively: 1.

Statements (e.g.

Expressions 3.

Memory allocation and initialization 4.

Function invocation and return What about possible errors,

division by zero or de-referencing a pointer to an invalid address

? These issues are very implementation-dependent.

Even what constitutes an error is implementation-dependent.

If an external function does not produce any value in a state where a value is expected,

the evolving algebra will be stalled in that state forever.

It is natural to suppose that if an external function does produce a value,

it is of the appropriate type.

One may want to augment the guards of transition rules to check for errors

the evolving Nalgebra will halt on error conditions (and may even output an error message if desired).

There are more subtle ways to handle errors.

We ignore the issue here.

To re ect the possibility of di erent implementations,

our evolving algebras contain implementationdependent parameters.

For example,

the set of values \storable" in a pointer variable is implementationdependent.

Thus,

each of our four evolving algebras gives rise to a family of di erent evolving algebras.

ONR and NSF.

An evolving algebra A is an abstract machine.

Here we restrict attention to sequential evolving algebras.

The signature of A is a ( nite) collection of function names,

A state of A is a set,

together with interpretations of the function names in the signature.

These interpretations are called basic functions of the state.

The superuniverse does not change as A evolves

Formally,

a basic function of arity r (i.e.

the interpretation of a function name of arity r) is an r-ary operation on the superuniverse.

(We often use basic functions with r = 0

such basic functions will be called distinguished elements .) But functions naturally arising in applications may be de ned only on a part of the superuniverse.

Such partial functions are represented by total functions in the following manner.

The superuniverse contains distinct elements true,

undef which allow us to deal with relations (viewed as binary functions with values true or false ) and partial functions (where f (a) = undef means f is unde ned at the tuple a).

These three elements are logical constants .

Their names do not appear in the signature

this is similar to the situation in rst-order logic with equality where equality is a logical constant and the sign of equality does not appear in the signature.

In fact,

we use equality as a logical constant as well.

Further,

a universe U is a special type of basic function: a unary relation usually identi ed with the set fx : U (x)g.

The universe Bool = ftrue

falseg is another logical constant.

When we speak about,

a function f from a universe U to a universe V ,

we mean that formally f is a unary operation on the superuniverse such that f (a) 2 V for all a 2 U and f (a) = undef otherwise.

We use self-explanatory notations like f : U

The last means that the distinguished element f belongs to V .

In principle,

a program of A is a nite collection of transition rules of the form if t0 then f (t1

t ) := t +1 endif (1) where t0 ,

and t +1 are closed terms (i.e.

terms containing no free variables) in the signature of A.

An example of such a term is g(h1

h2) where g is binary and h1 and h2 are zero-ary.

The meaning of the rule shown above is this: Evaluate all the terms t in the given state

if t0 evaluates to true then change the value of the basic function f at the value of the tuple (t1

In fact,

rules are de ned in a slightly more liberal way

C +1 are sets of rules then both of the following are rules: r

if b0 then C0 elseif b1 then C1

if b0 then C0 elseif b1 then C1

elseif b then C else C +1 endif

Since the C are sets of rules,

nested transition rules are allowed (and occur frequently).

To save space,

we abbreviate the series of endif's at the tail of a transition rule by ENDIF.

A program is a set of rules.

It is easy to transform a program to an equivalent program comprising only rules of the stricter form (1).

We use rules of the more liberal form,

as well as macros (textual abbreviations),

How does A evolve from one state to another

the demon (or interpreter) evaluates all the relevant terms and then makes all the necessary updates.

If several updates contradict each other (trying to assign di erent values to the same basic function at the same place),

then the demon chooses nondeterministically one of those updates to execute.

We call a function (name) f dynamic if the demon (interpreter) may change f as the algebra evolves

if an assignment of the form f (t1

t ) := t0 appears anywhere in the transition rules.

Functions which i

are not dynamic are called static .

To allow our algebras to interact conveniently with the outside world,

we also make use of external functions within our algebra.

External functions are syntactically static (that is,

but have their values determined by an oracle.

Thus,

an external function may have di erent values for the same arguments as the algebra evolves.

An earlier version of this paper appeared as a technical report [GH1].

We gratefully acknowledge comments made by on the original report by Egon Borger,

Andre Burago,

Martin J.

Durst,

Stefano Guerrini,

Raghu Mani,

Arnd Poetzsch-He ter,

Dean Rosenzweig,

as well as comments in the errata made by Lars Ole Andersen,

Douglas Baker,

Arnd Poetzsch-He ter,

Thomas Tsukada,

A universe tasks consists of elements representing tasks to be accomplished by the program interpreter.

The notion of task is a general one: e.g.,

a task may be the execution of a statement,

or the evaluation of an expression.

The elements of this universe are dependent on the particular C program being executed by the abstract machine.

It is often useful to mark a given task with tags indicating its nature.

This gives rise to a universe of tags .

A distinguished element CurTask: tasks indicates the current task.

In order to execute tasks in the proper order,

a static function NextTask: tasks

! tasks indicates the next task to be performed once the current task has been completed.

A static function TaskType: tasks

! tags indicates the action to be performed by the task.

A universe results contains values which may appear as the result of a computation.

Often,

we transfer control to a particular task,

modifying CurTask to indicate the transfer of control.

In Algebra Two,

the rules for modifying CurTask will change somewhat

in order to facilitate this change,

we will use the Moveto(Task) macro each time that we wish to transfer control.

For now,

the de nition of Moveto(Task) is shown in Fig.

Moveto(Task) CurTask := Task

Figure 1: De nition of the Moveto(Task) macro.

According to [KR],

there are six categories of statements in C: 1.

Expression statements,

which evaluate the associated expression.

Selection statements (if and switch).

Iteration statements (for,

Jump statements (goto,

Labeled statements (case and default statements used within the scope of a switch statement,

and targets of goto statements).

Compound statements,

consisting of a (possibly empty) list of local variable declarations and a (possibly empty) list of statements.

An expression statement has one of the following forms: expression-statement

To execute an expression statement,

evaluate the attached expression (if any),

even though the resulting value will not be used.

While this may seem unnecessary,

note that the evaluation of an expression in C may generate side-e ects (such as assigning a value to a variable).

Note also that the evaluation of an expression may not halt.

In this algebra,

the evaluation of expressions is handled by an external function TestValue: tasks

Since expression statements perform no additional work,

the algebra simply proceeds to the next task.

The transition rule for expression tasks is shown in Fig.

if TaskType(CurTask) = expression then Moveto(NextTask(CurTask)) endif Figure 2: Transition rule for expression tasks.

Statements

There are two types of selection statements in C: if statements and switch statements.

An if statement has one of the following forms: if-statement

expression ) statement1 expression ) statement1 else statement2

where statement1 and statement2 are statements.

To execute an if statement,

begin by evaluating the guard expression.

If the resulting value is nonzero,

If the resulting value is zero and an else clause is present,

execute the statement following the if statement.

Static partial functions TrueTask: tasks

! tasks indicate the task to be performed if the guard of the if statement evaluates to a non-zero value or zero,

The branching decision made in the if statement is represented by an element of the tasks universe for which the TaskType function returns branch .

We illustrate a typical if statement with the graph in Fig.

labeled arcs represent the corresponding unary functions,

and boxes represent subgraphs.

If an else clause is not present in an if statement,

the corresponding task graph omits the lower portion of Fig.

with the FalseTask function connecting the branch task to the task following the if statement.

The transition rule for branch tasks is shown in Fig.

NextTask expression

Ta rue

NextTas

FalseTask

Figure 3: A typical if statement.

if TaskType(CurTask) = branch then if TestValue(CurTask) 6= 0 then Moveto(TrueTask(CurTask)) elseif TestValue(CurTask) = 0 then Moveto(FalseTask(CurTask)) ENDIF Figure 4: Transition rule for branch tasks.

Remark.

but it is not representative of all if statements.

The presence of a jump statement in statement1 or statement2 may cause NextTask to point to a di erent task than the one which immediately follows the if statement.

Statements

A switch statement has the following form: switch-statement

Within the body of a switch statement there are (usually) labeled case and default statements.

Each case or default is associated with the smallest enclosing switch statement.

To execute a switch statement,

evaluate the guard expression,

and within the body of the switch,

transfer control to the case statement for the switch whose labeled value matches the value of the expression,

or to the default statement for the switch,

If no such statement is found,

transfer control to the statement following the switch statement.

To execute a while statement,

keep evaluating the guard expression until the value of the expression becomes zero.

Each time that the value of the guard expression is not zero,

We illustrate a typical while statement with the graph in Fig.

with regard to the possible e ects of embedded jump statements,

Since the only types of tasks used to represent while statements are the expression and branch tasks,

our previously-presented transition rules are sucient to model the behavior of while statements.

Note that it is possible to enter a while loop by means of a goto statement,

thus circumventing the initial test of the expression at the beginning of the loop.

The ANSI standard [KR] does not give speci c'semantics for such behavior.

In such a situation,

our abstract machine would continue as if the loop had been entered normally (i.e.,

after completion of the statement body,

control returns to the guard expression to be evaluated).

We nbelieve this is a reasonable interpretation of such an event.

A while statement has the following form:

Statements

Figure 6: Transition rules for switch tasks.

if TaskType(CurTask) = switch then Moveto(SwitchTask(CurTask,TestValue(CurTask))) endif

SwitchTask

Figure 5: A typical switch statement.

NextTask

Labels on case statements are required to be unique within a switch,

and a switch may not have more than one default statement.

Thus,

there is exactly one statement to which control should be passed.

A static partial function SwitchTask: tasks  results

! tasks indicates the next task to be executed for a given expression value.

We illustrate a typical switch statement with the graph in Fig.

with regard to the possible e ects of embedded jump statements,

The rule for switch tasks is shown in Fig.

NextTask

NextTask expression

TrueTask NextTask

Figure 7: A typical while statement.

A do-while statement has the following form:

! do body while where body is a statement.

do-while statements are identical to while statements except that the guard expression and statement body are visited in the opposite order.

We illustrate a typical do-while with the graph shown in Fig.

with regard to the possible e ects of embedded jump statements,

(Note the similarity between this graph and that of the while loop.) As with while loops,

no new transition rules are required to model the behavior of do-while statements.

FalseTask

NextTask expression

TrueTask NextTask

Figure 8: A typical do-while statement.

Statements

The most complete form of the for statement is:

update ) body where initializer ,

We begin by describing the behavior and representation of a for statement when all expressions are present.

In executing a for statement,

begin by evaluating the initializer.

Evaluate the test next

execute the body and evaluate the update (in that order) and re-evaluate the test.

If the value of the test is zero,

transfer control to the statement following the for loop.

We illustrate a typical for statement with the graph in Fig.

with regard to the possible e ects of embedded jump statements,

Again,

no new transition rules are required to model the behavior of for statements.

FalseTask

NextTask

NextTask test init− ializer

NextTask update

TrueTask

NextTask

Figure 9: A typical for statement.

The graphs for for loops missing one or more of the three expressions (initializer,

and update) omit the corresponding tasks,

with NextTask pointing to the next task in the graph sequence.

If the test is omitted,

both the test and the branch task are omitted,

which creates an in nite loop (which may still be broken through the use of jump statements).

A jump statement has one of the following forms: jump-statement

Each of these jump statements is a command indicating that control should be unconditionally transferred to another task in the task graph:  goto statements indicate directly the task to which control passes.

 continue statements may only occur within the body of an iteration statement.

For a given continue statement C,

let S be the smallest iteration statement which includes C.

Executing C transfers control to the task within S following the statement body of S: e.g.,

control passes to the update expression,

control passes to the guard expression.

 break statements may occur within the body of an iteration or switch statement.

For a given break statement B,

let S be the smallest iteration or switch statement which includes B.

Executing B transfers control to the rst task following S.

 return statements occur within the body of function abstractions,

indicating that the current function execution should be terminated.

A more complete discussion of return statements will be presented in Algebra Four,

where function abstractions are presented.

For now,

we assert that executing a return statement should set CurTask to undef ,

which will bring a halt to the algebra,

since we only have one function (main) being executed.

The NextTask function contains the above (static) informationfor jump statement tasks.

Thus,

the transition rule for jump statements (shown in Fig.

if TaskType(CurTask) = jump then Moveto(NextTask(CurTask)) endif Figure 10: Transition rule for jump tasks.

! identi er : statement labeled-statement

! case constant-expression : statement labeled-statement

Statement labels identify the targets for control transfer in goto and switch statements.

NextTask and

SwitchTask return the appropriate tasks in each case

no further transition rules are needed.

! f declaration-list statement-list g

where the declaration and/or statement lists may be empty.) Since NextTask indicates the order in which tasks are processed,

we have no need for rules concerning compound statements.

Each statement or declaration in a compound statement is linked to its successor via NextTask .

(Declarations are not treated until Algebra Three

the same principle holds for declaration tasks.)

CurTask indicates the rst task of the rst statement of the program.

A nal state in our algebra is any state in which CurTask = undef .

In this state,

since TaskType(undef) = undef.

We replace each occurrence of a task of type expression from the rst algebra with numerous tasks re ecting the structure of the expression.

Also,

TestValue is now an internal,

In Algebra Two,

we treat the evaluation of expressions at a relatively high level of abstraction.

We map variable identi ers to memory locations through external functions.

We also treat function invocations as expressions whose values are provided by external functions.

In Algebras Three and Four we will eliminate these abstractions.

For example,

one may cast a pointer to a structure into a pointer to an array of characters.

Thus,

one can access the individual bytes of most values which might exist during the execution of the program.1 A static function Size: typename

! integer indicates how many bytes are used by a particular value type in memory.

A dynamic function Memory: addresses

! bytes indicates the values stored in memory at a given byte.

Since most values of interest are larger than a byte,

we need a means for storing members of results as individual bytes.

For example,

assume that the int value 258 is represented in the memory of a particular system by the four (eight-bit) bytes 0,

We need a way to go from a value in results (e.g.,

A static partial (n+1)-ary function ByteToResult: typename  byte

! results converts the memory representation of a value of the speci ed basic type into its corresponding value in the results universe.

Here n is the maximum number of bytes used by the memory representation of any particular basic type (and is implementation-dependent).

For types whose memory representations are less than n bytes in length,

we ignore any unused parameters.

In our example above,

ByteToResult(int,0,0,1,2) = 258 .

A static partial function ResultToByte: results  integer  typename

! byte yields the speci ed byte of the memory representation of the speci ed value from the speci ed universe.

This function can be thought of as the inverse of ByteToResult .

In our example above,

ResultToByte(258,3,int) = 2 .

(We assume tacitly that the arguments of ResultToByte uniquely de ne the value of the function,

which is the case in all the implementations that we know.) We de ne an abbreviation MemoryValue: address  typename

which indicates the value of the speci ed type being stored in memory beginning at the indicated address.

MemoryValue (addr,type) abbreviates ByteToResult (type,

Memory(addr),

Memory(addr+1),

Memory(addr + Size(type)

- 1)) .

the universe of computational results,

are of particular interest in Algebra Two.

A universe bytes contains those values which may be \stored" in a char variable.

(This universe is usually identical to f0,1,..

but we prefer the more general de nition.) A universe addresses contains positive integers corresponding to valid memory locations.

This is also the universe of values which may be stored in a pointer-type variable.

(Of course,

these two universes are implementation-dependent.) A universe typename contains elements representing the di erent types of storable values.

A static partial function ValueType: tasks

! typename indicates the type of the resulting value when an expression has been evaluated.

Static partial functions LeftTask,

RightTask: tasks

! tasks indicate the left and right operands of binary operators whose order of evaluation is not de ned within C (e.g.,

A static partial function Parent: tasks

! tasks indicates the parent (i.e.,

closest enclosing) expression for a given expression.

For expressions which are not contained in any other expressions,

Parent returns the corresponding branch task which uses the expression (if one exists) or undef (if none exists).

A static partial function WhichChild: tasks

are members of the tags universe) indicates the relationship between a task and its parent.

Dynamic partial functions LeftValue,

RightValue: tasks

! results indicate the results of evaluating the left and right operands of binary operators with ambiguous evaluation order.

Similarly,

a dynamic partial function OnlyValue: tasks

! results indicates the result of evaluating the single operand of a unary operator.

A static partial function ConstVal: tasks

! results indicates the values of program constants.

The distinguished value void is an example of a value which cannot be accessed in this manner.

Our rules for assignment to memory are a little complicated,

since a given assignment may require an arbitrarily large number of updates to the Memory function.

We need rules which perform a loop to make those arbitrarily large number of updates in a systematic fashion.2 To facilitate this loop,

we use several distinguished elements.

CopyValue: results denotes the value to be copied.

CopyType: typename denotes the type of value to be copied.

CopyLocation: address denotes the location to which the value is to be copied.

CopyByte: integer denotes which byte of the representation of CopyValue is being copied into memory.

OldTask: tasks denotes the task which invoked the memory copying procedure.

CopyTask: tasks is a static distinguished element used to indicate that the copying procedure should begin.

We will invoke the copying procedure using the DoAssign(address,

The copying process itself is relatively straightforward.

We utilize the distinguished element CopyByte to denote which byte of the memory representation of CopyValue we are copying into memory at a given moment in time.

We copy bytes singly,

incrementing the value of CopyByte after each assignment to memory,

halting when all bytes have been copied.

The transition rule for copying to memory is shown in Fig.

DoAssign(address,

type) CopyValue := value CopyType := type CopyLocation := address CopyByte := 0 OldTask := CurTask CurTask := CopyTask

Figure 11: De nition of the DoAssign macro.

if CurTask = CopyTask then if CopyByte < Size(CopyType) then

Memory(CopyLocation + CopyByte) := ResultToByte(CopyValue,

CopyByte,

CopyType) CopyByte := CopyByte + 1 elseif CopyByte = Size(CopyType) then CurTask := NextTask(OldTask)

Figure 12: Transition rule for copying to memory.

but the particular sizes available are implementation-dependent.

We thus present rules using the lowest-common denominator,