Logo语言编译器与执行系统的设计
发布时间:2018-04-25 07:05
本文选题:Logo语言 + 编译器 ; 参考:《哈尔滨工程大学》2016年硕士论文
【摘要】:信息时代的到来使计算机程序、嵌入式硬件和无线通信技术相关的教育日益重要。近年无论国内还是国外相关教育的启蒙年龄逐渐低龄化,而且人才缺口越来越大,中小学生有必要去学习电子信息类科学,而基础编程能力是现代电子信息类科学的入门能力。考虑到中小学生的学习能力和学习效果,以应用量最大的C语言入门去学习编程的门槛很高,虽然C语言已经是最基础的计算机语言。在上个世纪六十年代出现的Logo语言语法规则和人类自然语言的语法规则很像,Logo语言的语法通过了类似于控制画笔在可视界面上画出和输入的编程语言逻辑相同的图形的方式给予了编程初学者最直观的印象和理解。虽然Logo语言的诞生伴随了一些零星的相应编译器的实现,但是这些编译器大多数是早期基于DOS系统的程序,没有界面。在图形化操作系统爆发的今天,Logo语法似乎已被遗忘。本文是在Logo语言语法规则的基础上,利用现代计算机软硬系统开发平台,设计出了一款拥有可拖拽积木图形化的编译器,并利用现代电路理论设计了一款和图形编译器所画图形相对应的模拟其画笔运动的智能车。积木拖拽化图形界面的设计可以使中小学学生大大减轻了编程时的逻辑思考负担,有利用培养模块化编程思维;对应智能小车蓝牙无线连接的设计可以使中小学生充分感受当代物联网的思维模式。虽然当今市面存在了一些上给中小学生学计算机的软硬件工具,但它们存在系统速度慢、扩展性弱、功能少、成本高等不足。本文设计的基于Logo语言语法规则的积木图形化编译器与其模拟运动智能车拥有丰富的可扩展性,前端上位机的界面可以方便更改,内置词法语法逻辑功能可以更爱,后端智能小车上还可以扩展例如抬笔落笔等功能,这些可扩展性为未来市场的需求做好了准备。Logo编译器上位机的设计是在visual studio开发环境下C++语言实现的,其中主要包括词法分析器,语法分析器和图形界面。与其关联的智能车硬件控制电路的采用以单片机为主控的电路,设计了使其准确并稳定运行的外围控制电路。本文还研究了智能车与上位机间无线通信的解决方案,设计了一套针对课题的专属Logo协议。整个系统经过测试,图形界面和智能车运行结果良好,无线连接不易掉线。初步达到了设计的初衷。
[Abstract]:With the advent of the information age, the education of computer programs, embedded hardware and wireless communication technology is becoming more and more important. In recent years, both at home and abroad, the age of enlightenment is getting younger, and the gap of talents is increasing. It is necessary for primary and middle school students to learn electronic information science, and the ability of basic programming is the introductory ability of modern electronic information science. Considering the learning ability and learning effect of primary and middle school students, the threshold of learning programming with the most widely used C language is very high, although C language is already the most basic computer language. The syntax rules of the Logo language that emerged in the 1960s and the grammar rules of the human natural language are very much like the syntax of the Logo language, which passes through the same programming language logic as the control brush that is drawn on the visual interface with the input. The graphic approach gives the beginner the most intuitive impression and understanding of programming. Although the birth of the Logo language has been accompanied by the implementation of some sporadic corresponding compilers, most of these compilers are based on the early DOS system programs, no interface. Today, when graphical operating systems erupt, the Logo syntax seems to have been forgotten. Based on the syntax rules of Logo language and the development platform of modern computer soft and hard system, this paper designs a compiler with drag-and-drop block graphics. Using the modern circuit theory, an intelligent car is designed to simulate the movement of its brush, which corresponds to the graphics drawn by the graphic compiler. The design of building block drag-and-drop graphic interface can greatly lighten the logical thinking burden of primary and middle school students and cultivate the thinking of modularization programming. The design of Bluetooth wireless connection for smart car can make primary and middle school students fully experience the thinking mode of modern Internet of things. Although there are some software and hardware tools on the market for primary and middle school students to learn computer, they have some shortcomings such as slow system speed, weak expansibility, low function, high cost and so on. Based on the syntax rules of Logo language, the building block graphic compiler designed in this paper has abundant expansibility with its simulated motion intelligent car, the interface of the front end computer can be changed conveniently, and the built-in lexical syntax logic function can be more loved. The backend intelligent car can also extend the functions such as lifting pen and writing pen. These expansibility is prepared for the future market demand. The design of the upper computer of the .Logo compiler is implemented in C language under the visual studio development environment. It mainly includes lexical analyzer, parser and graphical interface. The related hardware control circuit of intelligent vehicle is controlled by single chip microcomputer, and the peripheral control circuit is designed to make it run accurately and stably. This paper also studies the solution of wireless communication between intelligent vehicle and host computer, and designs a set of exclusive Logo protocol. The whole system is tested, the graphical interface and smart car run well, wireless connection is not easy to drop wire. Initially achieved the original intention of the design.
【学位授予单位】:哈尔滨工程大学
【学位级别】:硕士
【学位授予年份】:2016
【分类号】:TP314
【参考文献】
相关期刊论文 前10条
1 李朋飞;陈曙晖;徐成成;;一种正则表达式编译器优化技术[J];计算机技术与发展;2015年09期
2 蒋俊;刘天宇;简雨沛;;蓝牙智能小车系统设计[J];信息技术与信息化;2015年06期
3 杨杏;陈富林;周霏;;基于Qt的工业机器人语言系统的设计[J];组合机床与自动化加工技术;2015年03期
4 孔繁云川;王娜;;基于太阳能智能蓝牙小车的设计[J];科技资讯;2014年27期
5 赵晓凤;张顺;周t熻,
本文编号:1800266
本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/1800266.html