Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bottom-up and top-down design
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Computer science== ===Software development=== {{Main|Perl Design Patterns Book}} In the [[software development process]], the top-down and bottom-up approaches play a key role. Top-down approaches emphasize planning and a complete understanding of the system. It is inherent that no coding can begin until a sufficient level of detail has been reached in the design of at least some part of the system. Top-down approaches are implemented by attaching the stubs in place of the module. But these delay testing of the ultimate functional units of a system until significant design is complete. Bottom-up emphasizes coding and early testing, which can begin as soon as the first module has been specified. But this approach runs the risk that modules may be coded without having a clear idea of how they link to other parts of the system, and that such linking may not be as easy as first thought. [[Code reuse|Re-usability of code]] is one of the main benefits of a bottom-up approach.<ref name="autogenerated1">{{cite web |url=http://step.psy.cmu.edu/scripts/Attention/Treisman1980.html |title=STEP: Scripts: Attention: Treisman and Gelade 1980 |publisher=Step.psy.cmu.edu |date=March 13, 2003 |access-date=October 21, 2012 |url-status=dead |archive-url=https://web.archive.org/web/20110914130951/http://step.psy.cmu.edu/scripts/Attention/Treisman1980.html |archive-date=September 14, 2011 |df=mdy-all }} [https://facultypsy.hope.edu/psychlabs/exp/visualsearch/readings/TreismanGelade_1980.pdf Article PDF]</ref>{{failed verification|date=November 2024}} Top-down design was promoted in the 1970s by [[IBM]] researchers [[Harlan Mills]] and [[Niklaus Wirth]]. Mills developed [[structured programming]] concepts for practical use and tested them in a 1969 project to automate the ''[[The New York Times|New York Times]]'' [[The New York Times Archival Library|morgue index]]. The engineering and management success of this project led to the spread of the top-down approach through IBM and the rest of the computer industry. Among other achievements, Niklaus Wirth, the developer of [[Pascal programming language]], wrote the influential paper ''Program Development by Stepwise Refinement''. Since Niklaus Wirth went on to develop languages such as [[Modula]] and [[Oberon (programming language)|Oberon]] (where one could define a module before knowing about the entire program specification), one can infer that top-down programming was not strictly what he promoted. Top-down methods were favored in [[software engineering]] until the late 1980s,<ref name="autogenerated1"/>{{failed verification|date=November 2024}} and [[object-oriented programming]] assisted in demonstrating the idea that both aspects of top-down and bottom-up programming could be used. Modern [[software design]] approaches usually combine top-down and bottom-up approaches. Although an understanding of the complete system is usually considered necessary for good design—leading theoretically to a top-down approach—most software projects attempt to make use of existing code to some degree. Pre-existing modules give designs a bottom-up flavor. <gallery> Top Down Approach.png|Top-down approach to [[integration testing]] Bottom Up Approach.png|Bottom-up approach Sandwich Approach.png|Sandwich approach Bing Bang Approach.png|Big bang approach </gallery> ===Programming=== [[File:Lego Chicago City View 2001.jpg|thumb|left|Building blocks are an example of bottom-up design because the parts are first created and then assembled without regard to how the parts will work in the assembly.]] Top-down is a programming style, the mainstay of traditional [[Procedural programming|procedural languages]], in which design begins by specifying complex pieces and then dividing them into successively smaller pieces. The technique for writing a program using top-down methods is to write a main procedure that names all the major functions it will need. Later, the programming team looks at the requirements of each of those functions and the process is repeated. These compartmentalized subroutines eventually will perform actions so simple they can be easily and concisely coded. When all the various subroutines have been coded the program is ready for testing. By defining how the application comes together at a high level, lower-level work can be self-contained. In a bottom-up approach the individual base elements of the system are first specified in great detail. These elements are then linked together to form larger subsystems, which in turn are linked, sometimes at many levels, until a complete top-level system is formed. This strategy often resembles a "seed" model, by which the beginnings are small, but eventually grow in complexity and completeness. Object-oriented programming (OOP) is a paradigm that uses "objects" to design applications and computer programs. In mechanical engineering with software programs such as Pro/ENGINEER, Solidworks, and Autodesk Inventor users can design products as pieces not part of the whole and later add those pieces together to form assemblies like building with [[Lego]]. Engineers call this "piece part design". === Parsing === [[Parsing]] is the process of analyzing an input sequence (such as that read from a file or a keyboard) in order to determine its grammatical structure. This method is used in the analysis of both [[natural language]]s and [[computer language]]s, as in a [[compiler]]. [[Bottom-up parsing]] is parsing strategy that recognizes the text's lowest-level small details first, before its mid-level structures, and leaves the highest-level overall structure to last.<ref name="Bansal2013">{{cite book|author=Arvind Kumar Bansal|title=Introduction to Programming Languages|url=https://books.google.com/books?id=531cAgAAQBAJ&q=%22bottom-up%22|date=14 December 2013|publisher=CRC Press|isbn=978-1-4665-6514-2}}</ref> In [[top-down parsing]], on the other hand, one first looks at the highest level of the [[parse tree]] and works down the parse tree by using the rewriting rules of a [[formal grammar]].<ref name="GruneJacobs2007">{{cite book|author1=Dick Grune|author2=Ceriel J.H. Jacobs|title=Parsing Techniques: A Practical Guide|url=https://books.google.com/books?id=05xA_d5dSwAC&q=%22top-down%22|date=29 October 2007|publisher=Springer Science & Business Media|isbn=978-0-387-68954-8}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)