You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to compile the AmpersandData/PrototypeContext/PrototypeContext.adl` code with the Ampersand-v5.0.0 compiler, expecting it to compile stand-alone. This code is used to generate prototypes, so I know apriori that it is correct. However, I got compiler errors:
/Users/sjo00577/git/Ampersand/AmpersandData/PrototypeContext/Navbar.adl:44:82 error:
A relation is used that is not defined: pf_ifcRoles ==============================
/Users/sjo00577/git/Ampersand/AmpersandData/PrototypeContext/Navbar.adl:44:97 error:
A relation is used that is not defined: pf_navItemRoles ==============================
Surprisingly, I could not find declarations of the missing relations anywhere in the entire Ampersand repo. So, I speculated that maybe these are "magical declarations" and decided to add these declaratioins in PrototypeContext.adl. An unlikely speculation, but then, a second declaration of the same thing doesn't hurt in Ampersand.
/Users/sjo00577/git/Ampersand/AmpersandData/PrototypeContext/Navbar.adl:77:132 error:
Type error, cannot match:
the concept PF_NavMenuItem (Src of I[PF_NavMenuItem ])
and concept NavMenuItem (Src of isSubItemOf [NavMenuItem *NavMenuItem ];isSubItemOf [NavMenuItem *NavMenuItem ]~)==============================
/Users/sjo00577/git/Ampersand/AmpersandData/PrototypeContext/Interfaces.adl:24:82 error:
Type error, cannot match:
the concept Interface (Tgt of isPublic [Interface *Interface ])
and concept PF_Interface (Src of V [PF_Interface *Role ])==============================
I figured that maybe there is more magic in this thing.
So, I added
CLASSIFY Interface IS PF_Interface
CLASSIFY NavMenuItem IS PF_NavMenuItem
But the search wasn't over. I now got stuck with four compiler errors, the first of which reads:
/Users/sjo00577/git/Ampersand/AmpersandData/PrototypeContext/Navbar.adl:77:111 error:
Type error, cannot match:
the concept NavMenuItem (Src of I[PF_NavMenuItem ]-isSubItemOf [NavMenuItem *NavMenuItem ];isSubItemOf [NavMenuItem *NavMenuItem ]~)
and concept PF_NavMenu (Src of I[PF_NavMenu ])==============================
Now I'm really puzzled because this is code that runs correctly when I use it to generate prototypes.
I inspected the code of the prototype framework to see which part of the metamodel it uses. This appears to be
Ah, this makes sence to me. Let me try to explain. Initially, I made modifications to all ADL files in FormalAmpersand as well as in PrototypeContext. One of the changes I made was to remove the prefix pf_ from everything. The prefix has no more use, for a namespace is generated automatically for the FormalAmpersand files as well as the PrototypeContext files. I also changes everything else so all these files abide to the new 5.0 syntax (Mostly Name and Label stuff).
Because at the time I did these changes there was no such thing as LABEL, the original names were not preserved as LABEL. This is where you came in. As we discussed previously, you started all over again with the files in AmpersandData. I forgot to inform you that I had removed the prefixes in PrototypeContext files. So please go on with your effort, and don't forget to remove the pf_ prefixes. Sorry for not telling you this before.
What happened
I tried to compile the AmpersandData/PrototypeContext/PrototypeContext.adl` code with the Ampersand-v5.0.0 compiler, expecting it to compile stand-alone. This code is used to generate prototypes, so I know apriori that it is correct. However, I got compiler errors:
Surprisingly, I could not find declarations of the missing relations anywhere in the entire Ampersand repo. So, I speculated that maybe these are "magical declarations" and decided to add these declaratioins in
PrototypeContext.adl
. An unlikely speculation, but then, a second declaration of the same thing doesn't hurt in Ampersand.Now I got type conflicts:
I figured that maybe there is more magic in this thing.
So, I added
But the search wasn't over. I now got stuck with four compiler errors, the first of which reads:
Now I'm really puzzled because this is code that runs correctly when I use it to generate prototypes.
I inspected the code of the prototype framework to see which part of the metamodel it uses. This appears to be
@Michiel-s, can you explain to me what I cannot explain?
What I expected
Version of ampersand that was used
Steps to reproduce
Screenshot / Video
Context / Source of ampersand script
The text was updated successfully, but these errors were encountered: