• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/40

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

40 Cards in this Set

  • Front
  • Back
What are modules?
Modules are used to organize your application and reuse existing knowledge accross G2 applications.
What is a knowled base?
G2 applications are stored in knowledge bases. A knowledge base, or KB, is an ASCII file with a .kb extension that contains all the information your application needs to run. G2 applications can have a single file or many files.
How do you display the main menu? What can you do from the main menu?
Click on the background of the G2 window application to display the main menu.

" Control whether the application is running, paused, or reset. " Create and show workspaces. " Load, save, and merge KB files. " Control the default behaviors of the G2 environment. " Shutdown G2.
How do you display the workspace KB Menu? What can the workspace KB menu be used to do?
Click on the background of any workspace.

" Create objects of different types, including rules, procedures, and user interface objects. " Create definitions of objects. " Manipulate the workspace itself, for example, hide it, move it, print it, and delete it. " Specify information about the workspace, such as its name and its visual representation.
What is the operator Logbook?
The Operator Logbook is where G2 displays system messages, such as information about saving and loading files. In general, you don't need to have the operator logbook open, as if something needs to be displayed in it, a new operator logbook will show up.
G2 is a very object oriented language. In G2, almost all knowledge is represented by objects including...
" The physical systems. " The connections between systems. " The rules and procedures that describe the behavior of the systems. " The workspaces on which objects exist. " The graphical user interface elements of the application.
How do you get the object menu of an object? Name things that you can do from the object menu?
right click the object, the object menu will show up.

Naming the object. " Cloning the object, which means making an exact copy of the object. " Deleting the object. " Transferring the object to another workspace. " Specifying the characteristics of the object in its table. " Displaying a table of attributes for the object.
How do I lift a workspace?
How do I drop a workspace?
To lift press ctrl-t
To drop press ctrl-v
How do I move a workspace left, right, up, and down?
Ctrl-l, Ctrl-r, Ctrl-u, Ctrl-d respectively.
How do you make a workspace bigger or smaller?
To make bigger, type Ctrl-b, to make smaller, type Ctrl-s.
How do you add a label to a workspace?
Click on the workspace, select Free Text, choose to add a border or not.
What is a Connection?
A connection is a graphical link between two objects. You use connections in a G2 application to represent visually how objects are related. For example, in a video conferencing application, you might use connections to show which offices have video conferencing capability with other offices. In an application that monitors the flow of a liquid though a tank, you might use connections to represent the physical pipes between the tanks.
What is a relation?
a relation, is a non-graphical connection between two or more objects.
What is a stub?
A connection that is attached to one object but is not yet connected to another object is called a stub.
What are attributes? What 2 types of attributes are there?
Attributes are characteristics of an object. Any object of the same class has the same attributes, but the attributes can be different. There are two types of attributes, typed and untyped. Typed attributes are attributes that are validated in G2 in some way, Untyped attributes are attributes that can be any sequence of asci characters.
What type of attributes are there, why should you "strong type" a attribute?
G2 supports these data types:
" Integers
" Floating point numbers
" Quantities (integers or floating point numbers)
" Symbols
" Logical values (true or false)
" Fuzzy truth values (truth values with uncertainty)
" Text strings
" Sequences
" Structures

Strong typing means specifying the most limiting type that an attribute can be, it should be done because it increases performance.
How do you display the attribute table in G2?
Click on the object and click the table button. You can now modify the attributes.
What is a rule? What are the two parts of a rule?
A rule is a special kind of statement that tests conditions and draws conclusions.

" The first part, called the antecedent, tests a condition.
" The second part, called the consequent, draws a conclusion.
What is inferencing? What is the inference engine?
When a rule concludes a value for an attribute as a result of testing a condition, we refer to this mechanism as inferencing. As a result, the internal G2 mechanism that invokes rules is called the inference engine.
What are the two basic inferencing mechanisms, using rules:
" Event-driven processing, whereby G2 makes inferences by responding to real-time events, for example, moving an object on a workspace, receiving a value from a data source, or failing to receive a value.

" Data-driven processing, whereby G2 makes inferences by detecting changes in attribute values of objects, for example, due to the periodic updating of a real-time signal or the user entering a value in an end-user display.
What are the four basic types of rules?
" If rules perform data-driven processing by testing the condition in the antecedent and taking the actions in the consequent if the condition is true.

" Whenever rules perform event-driven processing by detecting the event in the antecendent and taking the actions in the consequent whenever G2 detects the event.

" Unconditionally rules perform data-driven or event-driven processing by taking the action in the consequent automatically whenever G2 invokes the rule by whatever means.

" Initially rules perform event-driven processing by invoking the rule whenever you start your knowledge base.
How do you create a new rule?
click Workspace > New Rule
How do you start, pause, or reset a g2 run?
Click the main menu, then choose the correct menu item.
How do you load and save a kb file?
Click the main menu, click load kb or save kb
What is an Action?
You use actions to create and delete objects and connections programmatically.
What is the difference between permanent and transient objects?
An object is part of the permanent knowledge in the KB when: " it has been created interactively and still retains its automatic permanent status " it has been created programmatically, transferred to a workspace, and made permanent with the make permanent action

An object is part of the transient knowledge in the KB when: " it has been created programmatically but not made permanent " it has been made transient through the make transient action
What is the fundamental difference between permanent and transient objects?
G2 deletes transient objects when you reset the KB, whereas G2 retains permanent objects when you reset the KB.
How do you perform multiple actions in order?
in order
statement and
statement and
statement

an in order clause tells G2 to execute the following things sequentially.
How do you perform a action on every object in a workspace?
big surprise, use every keyword
What is a Class Definition?
Every object is an instance of some other object, called its class. In object-oriented terms, an instance represents just one occurrence of potentially many occurrences of a class. Thus, an object has only a single class, whereas a class can have many instances.

Getting Started with G2 Tutorials 89 You declare the common characteristics of each instance in the class definition.


Typically, you declare:
" The class name of the class
" The superior class or classes from which the class inherits its default characteristics (attributes) and behaviors (methods) Chapter 3 Creating a Schematic Diagram
" The class-specific attributes of the class, including their default values and data types
" The icon representation of each instance, if the class has one
" The default stubs on each instance of the class
Why would you create a class hiearchy?
Create class hierarchies to reuse information and avoid redundancy in an application.
how do you change the manually overridden attributes of a class?
use the change command
How do you specificy the position and style of the stubs?
stubs: a connection located at top 15 with style diagonal

you do this from
What is a method? What is a procedure?
A method is a named object associated with a particular class that executes a sequence of actions when the application starts the method. A procedure is the same as a method except that it is not associated with any class.
What is the Format of a Method or Procedure?
method_Name(argument: argument_value)
0:class office;
begin
//a bunch of statements, executed in order
end
What is the difference in the format of a method declaration vs a procedure declaration?
The format of a method is almost identical to that of a procedure with the exception of the argument list. For a method, the first argument in the argument list is always an instance of the class to which the method applies.
How do you call a method or procedure?
use the call statement, as in...

call create-office(schematic-diagram)
How do I make a rule into a generic rule?
use the for structure in the rule.

Example:
for any office O
for any pump P connected at the input of any tank T
How do I detect the Event of Creating a Connection? (Make it event based programming?)
for any office O1 for any office O2 whenever O1 is connected to O2 then
use whenver as a or evaluation or a and evaluation with?
or , and