Programming Models and Techniques Quiz
20 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a programming model?

  • A method to improve hardware performance.
  • A collection of programming languages that can be used interchangeably.
  • A set of abstractions that supports developing computer programs. (correct)
  • An interface used solely for web development.
  • Which of the following is NOT a characteristic of programming models?

  • They can be domain-specific or general-purpose.
  • They can be low-code or not.
  • They help highlight common techniques for programming.
  • They always require extensive coding knowledge. (correct)
  • Which technique emphasizes the use of visual elements in programming?

  • Visual programming (VPL). (correct)
  • Programming by demonstration (PBD).
  • Code-driven development.
  • Programming by natural language (PBNL).
  • According to the information provided, which statement regarding low-code models is true?

    <p>Low-code models still require some degree of coding.</p> Signup and view all the answers

    What type of programming technique draws upon conversation for user interaction?

    <p>Programming by natural language (PBNL).</p> Signup and view all the answers

    What is a primary characteristic of Trigger-Action Programming (TAP)?

    <p>It depends on users specifying events or conditions for actions.</p> Signup and view all the answers

    Which of the following best describes the function of triggers in TAP?

    <p>To represent situations based on user's physical or emotional state.</p> Signup and view all the answers

    Why is it advised to encourage users to keep their utterances short in programming?

    <p>Easier error identification and resolution results from simpler programs.</p> Signup and view all the answers

    What is the main objective of rule-based programming?

    <p>To provide users the ability to personalize smart device behavior.</p> Signup and view all the answers

    In TAP, what comprises the condition for a trigger?

    <p>A combination of environmental factors and available devices.</p> Signup and view all the answers

    What is the primary purpose of using scenarios in software engineering?

    <p>To specify user requirements in concrete examples</p> Signup and view all the answers

    What does BDD stand for in the context of software development?

    <p>Behavior-Driven Development</p> Signup and view all the answers

    Which of the following is NOT a characteristic of scenario-based specifications?

    <p>They require advanced programming skills to understand</p> Signup and view all the answers

    What is a feature of text-based approaches in programming?

    <p>They may use a hybrid of visual and textual manipulation</p> Signup and view all the answers

    What structure does the Gherkin syntax follow in BDD scenarios?

    <p>Given, When, Then</p> Signup and view all the answers

    What could be a consequence of having overlapping automation rules such as R1 and R2 regarding window management?

    <p>Rules can inadvertently conflict, leaving windows either open or closed.</p> Signup and view all the answers

    In trigger-action programming, what is the main function of a condition in an action command?

    <p>To define when an action should be executed based on given criteria.</p> Signup and view all the answers

    Which of the following actions could result from the implementation of the automation rule that turns off smart outlets when nobody is home?

    <p>Potential neglect in feeding the pet if the feeder relies on power.</p> Signup and view all the answers

    What is a potential benefit of using trigger-action programming for household automation?

    <p>Flexibility in executing actions under varying conditions.</p> Signup and view all the answers

    What is likely to occur if the temperature measures 19C, based on the rule regarding temperature control?

    <p>The heater will be turned on to warm the room.</p> Signup and view all the answers

    Study Notes

    EUP Models

    • EUP Models presentation by Thiago Rocha Silva, Associate Professor at SDU.
    • Presentation for EUD - Fall 2024.
    • Contact email: [email protected]

    Programming Models

    • A programming model is a set of abstractions that facilitates the development of computer programs.
    • Programming models can be low-code or not, domain-specific or general-purpose.
    • The programming model perspective emphasizes common techniques for writing, reading, and executing programs.

    Key Low-Code Techniques

    • Visual programming languages (VPLs): Utilize visual components arranged on a canvas for program creation.
    • Programming by demonstration (PBD): Users demonstrate the desired behavior, and the system records the actions as a program.
    • Programming by natural language (PBNL): Users provide natural language instructions, and the system generates the corresponding program.
    • Rule-based: Programs are created based on defined rules.
    • Text-based: Programs are created through textual input.

    Low-Code Users and Techniques

    • The presentation includes a diagram illustrating low-code users (citizen developers, semi-developers, professional developers) and the programming languages they use (visual programming language, domain-specific language, and general-purpose programming language).

    Building Blocks

    • Code canvas: visually represents code (e.g., as a flow graph).
    • Palette: provides components for drag-and-drop selection.
    • Text box: holds natural language text for code search, description, or generation.
    • Player: controls functions like capture, replay, pause, and step for code execution.
    • Stage: displays the effects of code execution.
    • Configuration pane: allows users to customize components graphically (via checkboxes, sliders), or textually (e.g., typing formulas).

    Visual Programming Languages

    • Visual programming languages (VPLs) enable direct manipulation of visual representations to create programs.
    • Two prominent VPL representations: boxes-and-arrows (like BPMN diagrams), and interlocking puzzle pieces (like Scratch).

    Boxes-and-arrows

    • Describes a visual programming paradigm using boxes and arrows.
    • Boxes represent actions or steps, and arrows represent the flow between actions/steps.
    • Presented with an example of a booking process in an airline system.

    VPL Strengths

    • Easy to read using domain-specific notation already familiar to the user.
    • More unambiguous than other methods (like text-based PBD or PBNL).
    • Helps programmers control programs, thus reducing errors. This is built into the structure of programming, which prevents many common code errors.
    • Rules out syntax and even simple type errors by construction.

    VPL Weaknesses

    • Not always self-explanatory, requiring user training.
    • Visual notations may consume a significant amount of screen space.
    • Design may require configuration panes or modular language constructs.
    • Large palettes may hinder discoverability by users

    VPL Compared to Textual Languages

    • VPLs are typically co-dependent on their visual programming environment, hindering tools like code diffing, search, and use of external tools.
    • Mitigation strategy: Backing VPLs with a textual domain-specific language.

    Programming by Demonstration (PBD)

    • Programming by demonstration lets users create programs by performing the desired actions via mouse and keyboard, and subsequently recording the actions.
    • This can then create automatic programs that reproduce the actions of the user.

    PBD: Strengths

    • Direct interaction with software applications.
    • Well-suited for citizen developers with no programming experience.
    • More tangible than other methods (e.g. programs in different paradigms) and creates a clear flow of control and data.

    PBD: Weaknesses

    • Difficult to correctly generalize user intent.
    • Can be very brittle when the graphical application changes.
    • Overly-specific demonstrations are difficult to understand as they may contain extraneous steps resulting in overly large programs.

    Programming by Natural Language (PBNL)

    • Natural language text (typed or spoken) is translated into a program by the system using natural language processing (NLP).
    • Can optionally be rendered using a VPL.
    • Can employ a controlled natural language (a controlled subset of natural language) which disambuguates possible meanings within the language in order to produce a clearer program intent.

    PBNL: Strengths

    • Low code complexity.
    • Well-suited for users with limited programming knowledge (citizen developers).
    • Less need for complex programming constructs.
    • Recent NLP advancements from large language models improve PBNL performance.

    PBNL: Weaknesses

    • Generated programs can be flawed (often due to human ambiguities).
    • NLP technology involved can be imperfect and is prone to misinterpreting context.
    • Results can lead to more complex code that may be unwieldy.
    • Encouraging simpler text input can resolve many of these difficulties.

    Comparing Key Low-Code Techniques

    • A comparison table presents the methods used for writing, reading, and executing code for visual programming languages, programming by demonstration, and programming by natural language. Data includes complexity and ease of use.

    Rule-Based

    • A programming method focusing on enabling end users to customize the behavior of smart devices, IoT (Internet of Things) systems, and Ambient Intelligence (AmI) applications.
    • It emphasizes personalization and encompasses hardware and software aspects.

    Trigger-Action Programming (TAP)

    • TAP supports the management and execution of automations.
    • It relies on users defining events/conditions and desired actions.
    • Triggers can relate to users' emotional/physical states, environment, and available devices/applications.
    • Trigger information comes from sensors, applications, and services.
    • Triggers can be composed of events and/or conditions.

    TAP: Issues with multiple automation rules

    • Rule conflicts or rule prevention: execution of one rule might block a trigger for another.
    • Unexpected rule chains: running one rule could trigger another unintended or unanticipated rule.

    Scenario-Based Specifications

    • Using scenarios for software requirements is common.
    • Scenarios using natural language enhance user-friendliness.
    • Behaviour-Driven Development (BDD) can create runnable specifications, balancing natural language with formalism.

    BDD Scenarios: Gherkin Syntax

    • A dedicated syntax for defining BDD (Behaviour-Driven Development) scenarios (using keywords like Given, When, Then).

    A Domain-Specific Language (DSL) for BDD

    • DSL provides a syntax for describing BDD scenarios.
    • State machines can describe BDD scenarios.
    • The DSL can handle declarative and imperative features.

    A DSL for BDD Scenarios

    • A dedicated Domain Specific Language (DSL) for BDD scenarios based on state machines provides both declarative and imperative features.

    Further Reading

    • Provides a list of recommended articles and publications for in-depth study on the topics covered. Includes specific authors, article titles, and venues.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    Test your knowledge on various programming models and techniques, including Trigger-Action Programming, low-code approaches, and Behavior-Driven Development (BDD). This quiz covers essential characteristics and concepts that define these paradigms. Challenge your understanding of user interaction techniques and the role of scenarios in software engineering.

    More Like This

    Programming Models and MapReduce Quiz
    10 questions
    ABAP Programming Models Chapter 7
    19 questions
    Examples of Stochastic Programming Models
    12 questions
    Systèmes Temps Réel - Chapitre 1
    12 questions

    Systèmes Temps Réel - Chapitre 1

    RockStarEnlightenment8066 avatar
    RockStarEnlightenment8066
    Use Quizgecko on...
    Browser
    Browser