[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-685651-105":59,"doc-detail-685651-en":130,"doc-similar-685651":161},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","chapter-1-basic-principles-of-programming-languages","Chapter 1 - Basic Principles of Programming Languages","","Chapter 1 introduces shared foundations and core components across programming languages, emphasizing that differences are often smaller than the common structural and functional principles. It explains major programming paradigms—imperative (procedural), object-oriented, functional (applicative), and logic—showing how each paradigm conceptualizes computation and program organization. The chapter outlines key language properties, historical development, lexical/syntactic/semantic structures, typing systems, and the roles of preprocessing and execution models (macro processing, interpretation, compilation). It also previews the program development workflow: requirement, specification, design, implementation, testing, and correctness proof.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/chapter-1-basic-principles-of-programming-languages/685651/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/chapter-1-basic-principles-of-programming-languages/685651.png","ImageObject",300,407,{"name":92,"@type":93},"anakgang17","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-11-07",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Why does the chapter argue that programming languages are more similar than natural languages?","Question",{"text":112,"@type":113},"It states that programming languages share common mathematical foundations, similar functionalities, rely on the same hardware and instruction sets, share design goals, and often draw on shared designer experience.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What are the main programming paradigms introduced in this text?",{"text":117,"@type":113},"The text highlights imperative (procedural), object-oriented, functional (applicative), and logic paradigms.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the chapter describe computation in the imperative (procedural) paradigm?",{"text":121,"@type":113},"Computation is expressed through stepwise, fully specified and controlled manipulation of named data: values are stored in variables, read, processed in the ALU, and stored back, with results sent to I/O devices.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},685651,1794016327,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":36,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":143,"preview_page_count":19,"preview_urls":144},962090883568,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","Chapter 1  \nBasic Principles of Programming Languages   \nAlthough there exist many programming languages, the differences among them are insignificant compared to the differences among natural languages. In this chapter, we discuss the common aspects shared among different programming languages. These aspects include:  \n􀁸 programming paradigms that define how computation is expressed;  \n􀁸 the main features of programming languages and their impact on the performance of programs written in the languages;  \n􀁸 a brief review of the history and development of programming languages;  \n􀁸 the lexical, syntactic, and semantic structures of programming languages, data and data types, program processing and preprocessing, and the life cycles of program development.  \nAt the end of the chapter, you should have learned:  \n􀁸 what programming paradigms are;  \n􀁸 an overview of different programming languages and the background knowledge of these languages;  \n􀁸 the structures of programming languages and how programming languages are defined at the syntactic level;  \n􀁸 data types, strong versus weak checking;  \n􀁸 the relationship between language features and their performances;  \n􀁸 the processing and preprocessing of programming languages, compilation versus interpretation, and different execution models of macros, procedures, and inline procedures;  \n􀁸 the steps used for program development: requirement, specification, design, implementation, testing, and the correctness proof of programs.  \nThe chapter is organized as follows. Section 1.1 introduces the programming paradigms, performance, features, and the development of programming languages. Section 1.2 outlines the structures and design issues of programming languages. Section 1.3 discusses the typing systems, including types of variables, type equivalence, type conversion, and type checking during the compilation. Section 1.4 presents the  \npreprocessing and processing of programming languages, including macro processing, interpretation, and compilation. Finally, Section 1.5 discusses the program development steps, including specification, testing, and correctness proof.  \n1.1 Introduction  \n1.1.1 Programming concepts and paradigms  \nMillions of programming languages have been invented, and several thousands of them are actually in use. Compared to natural languages that developed and evolved independently, programming languages are far more similar to each other. This is because  \n􀁸 different programming languages share the same mathematical foundation (e.g., Boolean algebra, logic);  \n􀁸 they provide similar functionality (e.g., arithmetic, logic operations, and text processing);  \n􀁸 they are based on the same kind of hardware and instruction sets;  \n􀁸 they have common design goals: find languages that make it simple for humans to use and efficient for hardware to execute;  \n􀁸 designers of programming languages share their design experiences.  \nSome programming languages, however, are more similar to each other, while other programming languages are more different from each other. Based on their similarities or the paradigms, programming languages can be divided into different classes. In programming language’s definition, paradigm is a set of basic principles, concepts, and methods for how a computation or algorithm is expressed. The major paradigms we will study in this text are imperative, object-oriented, functional, and logic paradigms.  \nThe imperative, also called the procedural, programming paradigm expresses computation by fully specified and fully controlled manipulation of named data in a stepwise fashion. In other words, data or values are initially stored in variables (memory locations), taken out of (read from) memory, manipulated in ALU (arithmetic logic unit), and then stored back in the same or different variables (memory locations) . Finally, the values of variables are sent to the I/O devices as output. The foundation of imperative languages is the stored program co","cbCaiqMGt5L36Op1","https://ap.wps.com/l/cbCaiqMGt5L36Op1","pdf",1683788,"English","# Section 1.1 Introduction\n## 1.1.1 Programming concepts and paradigms\n## Imperative and object-oriented paradigms\n## Functional paradigm\n## Logic paradigm","[{\"question\":\"Why does the chapter argue that programming languages are more similar than natural languages?\",\"answer\":\"It states that programming languages share common mathematical foundations, similar functionalities, rely on the same hardware and instruction sets, share design goals, and often draw on shared designer experience.\"},{\"question\":\"What are the main programming paradigms introduced in this text?\",\"answer\":\"The text highlights imperative (procedural), object-oriented, functional (applicative), and logic paradigms.\"},{\"question\":\"How does the chapter describe computation in the imperative (procedural) paradigm?\",\"answer\":\"Computation is expressed through stepwise, fully specified and controlled manipulation of named data: values are stored in variables, read, processed in the ALU, and stored back, with results sent to I/O devices.\"}]","Chapter 1 - Basic Principles of Programming Languages | PDF",101,[145,149,153,157],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a291d64dc7cde188d49f98351961fd9f.webp",983,1272,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/fae3042b7a6b92d54215477c442929ce.webp",982,1270,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a57b7bfdebed10a770612978e009b636.webp",981,1269,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/3a1fe5d865196e468fbfcadf69f23ddd.webp",980,1268,{"list":162,"token":66},[163,169,175,181,188,195,201,207,213,219],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":29,"category_name":40,"create_tm":168},504951,"Picat Through the Lens of Advent of Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229931968742/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=%2BzfUnZHfbitFQl3WJKCRXSHXZS0%3D","picat-through-the-lens-of-advent-of-code",1791080548,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":81,"category_name":40,"create_tm":174},719667,"Perish or Flourish - A Holistic Evaluation of Large Language Models for Code Generation in Functional Programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023927865/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=JBsN126y8PAgWGjXXkG3Tee1vKA%3D","perish-or-flourish-a-holistic-evaluation-of-large-language-models-for-code-generation-in-functional-programming",1795010760,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":39,"category_name":40,"create_tm":180},504882,"Picat - A Logic-based Multi-paradigm Language - Personal Discussion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229932145436/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=B0bn96MkKOQes8DEWeoR4JTzZFY%3D","picat-a-logic-based-multi-paradigm-language-personal-discussion",1791077225,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":186,"category_name":40,"create_tm":187},85038,"On the Correctness of Software Merge","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809236513/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=8g9o3jvgejlOSJbdFr6lxZOp5Vw%3D","on-the-correctness-of-software-merge",17,1784200549,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":193,"category_name":40,"create_tm":194},419756,"Lexicon -Grammar - The Representation of Compound Words - Maurice Gross","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922559304/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=8HQql7ABs2Hc%2FBIxYyUtq1Jxph8%3D","lexicon-grammar-the-representation-of-compound-words-maurice-gross",13,1790618253,{"doc_id":196,"doc_title":197,"file_type":137,"home_preview_img_url":198,"slug":199,"view_count":193,"category_name":40,"create_tm":200},497321,"What Do the Measures of Utterance Fluency Employed in Automatic Speech Evaluation (ASE) Tell Us about Oral Proficiency?","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229930034509/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=sIy3jlEfKS9MMU%2B5mfLM9t0WS3I%3D","what-do-the-measures-of-utterance-fluency-employed-in-automatic-speech-evaluation-ase-tell-us-about-oral-proficiency",1790951924,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":29,"category_name":40,"create_tm":206},505116,"2P-Kt - logic programming with objects & functions in Kotlin","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229932245444/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=yaVnkM6tWrv5lcKOvFrqDEldSYk%3D","2p-kt-logic-programming-with-objects-functions-in-kotlin",1791090507,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":19,"category_name":40,"create_tm":212},672648,"Functional Shell and Reusable Components for Easy GUIs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229989726117/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=Hvl2I5vZ%2FDXz2x0BzoQRx6Syu%2F8%3D","functional-shell-and-reusable-components-for-easy-guis",1793602830,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":81,"category_name":40,"create_tm":218},680272,"Automated Generation of Forecasting Texts in Aviation Weather for Thunderstorm Activity - A Hybrid Workflow Combining Rule-Based Processing and Large Language Models - Master Thesis","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229997725541/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=uSIE%2F4jgPCFV5AAC4E9oNXUisjA%3D","automated-generation-of-forecasting-texts-in-aviation-weather-for-thunderstorm-activity-a-hybrid-workflow-combining-rule-based-processing-and-large-language-models-master-thesis",1793915456,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":224,"category_name":40,"create_tm":225},488133,"Differences in Written Discourse in Independent and Integrated Prototype Tasks for Next Generation TOEFL","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926896798/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107559&Signature=Q8KQxGbW07DOtACzs3oCWNIxQgo%3D","differences-in-written-discourse-in-independent-and-integrated-prototype-tasks-for-next-generation-toefl",12,1790810497]