• Aucun résultat trouvé

Mesa Group

N/A
N/A
Protected

Academic year: 2022

Partager "Mesa Group "

Copied!
3
0
0

Texte intégral

(1)

Inter-Office Memorandum

To

Mesa Group

Date

October 25, 1977

From

Barbara Koalkin

Location

Palo Alto

Subject

Debugger Interpreter

Organization

SOD/SO

XEROX

Filed on: [MAXC]<KOALKIN)Dlnterpreter.BRAVO

DRAFT

This memo represents a preliminary attempt at specifying what the proposed debugger interpreter will look like. A full interpreter at this point seems unreasonable and probably of marginal value. However, a minimal subset of the language would be a valuable extension to the current· debugger command language.

We have specified the following subset of the Mesa TYPE calculus as being acceptable to this interpreter:

--dot notation: a.b.c --assignment: +- --dereference:

t

--indexing: [ ]

--addressing: "@expression"

--LOOPHOLE

With the help of some of the compiler's modules we will be able to enforce strong type- checking in the interpreter.

The proposed interpreter should help to alleviate many of the problems regarding displaying and assigning values to complicated data structures that now force the user to go down to octal level debugging.

In terms of the formal Mesa syntax the grammar for the proposed interpreter should include the following expressions:

XEROX SDD ARCHIVES

Expression ::=

AssignmentExpr

I

Disjunction

I have read and understood

AddingOp .. - +

I -

AssignmentExpr ::= LeftSide <- RightSide

Pages ______ --- To---

Conjunction .. - Negation I Conjunction AND Negation

Reviewer Date _ _ _ _

Conjunction

I

Disjunction OR Conjunction Disjunction

..

-

Factor

..

- - Primary

I

Primary

# of Pages _ _ Ref., -ttSt)f)-8S7

IndexedAccess

..

- ( Expression ) [ Expression]

I

Variable [ Expression ] IndirectAccess

.. -

( Expression ) t

I

Variable t

LeftSide

..

- identifier

I --

Call in Statement

IndexedAccess I QualifiedAccess I IndirectAccess I LOOPHOLE [ Expression ] I

LOOPHOLE [ Expression , TypeSpecification ]

Literal "- numericLiteral I -- all defined outside the grammar

(2)

Debugger Interpreter

MultiplyingOp Negation Not Primary Product

".

".

,,-

".

" -

stringLiteral

I

characterLiteral

• I / I

MOD

Relation

I

Not Relation

~

I

NOT

Variable

I

Literal

I (

Expression )

I

@ LeftSide Factor

I

Product MultiplyingOp Factor

QualifiedAccess ::= ( Expression ) • identifier

I

Variable • identifier Relation ". Sum

I

Sum RelationTaii

RelationalOp ". #

I

=

I < I <= I > I >=

RelationTail ". RelationalOp Sum

I

Not RelationalOp Sum

I

IN SubRange

I

Not IN Sub range

::= Expression

2

RightSide Subrange Sum Variable

". SubrangeTC

I

Typeldentifier •• SubrangeTC, Typeldentifier in TypeSpecification

". Product

I

Sum AddingOp Product

". LeftSide

There are some questions in my mind about including the following expressions (we should discuss these further):

Expression

IfExpr BuiltinCall

Component ComponentList Constructor ExpressionList FunctionCall

::= IfExpr

"- IF Expression THEN Expression ELSE Expression

,,- MIN [ ExpressionList ]

I

MAX [ ExpressionList ] lABS [ Expression ]

I

LENGTH [ Expression ]

I

BASE [ Expression ]

I

TypeOp

L

TypeSpecification ]

I

.. -

".

.. -

".

" .

DESCRIPTOR [ Expression ]

I

DESCRIPTOR [ Expression , Expression ]

I

DESCRIPTOR [ Expression , Expression , TypeSpecification ] empty

I

Expression

KeywordComponentList

I

PositionalComponentList OptionalTypeld [ ComponentList ]

Expression

I

ExpressionList , Expression BuiltinCall

I

Call

KeywordComponent KeywordComponentList

::= identifier: Component KeywordComponent

I

KeywordComponentList , KeywordComponent LeftSide ". Call

I

MEMORY [ Expression ]

I

REGISTER [ Expression ] PositionalComponentList ...

Component

I

PositionalComponentList , Component FunctionCall

I

Constructor

Primary

TypeOp "- SIZE

I

FIRST

I

LAST

The following expressions seem to be of marginal value to consider including:

Expression ::=

NewExpr

I

SelectExpr

NewExpr ,,-

SelectExpr .. - SelectExprSimple

SelectExprVariant

NEW Variable OptCatchPhrase SelectExprSimple

I

SelectExprVariant

.. - SELECT Leftltem FROM -- Leftitem in Statement ExprChoiceList

ENDCASE =

>

Expression

.. - WITH Openltem SELECT Tagltem FROM -. Openltem, Tagltem in ChoiceList ". AdjectiveList

=>

Expression,

I •.

AdjectiveList in Statement

ChoiceList AdjectiveList

=>

Expression,

(3)

Debugger Interpreter 3

ExprChoiceList .. - TestList

=>

Expression,

I --

TestList in Statement ExprChoiceList TestList

=>

Expression,

Remaining Questions:

--whether the interpreter should use the same scanning mechanism as the compiler; the current thought seems to be to keep it a separate mechanism and have it build its own trees with information relevant to interpreting the value of expressions

--what sort of user interface to have for the interpreter; whether the present set of Interpet commands should be replaced simply by one INTERPRET command or accept interpreted values as input for all commands

--what kind of procedure calls to allow, if any - for instance, how about interpret call of nested procedures and returning large parameter records

--whether we should allow user-defined temporary variables

--the above specified grammar is an expression evaluator - what about evaluating statements (and multiple statements)

--what context to evaluate in (current module, current configuration, defs.foo) --expandint to conditional breakpoints

Distribution:

Mesa Group

Ed Satterthwaite

John Weaver

Références

Documents relatifs

In Handbook of Regional and Urban Economics (Vol. On the origins of land use regulations: theory and evidence from US metro areas. The impact of supply constraints on house prices in

Current political developments in Nepal, India, Pakistan and China Ind the implications of these developments for resea rch carried out by European scholars.. The

In Model 2, I add the general attitudes that are derived from the identity approach (positive attitude towards the Netherlands, perceived cultural ethnic threat and negative

Definition 2.1 ([Gro93, 0.5.E]) Two countable groups Γ1 and Γ2 are Measure Equivalent (ME) if there exist commuting, measure preserving, free actions of Γ1 and Γ2 on some

We will state and prove a pronite analog of the main result of [2] (see also [1]) concerning the connection between associators on the one hand and solu- tions of the

We propose to hybridize two methods in order to take advantage of both of them for the multiGPU parallel execution: for tasks and sub-tasks generated at sever and client levels,

C'est donc pour contribuer à l'usage rationnel des plantes en médecine traditionnelle mais aussi et surtout pour répondre aux demandes des autorités judiciaires

[r]