[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

781.0. "INFO: Uniqueness of Multi-word Attribute names" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Mon Mar 11 1991 15:28

The necessity of parsing command lines justifies a somewhat stronger SRM
statement of uniqueness of attribute names relative to child entity names.

To whit: multi-word attribute names must not rely on the second and
subsequent words of their name to disambiguate the attribute from a
child of the same entity.

For example, given

	GLOBAL ENTITY Branch Library

	  ATTRIBUTE Cart Name Cache Count
	  ATTRIBUTE Task Persistence Time
	  CHILD ENTITY Cartridge
	  CHILD ENTITY Task

the attributes can't be addressed via FCL, because "Task Persistence" could be
an attribute name or a reference to the child Task with a name of "Persistence".
If the parser always looked for an attribute name first, then it could handle
a reference to the attribute but a Task entity with a name of "Persistence" 
could never be referenced.

With the V1.1 MCS kit, references to the attributes bring a warning, with
an unexpected attribute name.

MCC> show branch aim Task Persistence Time
%MCC-W-ATTRUNKNOWN, unknown attribute TASK

I would have expected it to try and find an attribute Time on a child Task
called Persistence, and say unknown attribute TIME.

With the iconic interface there aren't any syntactic ambiguities, so this
isn't an issue. But you might consider having the next rev of the SRM
mention this little gotcha in the section that deals with the uniqueness
of names.
T.RTitleUserPersonal
Name
DateLines
781.1TOOK::CALLANDERWed Mar 13 1991 13:2224
Actually you are right on target...but the reason you didn't see what
you expected was because the parser tried multiple things before giving
you the error message.

MCC> show branch aim Task Persistence Time

We recognized the Verb no problem;
    then we were able to pick up branch aim;
         we then pick up task and find an entity match and attempt 
         to match on the instance (I don't know what data type task has
         but it looks like persistence didn't match)
             if the entity didn't match it would then try to
             match "task" to an attribute of branch, and that is the
             error you saw.

If "persistence" had been a legal instance value on task I would have 
expected an error on "time".  Now I could be off some where because I
made a number of assumptions here that might be invalid (like task even
takes an instance); but I think you get the general idea.

Please note though there is still a qar on the FCL for it's lack of 
informative error messages.

jill
781.2instance wouldn't matchCOOKIE::KITTELLRichard - Architected Info MgmtWed Mar 13 1991 17:565
Jill, your assumption was correct, the identifier on Task is numeric, so
Persistence wouldn't match. I guess the presence of the Task entity
causes the parser to focus on Task, instead of trying to match Task Persistence
Time with the attributes.
781.3Still a bit confused...DFLAT::PLOUFFEJerryWed Mar 13 1991 19:2428
RE: .1

> if the entity didn't match it would then try to
> match "task" to an attribute of branch, and that is the
> error you saw.

Jill, I still don't understand something.

The parser seemed to do all the right things up to the moment after it tried
to "match "task" to an attribute of branch".

Why didn't it try to continue and see is "task persistence" was a valid 
attribute of branch?

Assuming that this would fail, why didn't it continue to see if "task 
persistence time" was a valid attribute of branch?

In other words, why did the parser fail to realize that "task", "persistence"
and "time" were separate keywords of a valid attribute of the branch class?
It seemingly was trying to parse for an attribute and the parser already 
parses multi-keyword attributes.

I'm just curious...

                                                                    - Jerry

P.S. I have a hunch that it really tried to parse for an attribute starting 
     with the word "persistence".  Is this possibly what happened?
781.4more detail on parsingTOOK::HAOThu Mar 14 1991 12:3023
    Hi Richard,
    
    I don't know why your command is failing.  From what I understand of
    the parser, it should be doing something close to what Jill described.
    
    When the parser gets to the keyword "Task", it tried to match on it as
    a child entity of "Branch".  When that failed due to the instance
    datatype mismatch, the parser tries to match "Task" as the first
    keyword of an attribute.  IF that succeeded, the parser checks if
    "Task" has another keyword.  The parser keeps trying to parse the
    longest (set of keywords) attribute it can find, as indicated by the
    parse tables.  If the longest attribute isn't valid for the entity, the
    parser will backtrack -- lop off the keywords to try and find if a
    shorter attribute is valid.
    
    However, judging from your error msg-- "unknown attr" -- it sounds as
    if the keyword "Task" was NOT found in the parse tables at all.  This
    is different from finding "Task" in the parse tables but not knowing
    that it was valid for your entity.  You may want to doublecheck that
    your parse tables are properly updated.
    
    Christine
    
781.5INFO: check of parse tablesCOOKIE::KITTELLRichard - Architected Info MgmtThu Mar 14 1991 13:5613
Hi Christine.

>    However, judging from your error msg-- "unknown attr" -- it sounds as
>    if the keyword "Task" was NOT found in the parse tables at all.  This
>    is different from finding "Task" in the parse tables but not knowing
>    that it was valid for your entity.  You may want to doublecheck that
>    your parse tables are properly updated.
 
From the MCC_PTB_PARSER.DAT file:

Command:  SHOW BRANCHLIBRARY TASK PERSISTENCE TIME

781.6last suggestionTOOK::HAOFri Mar 15 1991 12:1012
    Hi Richard,
    
    Did you try specifying "show branch library aim task persistence time"
    instead of leaving the 2nd keyword of the GE out?  Do you get the same
    error or a different one?
    
    At this point, I'm out of suggestions.  My knowledge of FCL and parsing
    grows fuzzier every day!!  Anyways, Jill or Pete Ditmars can help you
    from here.
    
    Christine
    
781.7single-word global entity nameCOOKIE::KITTELLRichard - Architected Info MgmtFri Mar 15 1991 13:3413
RE: .6

>    Did you try specifying "show branch library aim task persistence time"
>    instead of leaving the 2nd keyword of the GE out?  Do you get the same
>    error or a different one?

Sorry, I entered the global name incorrectly in the basenote. We had to
change the name from Branch Library to BranchLibrary for now because the
iconic PM doesn't find the icon file for multi-world global entities. So
it is a one-keyword entity name, and "Branch" is just an abbreviation of it.

Thanks for the suggestions, Christine.