Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

PL Quiz 2

QuestionAnswer
Syntax meaning The form or structure of the expressions, statements, and program units.
Semantics The meaning of the expressions, statements, and program units
Language definition The syntax and semantics of a language
Language definition users Initial evaluators, implementers, programmers
Compilation phases Lexical analysis, syntax analysis, semantics analysis, code generation
Lexical analysis lexical analyzer splits source code into tokens
Token The syntactic category that forms a class of lexemes
lexeme A sequence of characters that matches the pattern for a token
Meta-language A language used to define other languages
grammar a meta-language used to define the syntax of a language
Recognizer Reads input strings and gives yes or no on whether the input strings belong to the language. Is a part of syntax analysis
Generator Generates a random valid sentence of a language
How do recognizers and generators work together Generators create sentences that are then used to create a recognizer
Context-free grammars 4 classes of generative devices or grammars that define four classes of languages
BNF A natural notation for describing syntax. It's equivalent to context-free grammars
BNF fundamentals Start symbol, finite set of production rules, finite set of terminal symbols, and a finite set of non-terminal symbols
Terminals Lexemes or tokens. They are the most basic syntactic units
Non-terminals Abstractions used to represent classes or syntactic structures. Often enclosed in angle brackets
Production rules Left-hand side or right-hand side
Static type binding Binding that occur before run time and remain unchanged throughout program execution
Dynamic binding Binding that first occur during execution or can change during execution of the program
static binding types Explicit declaration and implicit declaration
Dynamic type binding pros and cons It's flexible and can create generic programs. But it's high cost and does run time checking
Middle ground binding Type hinting which is dynamic, and type inference which is static
Storage binding Allocation, getting a cell and deallocation, putting a cell back into pool
lifetime Time that a variable is bound to a memory cell
Static variable bound to memory cell before and during execution
Static variable advantages Efficient, globally accessible, and history sensitive subprogram support
Static variable disadvantages Lack of flexibility, no recursion, no shared storage
Stack dynamic Storage binding are created for variables when this declaration statements are elaborated
Stack dynamic advantages Allows recursion, conserves storage
Stack dynamic disadvantages Overhead of allocation and deallocation, subprograms not history sensitive, inefficient references
explicit heap dynamic Allocated and deallocated b explicit directives during execution. Dynamic objects.
explicit heap dynamic disadvantages inefficient, unreliable, complex storage management
implicit heap-dynamic variables allocation and deallocation caused by assignment statements
implicit heap-dynamic variables advantages and disadvantages flexibility, but also inefficient
types of scope static scope and dynamic scope
static scope access Can call alongside and above but can only see itself and above
static scoping advantages Works well in most situations, programs are easy to reason about
static scoping disadvantages Too much access is possible sometimes, variables can be accessed when not needed, subprograms gravitate towards becoming global instead of nested
Dynamic scope use In exception handling
Dynamic scope advantage Convenience, the called subprogram is executed in the context of the caller
Dynamic scope disadvantages Poor readability, programs are difficult to reason about. No static type checking. All variables from caller are visible to called subprogram
Referencing environments The collection of all names that are visible at the statement
Static scoped language referencing environment The local variables plus all visible variables in all of the enclosing scopes
Dynamic-scoped referencing environment The local variables plus all visible variables in all active subprograms
Created by: mariuss
Popular Engineering sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards