分类 Other 下的文章

Xinhua News Agency, New Delhi, September 20 - Indian researchers have recently invented an environmentally friendly method of plastic degradation. They only need to place the plastic in a 70 ° C solution containing glucose and metal ions and continuously stir for several days to degrade the plastic into molecule.

A team led by researchers at the Indian Institute of Technology in Madras found that the new method can be used to degrade plastic materials such as Teflon. Related research papers have been published in the Journal of the American Chemical Society, Sustainable Chemistry and Engineering.

Polytetrafluoroethylene is a high performance material with heat resistance, chemical inertness, insulation stability and low friction. The researchers first placed a Teflon-coated magnetic stirrer in a 70 ° C solution for 15 days with metal ions and 1000 ppm glucose (1 ppm in parts per million).

The researchers then found tiny fragments of bright red glow on the surface of the solution. As a result, these bright tiny particles contained molecular fragments of a polytetrafluoroethylene polymer.

The study also found that Teflon did not show this degradation in the absence of agitation, glucose or metal ions; at room temperature, the degradation rate decreased; as the glucose content in the solution increased, the degradation of polytetrafluoroethylene The effect will be enhanced.

The researchers explained that PTFE may be electrically degraded into molecules by triboelectric stirring. They cautioned that because many modern cookware are coated with Teflon, similar chemical reactions can also occur on cookware, resulting in microplastics in food. Similarly, this triboelectric degradation process can also occur in the ocean, where there are a large number of metal ions, and the waves provide continuous agitation, which may be one of the ways in which marine microplastics are produced.

Huawei EMUI officially issued an article saying that the Ark compiler is ready for open source, "August 31 show you the code!"

On April 11 this year, Huawei's consumer business CEO Yu Chengdong announced that Huawei officially released the Huawei Ark compiler. This compiler can improve the compilation efficiency of Android applications, from the original interpretation and execution to the full-process machine code efficient running program.

95277-y8qanirhbf.png

Huawei's Ark compiler as a new Android application compiler can significantly improve the speed of mobile phones. According to Huawei's official data, the Ark compiler can improve system fluency by 24%, improve system response by 44%, and improve 60% of the three-party application operation fluency.

 
According to Huawei's official introduction, the Ark compiler is the first static compiler to completely replace the language virtual machine, and does not require an interpreter at all. A compiler that takes into account Java development efficiency and C language runtime efficiency. Compared to the existing compilation mechanism:

  1. The Ark compiler is a static compilation method. In the existing Android system, running an application first starts the virtual machine, then reads the application code and interprets the execution one by one. It will occupy more processing resources and affect the efficiency of program execution. Of course, there are also early or runtime compilation techniques, such as AOT or JIT, that convert some of the programs into machine code and execute them directly on the CPU. However, it is still not possible to do 100% to get rid of virtual machine execution, which is the key to the current Android camp is not as good as the IOS camp.
  2. The static compilation mode of Huawei Ark compiler can directly translate the dynamic features in the language into machine code. After the application is installed, the mobile phone can run the program at full speed, completely eliminating the drawbacks of the virtual machine and bringing about great improvement in efficiency.

 
3, the Ark compiler is a compiler deployed in the development environment, and the existing compilation process, mainly occurs on the mobile phone, bringing additional resource consumption.

adress:

https://code.opensource.huaweicloud.com/home

OpenArkCompiler adress

https://code.opensource.huaweicloud.com/HarmonyOS/OpenArkCompiler/home

HUAWEI AppGallery
AppGallery is HUAWEI's official app distribution platform. You can use AppGallery on your HUAWEI mobile device to search, download, manage, and share mobile apps. AppGallery features a four-layer detection mechanism to ensure that apps featured on the platform are safe to download and use. All kinds of useful and fun apps are available for download through AppGallery.

78747-8u6p5ndyf5v.png

Exclusive Four-layer Detection
Privacy Check, Security Vulnerabilities
Scanning, Malicious Behavior Detection
and manual Real-name Security Check

Boutique
HUAWEI AppGallery assemble professional editors around
the world and expose your application in various ways.

Intelligent
Roaming Services
Help HUAWEI users find local popular apps the first time.

Wishlist
We will try our best to find the apps you want.

Gifts
Vouchers, discount coupons, VIP privileges……Those exclusive services are only for HUAWEI users.

How does the Huawei Ark compiler solve the problem? The principle of the Ark compiler

Before answering this question, let's take a look at the timeline in which Huawei works for the Ark compiler:

In 2009, Huawei started the development of 5G basic technology research and began to create a compilation group. The first batch of researchers at home and abroad joined.
In 2013, Huawei launched the self-developed compiler HCC for the field of base stations, and formally proposed the compiler framework.
In 2014, many experts at home and abroad joined Huawei and the Ark project was officially launched.
In 2016, the Compiler and Programming Language Lab was established.
In 2017, the first Java program "HelloWorld" on the Ark compiler runs.
One week before the Spring Festival in 2018, the Ark compiler ran through all the backend services of the Android system and successfully ported it to the phone.
In April 2019, the Huawei Ark compiler was announced at the domestic conference of the P30 series.

So, how is the principle of the Ark compiler implemented?

In fact, Huawei's so-called "Ark compiler" is not so much a compiler, it is a compile and run system; the operation of this system requires the cooperation environment and the terminal (that is, smart phone), the purpose is to bypass Android The virtual machine that the App must run on in the operating system, compile the mixed code such as Java/C/C++ into the machine code and run it directly on the mobile phone, completely bid farewell to the Java JNI overhead, and completely bid farewell to the virtual machine's GC memory. The application process caused by the recycling is dropped - thus ultimately achieving the smoothness of the Android operating system.

As mentioned above, in this implementation of the Ark compiler, four aspects need to be solved.

First: compile Java code directly into machine code

As far as the current situation is concerned, the problem that Java has to compile into machine code is the dynamic semantics in Java (corresponding to static semantics, which can be solved by advanced translation). Static semantics refers to Determining the language and meaning, while dynamic semantics refers to content that needs to be understood in conjunction with the context - in this case, if you want to compile dynamic semantics like compiling static semantics, many people think that it is impossible at all.

This is impossible, which is exactly what Huawei solved during the development of the Ark compiler.

Specifically, the Ark compiler solves two major difficulties in static compilation dynamic semantics through two-way blessing in the compile phase and the run phase: one is to design the data model, and the other is how to efficiently obtain dynamic information at runtime. The Ark compiler team basically traversed the dynamic semantics of Java and performed large-scale data modeling. At the same time, the precision of compile-time dynamic semantic analysis is greatly improved, especially when it involves cross-language invocation. In addition, Huawei has designed a dynamic semantic matching mechanism with core patents, which effectively reduces the overhead of dynamic semantics at runtime.

As a result, the Ark compiler can compile Java code into a language that the machine can execute directly. Huawei said that after the application of Huawei's Ark compiler, it no longer needs to be compiled on the mobile phone, and completely bid farewell to the virtual machine, which brings an Android experience that rivals or even surpasses iOS.

Second: Resolve JNI overhead for mixed languages

Since 95% of Top apps are written in mixed languages ​​such as Java/C/C++; the Ark compiler also needs to eliminate the JNI overhead of mixed language calls.

This involves a noun IR mentioned above, which is used to represent the data structure of the code. It is the "protocol and common language" used by the various modules of the compiler and related tools to transfer information. It is also a program transformation. And compile and optimize the carriers of various algorithms. It's the "brains" of the compiler, which directly determines the final effect of the compiler - so it's the most difficult.

The Huawei Ark Compiler team has been working on IR for five years, gradually exploring the signal laws of every nerve and every neuron in the "brain", and on the basis of this, invented a core patent. The different language codes can be uniformly compiled into the same set of directly executable machine code in the developer environment, thereby completely eliminating the overhead of the hybrid language calling each other.

In other words, the Huawei Ark compiler can implement a unified intermediate representation IR in a mixed language, which is equivalent to the same person able to understand the language of the world - of course, behind this is a deep understanding of the Huawei Ark compiler team based on multiple programming languages. And a lot of research and development.

Third: Code optimization outside of unified IR

Huawei's Ark compiler directly moved code optimization from the mobile phone to the developer environment, and may move to the cloud in the future. With the more powerful computing power of the developer environment, more advanced and sophisticated optimization algorithms can be implemented to achieve better optimization results. Huawei said that the optimization of code optimization in many specific scenarios is even subversive.

It is worth mentioning that developers use the Ark compiler and do not need to change the original coding habits. Developers can develop their own code optimization algorithms or code optimizations only through algorithms preset by the Ark compiler. In the future, Huawei will also provide code tuning tools. Developers can choose to adjust the code according to the optimization suggestions of the tool, and cooperate with the Ark compiler to obtain better execution results.

Fourth: Solve the problem of Caton caused by Android memory recycling

In order to solve this problem, the Ark compiler uses the reference counting method (RC, Reference Counting) to perform real-time memory recovery, and uses a special elimination ring algorithm (to eliminate the problem of unrecyclable problems caused by mutual reference of objects) to avoid System Caton brought by GC centralized recycling. Compared to GC, Ark's memory reclamation is real-time rather than centralized, and there is no need to suspend the application process, which greatly eliminates the jam.

In addition, the software has an infinite loop that everyone is familiar with, that is, the computer is occupied by computer resources by an infinite loop of running programs. This “infinite loop” is called “ring reference” in the software. In order to avoid the "eat" of the phone memory from the mechanism by the mechanism, the Ark compiler introduces the "alarm" flag of the annotation to mark the ring of the base class.

Of course, Java programmers can also mark rings in business code. After extensive practice verification, the Ark mechanism can reduce the occurrence of most of the program loops. On the other hand, the Ark compiler introduces an efficient loop recovery mechanism in the running state, allowing selective intelligent recovery of the memory footprint of an APP, which is an improvement over the traditional loop recovery algorithm.

In summary, in the face of the existing Android system in the code compilation, operation, IR, memory recovery and other four levels of problems, Huawei Ark compiler gave their own solutions, the core innovation is mixed language The unified intermediate representation and complete static compilation, but more importantly, Huawei's new ideas for solving the Android operating system App problem, and the courage to dare to invest in order to achieve this kind of thinking.

2019 Huawei Global Developers Conference will be held at the Songshan Lake Base in Huawei from August 9th to 11th. It will be officially opened this afternoon. According to the Shanghai Securities News, the Huawei EMUI10.0 system, the "Glory Smart Screen" equipped with Haisi Hongjun 818 smart chip and the new "Digital Reality" black technology based on virtual and real integration will be announced. Among them, EMUI10.0 will be the first to appear this afternoon.
07313-7zjszn6ms9i.png

According to the report, the market believes that the Huawei EMUI10.0 system will introduce "distributed technology" to solve the inter-terminal collaboration problem and realize the interoperability of multi-terminal full scenarios. Recently, Huawei EMUI officially began to warm up EMUI 10, saying that “EMUI 10 meets you at the developer conference, breaking the terminal boundary!” and EMUI 10 will use the details to achieve quality. And said that the beauty of quality lies in the details, the comfort in the details, everything is just right.

According to Huawei's "Glory HONOR" official microblogging spoiler, the glory wisdom screen will be officially released on the second day of this developer conference. The possibility of carrying the Hongmeng system is very large, and the latter may appear on August 10 with the glory and wisdom screen.

In addition, according to the agenda of the meeting, on August 11th, Huawei will uncover a black technology, and participants can sign up and participate in the black technology experience tour in batches for a 30-minute period. “Bringing consumers a new interactive experience. And the visual experience, seeing never before, knowing that the future has come." According to the official website of Huawei Developers Conference.

Huawei's developer conference invited 1,500 partners and 5,000 global developers, which will be Huawei's largest ever conference.

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。