CS代考 King’s College London – cscodehelp代写

King’s College London
This paper is part of an examination of the College counting towards the award of a degree. Examinations are governed by the College Regulations under the authority of the Academic Board.
Examination Period Module Code Module Title
Summer 2020 (Period 2) 7CCSMMDD – online exam Model-Driven Development

Copyright By cscodehelp代写 加微信 cscodehelp

Format of Examination Start time
Time Allowed Instructions
Written questions
11am BST (GMT +1)
ONE AND A HALF hours
You are permitted to access any materials you wish, but this is not mandated and is not expected. You may use a calculator if you find this helpful.
ANSWER ALL QUESTIONS
The rubric for this paper must be followed and extra answers should not be submitted. For answers that are handwritten, write with blue/black ink on light coloured paper. Include the Module code, question number and student number on every page to be submitted. For an- swers that are typed, use the template provided.
Submission Deadline 12.30pm
Submission Process Work must be submitted to the level 7 Informatics Assessments
KEATS page.
Your work must be submitted as a PDF file. If you have prepared some answers on computer, and some on paper (which have then been digitised), you may upload at most two PDF files – one for computer-prepared answers, one for digitised answers. Do not duplicate answers across the two PDFs – if you do this, the computer-prepared answer will be taken. You should check that your work displays correctly after it has been uploaded.
ACADEMIC HONESTY AND INTEGRITY
Students at King’s are part of an academic community that values trust, fairness and respect and actively encourages students to act with honesty and integrity. It is a College policy that students take responsibility for their work and comply with the university’s standards and re- quirements. Online proctoring / invigilation will not be used for our online assessments. By submitting their answers students will be confirming that the work submitted is completely their own. Misconduct regulations remain in place during this period and students can familiarise themselves with the procedures on the College website
Important: Students should copy out the following statement and include it with their submission for each examination:
I agree to abide by the expectations as to my conduct, as described in the academic honesty and integrity statement.
 2020 King’s College London

Summer 2020 7CCSMMDD
1. Below are a number of questions about general MDD concepts and the overall cost–benefit tradeoff of MDD.
a. What is a meta-model? Give a short definition. Why are meta-models needed?
b. Sarah says: “A domain-specific modelling language is completely defined by its meta-model.” Do you agree? If you agree with Sarah’s statement, explain why different terms are used in different situations. If you do not agree with Sarah’s statement, explain what else is needed to completely define a domain-specific modelling language.
c. Karl’s team members are developing web applications for sales applica- tions. They have developed a core set of features that can be combined to produce a large variety of applications. For some features, additional customisation is available. For example, the look and feel of UI com- ponents can be customised to ensure the web application fits into the client’s branding. Also, clients can ask to customise the checkout journey by adding or removing additional logic (e.g., there may be an additional step reminding customers of items they regularly purchase but haven’t included in today’s basket).
Karl has heard about MDD and is wondering whether it would be sensible to develop a DSML for specifying feature selection and customisation. What would you recommend? Explain why you are making this recom- mendation. You may have to make additional assumptions in order to come up with a recommendation. State these assumptions explicitly and explain how they affect your decisions.
[12 marks]
SEE NEXT PAGE

Summer 2020 7CCSMMDD
2. Consider the Xtext grammar below, then answer the sub-questions.
a. List 3 reasons why the text below is not a valid instance of the grammar. protein DLL4
gene MyGene {
synthesises DLL4 7.5*3.2 Notch + 6.5 Notch * 3
QUESTION 2 CONTINUES ON NEXT PAGE
SEE NEXT PAGE

Summer 2020 7CCSMMDD
b. Draw a class diagram of the meta-model Xtext generates from the above grammar.
c. Write an Xtext scoping rule for the synthesised protein reference that ensures that the synthesised protein is different from proteins referenced in the formula. It is enough to give the scoping method, without the complete class specification around it. Specifically, any part of the model where the rule below is instantiated:
GeneSynthesisSpecification:
’synthesises’ protein=[Protein] formula=Formula;
should not allow Proteins that are also referenced from a Protein- Reference inside the formula.
[10 marks]
SEE NEXT PAGE

Summer 2020 7CCSMMDD
3. Consider the meta-model below.
Based on this meta-model, answer the following questions.
a. Name two different ways in which the dynamic semantics of a DSML can be specified. What are some benefits and drawbacks of each technique (name at least one benefit and one drawback)?
b. Write an Xtend generator class that, given a Form object, generates a list of each widget in the form, indicating the type and relevant attribute information. Fill the template code below to do so. You only need to provide the code in the method and any additional methods you may wish to use.
import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.xtext.generator.AbstractGenerator
import org.eclipse.xtext.generator.IFileSystemAccess2
import org.eclipse.xtext.generator.IGeneratorContext
class Exam2020Generator extends AbstractGenerator {
override void doGenerate(Resource resource,
QUESTION 3 CONTINUES ON NEXT PAGE
SEE NEXT PAGE

Summer 2020 7CCSMMDD
IFileSystemAccess2 fsa,
IGeneratorContext context) {
// Your code goes here…
// Your additional methods go here…
SEE NEXT PAGE
[20 marks]

Summer 2020 7CCSMMDD
a. Explain the difference between static and dynamic semantics. Name three types of static semantics. Why are static semantics useful?
b. Consider the following excerpt from an Xtext grammar and the corre- sponding XSemantics script defining some typing rules.
Is the variable declaration below well-typed? Explain your reasoning.
var int i = 7.7
QUESTION 4 CONTINUES ON NEXT PAGE
SEE NEXT PAGE

Summer 2020 7CCSMMDD
c. Consider the meta-model below.
Write an Xtext validation rule that checks that every widget that is not a label has a label and that no label is the label for another label.
FINAL PAGE

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

Leave a Reply

Your email address will not be published. Required fields are marked *