321-CL3
2 Pages

321-CL3

Course: CSE 321, Winter 2011

School: Ohio State

Word Count: 208

Rating:

Document Preview

global_procedure Get_Tree ( alters Text& tree_as_text, produces Tree_Of_Character& t ); /*! requires there exists x, y: string of character, t1: tree of character (#tree_as_text = x * y and x = PREFIX_DISPLAY (t1)) ensures #tree_as_text = PREFIX_DISPLAY (t) * tree_as_text !*/ { object Character x; t.Clear() object Character t2; if(tree-as-text.Length() > 0) {...

Unformatted Document Excerpt
Coursehero >> Ohio >> Ohio State >> CSE 321

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Get_Tree global_procedure ( alters Text& tree_as_text, produces Tree_Of_Character& t ); /*! requires there exists x, y: string of character, t1: tree of character (#tree_as_text = x * y and x = PREFIX_DISPLAY (t1)) ensures #tree_as_text = PREFIX_DISPLAY (t) * tree_as_text !*/ { object Character x; t.Clear() object Character t2; if(tree-as-text.Length() > 0) { tree-as-text.Remove(0, x); if(x =='(') { if(tree-as-text.Length() > 0) { tree-as-text.Remove(0, x); if(x != '(' and ')') { t2[current] &= x; t.Add(0, t2); } } else if(x == '(') { if(tree-as-text.Length() > 0) { tree-as-text.Remove(0, x); if(x == ')') { if(tree-as-text.Length() > 0) { tree-as-text.Remove(0, x); if(x = ! '(' and ')') { t2[current] &= x; t.Add(0, t2); } } } } } else { t[current] &= x; } Get_Tree(tree-as-text, t2); t.Add(0, t2); } } global_procedure Put_Tree ( preserves Tree_Of_Character& t, alters Character_OStream& outs, preserves Integer indentation_factor ); /*! requires outs.is_open = true ensures outs.is_open = true and outs.ext_name = #outs.ext_name and outs.content = #outs.content * MULTILINE_DISPLAY (t, indentation_factor) !*/ { object Integer pos; outs << t[current] << '\n' << '\t'; while(pos < t.Number_Of_Children) { object Tree_Of_Character t2; t.Remove(pos, t2); Put_Tree(t2, outs, indentation_factor); t.Add(pos, t2); pos++; } }

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Ohio State - CSE - 321
Evaluate_Expressioncfw_value.Clear();object Integer term1, term2;while(source_text.Length() &gt; 0)cfw_source_text.Remove(0, c);if(c != '+') and (c != '-')cfw_Evaluate_Term(source_text, c, term1);elsecfw_if(c = '+')cfw_source_tex
Ohio State - CSE - 321
1.q1.Clear();q2.Clear();while(q.Length() &gt; 0)cfw_object Integer x;if (q[current] &lt; p or q[current] = p)cfw_q.Dequeue(x);q1.Enqueue(x); else cfw_q.Dequeue(x);q2.Enqueue(x);2.q.Clear();while(q1.Length() &gt; 0)cfw_object
Ohio State - CSE - 321
1.global_procedure Insert_In_Order ( alters Queue_Of_Integer&amp; q, consumes Integer&amp; x ); /*! requires IS_ORDERED (q) ensures q is permutation of #q * &lt;#x&gt; and IS_ORDERED (q) !*/cfw_object Integer p;p = q[current];while (q[current] &lt;
Ohio State - CSE - 321
1.global_procedure Split (consumes Queue_Of_Integer&amp; q,produces Queue_Of_Integer&amp; q1, produces Queue_Of_Integer&amp; q2 ); /*!ensures q1 * q2 is permutation of #q and |q2| &lt;= |q1| &lt;= |q2| + 1 !*/cfw_q1.Clear(); q2.Clear(); q &amp;= q1;
Ohio State - CSE - 321
1.Heaps2.global_function Boolean Satisfies_Ordering_Property ( preserves Binary_Tree_Of_Integer&amp; t ); /*! ensures Satisfies_Ordering_Property = [t satisfies the heap ordering property] !*/cfw_if(t.Size() &gt; 1)cfw_object Boolean b;
Ohio State - CSE - 321
2.global_function Integer Height ( preserves Tree_Of_Item&amp; t ); /*! ensures Height = HEIGHT (t) !*/cfw_object Integer h;if(t.Number_Of_Children() &gt; 0)cfw_object Tree_Of_Item t2;t.Remove(0, t2);t2.Height();h+;t.Add(0, t2);
Ohio State - CSE - 321
EXAMPLE 1:0JUMP_IF_NOT_NEXT_IS_WALL162TURNRIGHT3TURNRIGHT4INFECT5JUMP677.EXAMPLE 2:0JUMP_IF_NOT_NEXT_IS_WALL172TURNRIGHT3TURNRIGHT4INFECT5JUMP697INFECT8MOVE9.EXAMPLE 3:0JUMP_IF_NOT_NEXT_IS_NOT_EMPTY1132JUMP_IF_N
Ohio State - CSE - 321
HW151.The specs rule out recursive BL programs specifically in the definitions for CALLS_INSTRUCTION and HAS_A_CALLING_CYCLE. In CALLS_INSTRUCTION it explains that when the root of the statement is a call to an instruction then the instruction is either
Ohio State - CSE - 321
1. Insert ('I')2. Insert ('F')3. Insert (' ')4. Dispense5. Insert ('t')buffer_rep&quot;I&quot;&quot;IF&quot;&quot;IF &quot;&quot; &quot;&quot; t&quot;buffer_state11122token_readyFTTTT6. Dispense7. Insert ('r')8. Insert ('u')9. Insert ('e')10. Insert (' ')buffer_rep&quot;t&quot;&quot;tr&quot;
Ohio State - CSE - 321
1. 2. global_function Boolean Satisfies_Ordering_Property ( preserves Binary_Tree_Of_Integer&amp; t ); /*! ensures Satisfies_Ordering_Property = [t satisfies the heap ordering property] !*/ cfw_ if(t.Size() &gt; 1) cfw_ object Boolean b; object Binary_Tree_Of_In
Ohio State - CSE - 321
HW5 The convention states that if the sorting machine is in insertion phase then the heap is empty and the array is empty or the heap contains data and the lower bound of the array is 1 and the upper bound is one less than the size of the heap the convent
Ohio State - CSE - 321
CSE 321 Final ReviewThe exam is closed-book, closed-notes, closed-neighbor. We will provide you with a summary sheet of all the kernel operations for the relevant components. If you need to see the specification for any component during the exam, your in
Ohio State - CSE - 321
/ written by: Jamie Milhoan &amp; Jacob McConnell/ /*-*\/ | Concrete Template : Sorting_Machine_Kernel_2/ \*-*/#ifndef CT_SORTING_MACHINE_KERNEL_2#define CT_SORTING_MACHINE_KERNEL_2 1/-/ Global Context -/-#include &quot;AT/Sorting_Machine/Kernel.h&quot;#inclu
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template : Statement_Pretty_Print_1/ \*-*/#ifndef CT_STATEMENT_PRETTY_PRINT_1#define CT_STATEMENT_PRETTY_PRINT_1 1/-/ Global Context -/-#include &quot;AT/Statement/Pretty_Print.h&quot;/*! #include &quot;AT/Statement/Kernel.h&quot;!*/ /-/ Int
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template : Statement_Kernel_1/ \*-*/#ifndef CT_STATEMENT_KERNEL_1#define CT_STATEMENT_KERNEL_1 1/-/ Global Context -/-#include &quot;AT/Statement/Kernel.h&quot;#include &quot;CT/Tree/Kernel_1a.h&quot;/-/ Interface -/-concrete_template &lt; conc
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template : Program_Parse_1/ \*-*/#ifndef CT_PROGRAM_PARSE_1#define CT_PROGRAM_PARSE_1 1/-/ Global Context -/-#include &quot;AT/Program/Parse.h&quot;#include &quot;CI/BL_Tokenizing_Machine/1.h&quot;#include &quot;CT/BL_Tokenizing_Machine/Get_1.h&quot; /-
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template : Statement_Parse_1/ |/ | Jason Werrell &amp; Jeff Steed/ |/ | You have no chance to survive make your time/ \*-*/#ifndef CT_STATEMENT_PARSE_1#define CT_STATEMENT_PARSE_1 1/-/ Global Context -/-#include &quot;AT/Statement/P
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template : XYZ_Kernel_1/ \*-*/#ifndef CT_TAG_CLOUD_MACHINE_KERNEL_1#define CT_TAG_CLOUD_MACHINE_KERNEL_1 1/-/ Global Context -/-#include &quot;AT/Tag_Cloud_Machine/Kernel.h&quot;#include &quot;CT/Partial_Map/Kernel_1.h&quot; /-/ Interface -/-
Ohio State - CSE - 321
CSE 321 Midterm ReviewThe exam is closed-book, closed-notes, closed-neighbor. We will provide you with a summary sheet of all the kernel operations for the relevant components. If you need to see the specification for any component during the exam, your
Ohio State - CSE - 321
/ /*-*\/ | Concrete Template Body : Tokenizing_Machine_Kernel_1_Body/ \*-*/#ifndef CT_TOKENIZING_MACHINE_KERNEL_1_BODY #define CT_TOKENIZING_MACHINE_KERNEL_1_BODY 1/-/ Global Context -/-#include &quot;CT/Tokenizing_Machine/Kernel_1.h&quot;/-/ Public Opera
Ohio State - CSE - 360
0123 4 5 670 NUL DLE space 0 @ P ` p 1 SOH DC1 ! 2 STX DC2 &quot; 3 ETX DC3 # 4 EOT DC4 $ 5 ENQ NAK % 6 ACK SYN &amp; 7 BEL ETB ' 8 BS 9 HT A LF B VT C FF D CR E SO F SI CAN ( EM ) 1 A Q a q 2 B R b r 3 C S c s 4 D T d t 5 E U e u 6 F V f v 7 G W g w 8 H X h
Ohio State - CSE - 360
Homework #0This homework is designed to help you to get acquainted with this course, and to get started. 1. 2. 3. Surf to your instructor's course/section page and find the following: Office Location, Office Hours, Email Address, Course Overview, Course
Ohio State - CSE - 360
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20Octal 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23 24Hexadecimal Binary 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 0 1 10 11 100 101 110 111 1000 1001 1010 1011 1100 1101 1110 1111 1
Ohio State - CSE - 360
Name: David Skidmore Assignment: Homework 1 1. Review the Course Description (Syllabus, Policies, and Description) document on Carmen. a. What formats are acceptable for HW and lab submissions? Acceptable submission formats for homework are PDF, Microsoft
Ohio State - CSE - 360
Name: David Skidmore Assignment: Homework 2 1. From the book, do exercises 19, 23d, 26, 27 on p. 33 a. For each of the following bit patterns, identify the integer value encoded into this bit pattern using the 8-bit 2's complement representation: i. 00110
Ohio State - CSE - 360
Name: David Skidmore Assignment: Homework 3 1. Do review questions 8-11 on p. 105 a. What is an OPCODE? What is the purpose of an instruction format? An OPCODE describes the binary encoding of an operation while the instruction format indicates how many b
Ohio State - CSE - 360
Name: David Skidmore Assignment: Homework 4 1. Do review questions 1, 5, 6, 7, 11 (5 pts each) on p. 154 a. How many differences can you identify between the RISC and CISC approaches? The primary difference between the two approaches is instruction design
Ohio State - CSE - 360
Homework #1: A SolutionReading: Sections 1.1, 1.2, and 7.2If you have a calculator that does conversion between bases, I suggest that you still do the homework by hand and use the calculator to check your answers. In the exams (as well as out in the rea
Ohio State - CSE - 360
Homework #2: ProblemsPoints: 100. Reading: Sections 1.3-1.4, 2 (skim), 3.1HW2-1. Answer the following 4 questions (parts 1-4; 5 points each): Part 1. For each of the following bit patterns, identify the integer value that would be encoded into this bit
Ohio State - CSE - 360
Homework #3: A SolutionChapter 3: Section 3.2 (read carefully); Sections 3.3-3.5 (lightly) HW3-1. Do review questions 8-11 on p. 105 (5 pts each) 8) OPCODE is shorthand for operation code. An instruction format can be used to define a straightforward, si
Ohio State - CSE - 360
Homework #4: A SolutionReading: Sections 3.2, 4, 7.2, 9.3; Lab manual: Chapter 2 Problems:HW4-1. Do review questions 1, 5, 6, 7, 11 (5 pts each) on p. 154 In addition, for question 6, state what else pseudo-operations are called.1) Differences between
Ohio State - CSE - 360
.dataMEM: .byte 0x80 ! LOAD 0 .byte 0x7F ! DIV 31 .byte 0xAE ! STORE 14 .byte 0x1F ! ADD 31 .byte 0x2E ! SUB 14 .byte 0x5F ! MPY 31 .skip 26 .text /* PREAMBLE - Name: Assignment: Lab 1 Objectives: * Organize instruction and data sections *
Ohio State - CSE - 360
.dataMEM: .skip 32 .text /* PREAMBLE - Name: Assignment: Lab 2 Objectives: * Implement high level control structures in assembly language * Interpret encodings in different ways, including sign-extending and non-sign-extending reads from memory
Ohio State - CSE - 360
.dataMEM: .skip 32Addr_prmpt: .asciz &quot;Memory [ &quot;Cont_prmpt: .asciz &quot; ] = &quot;Reg_disp_arr: .asciz &quot;PC = &quot; .asciz &quot;ACC = &quot; .asciz &quot;IR = &quot; .asciz &quot;MAR = &quot; .asciz &quot;MDR = &quot; .set Reg_disp_arr_el_sz, 7 .text /* PREAMBLE - Name: Assignment: Lab 3 Pro
Ohio State - CSE - 360
Name:_[_]Base conversion (3 pts each) Consider the numeric value represented (in simple base nine) as 1307.Points: _ / 1001. Give its decimal representation. 2. Give its 8-bit simple binary representation. 3. Assuming it's a byte address in memory, wou
Ohio State - CSE - 360
CSE 360: Introduction to Computer SystemsCourse Notes Rick Parent (parent@cse.ohio-state.edu)http:/www.cse.ohio-state.edu/~parentWayne Heym (w.heym@ieee.org)http:/www.cse.ohio-state.edu/~heymCopyright 1998-2005 by Rick Parent, Todd Whittaker, Bettina
Ohio State - CSE - 360
CSE 360: Introduction to Computer Systems Course Notes Wi`10(bbair@cse.osu.edu) http:/carmen.osu.eduBettina BairCopyright 19982009 by Bettina Bair, Jim Dinan,Wayne Heym, Rick Parent, Todd Whittaker, Pete WareCSE3601Section Details Class Meets Instr
Ohio State - MATH - 568
Math 568Row Echelon Form and Number of Solutions1. Row Echelon Form In these notes we will define one of the most important forms of a matrix. It is one of the &quot;easier&quot; forms of a system to solve, in particular, only back-substitution is needed to compl
Ohio State - MATH - 568
Math 568Systems of Linear Equations and MatricesIn these notes, we define a linear system and their associated matrices. We also indicate the algebra which can be preformed on these objects.1. Definitions and Notation A linear equation in n variables i
Ohio State - CSE - 459.24
Programming in C#CSE 459.24 Prof. Roger CrawfisCourse Overview 1-creditpass/no-pass brief introduction to C#. Covers (most of) the C# language and some of the most useful .NET API's. Should not be your first programming class.Assume you know C+ and/o
Ohio State - CSE - 459.24
Programming in C# Language OverviewCSE 459.24 Prof. Roger CrawfisOverview Quicklygo through some of the major differences between C+ or Java and C#. Overview of a C# program. Built-in C# types. Canonical Hello World programMy View on C# I have been
Ohio State - CSE - 459.24
Programming in C#Object-OrientedCSE 459.24 Prof. Roger CrawfisKey Object-Oriented Concepts Objects, Identity Everyinstances and classesinstance has a unique identity, regardless of its data Encapsulation Dataand function are packaged together In
Ohio State - CSE - 459.24
Programming in C#Generics CSE 494R(proposed course for 459 Programming in C#)Prof. Roger CrawfisMotivationl Seethe Type Unification and the use of the ArrayList set of slides. l In summary, four main goals:1. 2. 3. 4.Increase type safety (statical
Ohio State - CSE - 459.24
Programming in C#PropertiesCSE 494R(proposed course for 459 Programming in C#)Prof. Roger CrawfisProperties Typicalpattern for accessing fields.private int x; public int GetX(); public void SetX(int newVal); Elevatedinto the language:private in
Ohio State - CSE - 459.24
Programming in C#Comparison (Sorting) CSE 494R(proposed course for 459 Programming in C#)Prof. Roger CrawfisComparisonl Comparingtwo instances of a type has many of the same properties and pitfalls as testing for equality. l Equality is generally mo
LSU - ACCT - 3221
ch9Student: _1.Credit for child and dependent care expenses can only be claimed on a Form 1040. True False2.A qualifying individual for purposes of the credit for child and dependent care expenses includes a dependent or a spouse of the taxpayer who
USC - PHIL - 140g
Inamine 1Philosophy 140: Contemporary Moral and Social IssuesFinal Exam Study GuideGENERAL STUFF TO KNOW: The &quot;Slippery Slope&quot; Fallacy: If O1 has characteristic, C, and the difference between O1 and O2 cannot provide a principled reason for thinking
USC - PHIL - 140g
Introduction&quot;Contemporary issues&quot; important matters under dispute &quot;Moral&quot; normative (what should be), not descriptive (what is) IsOught Distinction all normative claims are nondescriptive, all descriptive claims are nonnormative Different types of normat
USC - PHIL - 140g
Abortion, Pt. IAbortion Statistics a. ~1.5 million legal abortions/year since 1980 b. Between 1973 and 2005, around 45,000,000 legal abortions performed c. 49% of all pregnancies are unintended, half of those are aborted Abortion History d. Roe v. Wade (
USC - PHIL - 140g
Philosoophy 140 Exam 1 Cheat Sheet Moral issues are normative (based on what ought to be rather than what is) Is-Ought Distinction (or Fact/Value Distinction): all normative claims are non-descriptive, and alldescriptive claims are non-normative. An `o
UCSD - USP - 144
ISSUES IN THE PROVISION OF PREVENTIVE SERVICESCASE STUDY: SCREENING TO PREVENT VISION LOSS IN CHILDREN1I. PREVENTIVE SERVICESA. COMMUNITY SERVICES Municipal filtration of drinking water B. PERSONAL SERVICES Screening for disease in asymptomatic2
UCSD - USP - 144
11/9/11Controlling HIV: Fact or Fiction?Susan Little, M.D. Professor of Medicine University of California San Diego1 Financial Disclosures: None11/10/11HIV Transmission: It's all about sex!See, the problem is that God gives men a brain and a penis,
UCSD - USP - 144
Infections in the Post-Antibiotic EraSharon Reed, M.D. Professor of Pathology and Medicine Director, Microbiology and Virology LaboratoriesWorlds Deadliest Infectious Diseases#Infectious Disease Respiratory Inf. AIDS Diarrhea Tuberculosis Malaria Hepat
UCSD - USP - 144
Is Work Hazardous to Your Health?Ruth Heifetz, M.D., M.P.H. Family &amp; Preventive Medicine USP 144 November 15, 2011EHC builds grassroots campaigns to confront the unjust consequences of toxic pollution, discriminatory land use, and unsustainable energy p
UCSD - USP - 144
Reproductive EpidemiologyChristina Chambers, Ph.D., M.P.H. Professor, Pediatrics and Family and Preventive Medicine Skaggs School of Pharmacy and Pharmaceutical Sciences University of California San DiegoOutline Range of topics covered by reproductive/
UCSD - USP - 144
Diane Masser-Frye, MS, MSW, CGC Rady Children's Hospital, San Diegoindividuals to determine who is at risk of developing or transmitting a particular disease in order to ameliorate or prevent later disease. The rationale is that benefits of early detecti
UCSD - USP - 144
The Cigarette Smoking Epidemic In the United States and the Role of Industry Marketing in Encouraging UseJohn P. Pierce PhD Moores UCSD Cancer CenterPatterns of Tobacco UseSmoking prevalence among men aged &gt;15 yrs of age in 2006, WHO Health Statistics
UCSD - USP - 144
USP 144: Environmental and Preventive Health Services 12/1/11 Get a sense of the health status in the U.S. Understand the multiple, interrelated social, environmental and biological factors that influence health and disease; Gain a basic overview of pub
UCSD - USP - 144
Grace Kim &quot;Don't Put that in your Mouth&quot; Jeffery Smith Jeffrey Smith's lecture about genetically altered food and the affects it has on humans and what we can do about it. The first thing that took me back a little bit was when he talked about the bad aff
UCSD - USP - 144
if there is a big earthquake, it is not the earthquake itself that will affect us but the other things that it will stop and interfere with people arent ready because of the view that isn't going to happen to me there are other priorities, gets in the way
UCSD - USP - 144
positive predictive value proportion of people with positive test who have condition negative predictive value proportion of people with negative test who do not have condition problem of false negative - person with disease told disease free problem of f