前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >「SF-LC」6 Logic

「SF-LC」6 Logic

作者头像
零式的天空
发布于 2022-03-14 06:39:12
发布于 2022-03-14 06:39:12
60100
代码可运行
举报
文章被收录于专栏:零域Blog零域Blog
运行总次数:0
代码可运行

We have seen…

  • propositions: factual claims
    • equality propositions (e1 = e2)
    • implications (P → Q)
    • quantified propositions (∀ x, P)
  • proofs: ways of presenting evidence for the truth of a proposition

Prop type

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Check 3 = 3.  (* ===> Prop. A provable prop *)
Check 3 = 4.  (* ===> Prop. A unprovable prop *)

Prop is first-class entity we can

  • name it
  • parametrized!
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Definition is_three (n : nat) : Prop :=
  n = 3.

Check is_three. (* ===> nat -> Prop *)

Properties

In Coq, functions that return propositions are said to define properties of their arguments.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Definition injective {A B} (f : AB) :=
  ∀x y : A, f x = f y → x = y.
Lemma succ_inj : injective S. (* can be read off as "injectivity is a property of S" *)
Proof. 
  intros n m H. injection H as H1. apply H1. Qed.

The equality operator = is also a function that returns a Prop. (property: equality)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Check @eq. (* ===> forall A : Type, A -> A -> Prop *)

Theroems are types, and proofs are existentials.

Slide Q&A - 1.

  1. Prop
  2. Prop
  3. Prop
  4. Not typeable
  5. nat -> nat
  6. nat -> Prop
  7. (3)

think that Big Lambda (the type abstraction) works at type level, accepts type var, substitute and reture a type. forall in Coq is same (the concrete syntax) and only typecheck with Type or its subtype Set & Prop.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Check (∀n:nat, S (pred n)).  (* not typeable *)

Definition foo : (forall n:nat, bool) (* foo: nat -> bool *)
  := fun x => true.

Logical Connectives

noticed that connectives symbols are “unicodize” in book and spacemacs.

Conjuction (logical and)

and is just binary Prop -> Prop -> Prop and associative.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Print "/\".
Inductive and (A B : Prop) : Prop :=  conj : A -> B -> A /\ B
Check and. (* ===> and : Prop -> Prop -> Prop *)
and introduction
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma and_intro : forall A B : Prop, A -> B -> A /\ B.
Proof.
  intros A B HA HB. split.
  - apply HA.
  - apply HB.
Qed.

To prove a conjunction,

  • use the split tactic. It will generate two subgoals,
  • or use apply and_intro., which match the conclusion and give its two premises as your subgoals.
and elimination

if we already have a proof of and, destruct can give us both.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma and_example2' :
  ∀n m : nat, n = 0 ∧ m = 0 → n + m = 0.
Proof.
  intros n m [Hn Hm]. (* = intro H. destruct H. *)
  rewrite Hn. rewrite Hm. reflexivity. Qed.  (* you could use only one *)

Instead of packing into conjunction ∀n m : nat, n = 0 ∧ m = 0 → n + m = 0. why not two separate premises? ∀n m : nat, n = 0 -> m = 0 → n + m = 0. Both are fine in this case but conjunction are useful as intermediate step etc.

Coq Intensive Q: why destruct can work on and? is and inductively defined? A: Yes.

Disjunction (locial or)

or elimination

We need do case analysis (either P or Q should be able to prove the theroem separately!)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma or_example :
  forall n m : nat, n = 0 \/ m = 0 -> n * m = 0.
Proof.
  (* This pattern implicitly does case analysis on [n = 0 \/ m = 0] *)
  intros n m [Hn | Hm]. (* = intro H. destruct H. *)
  - (* Here, [n = 0] *) rewrite Hn. reflexivity.
  - (* Here, [m = 0] *) rewrite Hm. rewrite <- mult_n_O. reflexivity.
Qed.
or introduction

When trying to establish (intro into conclusion) an or, using left or right to pick one side to prove is sufficient.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma or_intro : forall A B : Prop, A -> A \/ B.
Proof.
  intros A B HA.
  left.  (* tactics *)
  apply HA.
Qed.

Falsehood and negation

False?

Recall the princple of explosion: it asserts that, if we assume a contradiction, then any other proposition can be derived. we could define ¬ P (“not P”) as ∀ Q, P → Q..

Coq actually makes a slightly different (but equivalent) choice, defining ¬ P as P → False, where False is a specific contradictory proposition defined in the standard library.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Definition not (P:Prop) := P → False.
Notation "¬x" := (not x) : type_scope.

Prove the princple of explosion:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Theorem ex_falso_quodlibet : forall (P:Prop),
  False -> P.
Proof.
  intros P contra.
  destruct contra.  Qed.  (* 0 cases to prove since ⊥ is not provable. [inversion] also works *)
Inequality
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Notation "x <> y" := (~(x = y)).

Same as SML and OCaml (for structural equality, OCaml uses != for physical equality.)

Proving of negation (or how to prove ¬P)

thinking about as unfold not, i.e. P -> False. so you have an assumptions P that could be intros HP. and the residual goal would be simply False. which is usually proved by some kind of contradiction in hypotheses with tactics discriminate. or contradiction.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Theorem contradiction_implies_anything : forall P Q : Prop,
  (P /\ ~P) -> Q.
Proof.
  intros P Q [HP HNA].                 (* we could [contradiction.] to end the proof here`*)
  unfold not in HNA. apply HNA in HP.  (* HP : False, HNA : P -> False  ⊢  HP: False  *)
  destruct HP.  Qed.                   (* destruct False.  *)
Tactic exfalso.

If you are trying to prove a goal that is nonsensical (e.g., the goal state is false = true), apply ex_falso_quodlibet to change the goal to False. This makes it easier to use assumptions of the form ¬P that may be available in the context — in particular, assumptions of the form x≠y. Since reasoning with ex_falso_quodlibet is quite common, Coq provides a built-in tactic, exfalso, for applying it.

Slide Q&A - 2

?unfold is implicit

  1. only destruct (if we consider intros destruct is also destruct.), ?unfold
  2. none (?unfold)
  3. left.
  4. destruct, unfold, left and right
  5. discrinminate (or inversion)

Truth

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma True_is_true : True.
Proof. apply I. Qed.

I : True is a predefined Prop…

Logical Equivalence

if and only if is just the conjunction of two implications. (so we need split to get 2 subgoals)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Definition iff (P Q : Prop) := (PQ)  (QP).
Notation "P ↔ Q" := (iff P Q)
                    (at level 95, no associativity) : type_scope.

rewrite and reflexivity can be used with iff statements, not just equalities.

Existential Quantification

To prove a statement of the form ∃x, P, we must show that P holds for some specific choice of value for x, known as the witness of the existential.

So we explicitly tell Coq which witness t we have in mind by invoking exists t. then all occurences of that “type variable” would be replaced.

Intro
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma four_is_even : exists n : nat, 4 = n + n.
Proof.
  exists 2. reflexivity.
Qed.
Elim

Below is an interesting question…by intros and destruct we can have equation n = 4 + m in hypotheses.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Theorem exists_example_2 : forall n,
  (exists m, n = 4 + m) ->
  (exists o, n = 2 + o).
Proof.
  intros n [m Hm]. (* note implicit [destruct] here *)
  exists (2 + m).
  apply Hm.  Qed.

Programming with Propositions

Considering writing a common recursive is_in for polymorphic lists. (Though we dont have a polymorphic =? (eqb) defined yet)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Fixpoint is_in {A : Type} (x : A) (l : list A) : bool :=
  match l with
  | [] => false
  | x' :: l' => if (x' =? x) then true else is_in x l'
  end.

Similarly, we can write this function but with disjunction and return a Prop! so we can write function to generate/create statements/propositions! (thx for the idea Prop is first-class)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Fixpoint In {A : Type} (x : A) (l : list A) : Prop :=
  match l with
  | [] => False
  | x' :: l' => x' = x ∨ In x l'
  end.

The whole thing I understood as a type operator (function in type level) and it’s recursive!

Coq dare to do that becuz its total, which is guarded by its termination checker. un-total PL, if having this, would make its type system Turing Complete (thus having Halting Problem). (Recursive Type like ADT/GADT in ML/Haskell is a limited form of recursion allowing no arbitray recursion.)

In_map

I took this one since it’s like a formal version of Property-based Tests!.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma In_map :
  forall (A B : Type) (f : A -> B) (l : list A) (x : A),
    In x l ->
    In (f x) (map f l).
Proof.
  intros A B f l x.
  induction l as [|x' l' IHl'].
  - (* l = nil, contradiction *)
    simpl. intros [].
  - (* l = x' :: l' *)
    simpl. intros [H | H].           (* evaluating [In] gives us 2 cases:  *)
    + rewrite H. left. reflexivity.  (* in head of l *)
    + right. apply IHl'. apply H.    (* in tail of l*)
Qed.

Q & A:

  1. eq is just another inductively defined and doesn’t have any computational content. (satisfication)
  2. Why use Prop instead of bool? See reflection below.

Drawbacks

In particular, it is subject to Coq’s usual restrictions regarding the definition of recursive functions, e.g., the requirement that they be “obviously terminating.” In the next chapter, we will see how to define propositions inductively, a different technique with its own set of strengths and limitations.

Applying Theorems to Arguments.

Check some_theorem print the statement!

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Check plus_comm.
(* ===> forall n m : nat, n + m = m + n *)

Coq prints the statement of the plus_comm theorem in the same way that it prints the type of any term that we ask it to Check. Why?

Hmm…I just noticed that!! But I should notice because Propositions are Types! (and terms are proof)

Proof Object

proofs as first-class objects.

After Qed., Coq defined they as Proof Object and the type of this obj is the statement of the theorem.

Provable: some type is inhabited by some thing (having terms).

So I guess when we apply theorems, Coq implicitly use the type of the Proof Object. (it’s already type abstraction) …we will get to there later at ProofObject chapter.

Apply theorem as function

rewrite select variables greedily by default

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma plus_comm3_take3 :
  ∀x y z, x + (y + z) = (z + y) + x.
Proof.
  intros x y z.
  rewrite plus_comm.
  rewrite (plus_comm y z).     (* we can explicitly provide type var! *)
  reflexivity.
Qed.

x y z were some type var and instantiated to values by intros, e.g. x, y, z:nat but we can explicilty pass in to plus_comm, which is a forall type abstraction! (Δ n m. (eq (n + m) (m + n)))

there must be something there in Proof Object so we can apply values to a type-level function

Coq vs. Set Theory

Coq’s logical core, the Calculus of Inductive Constructions, is a metalanguage for math, but differs from other foundations of math e.g. ZFC Set Theory

Functional Extensionality

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
(∀x, f x = g x) → f = g

∃f g, (∀x, f x = g x) → f = g

∃f g, (∀x, f x = g x) ∧ f != g    (* negation, consistent but not interesting... *)

In common math practice, two functions f and g are considered equal if they produce the same outputs. This is known as the principle of functional extensionality. Informally speaking, an “extensional property” is one that pertains to an object’s observable behavior. https://en.wikipedia.org/wiki/Extensionality https://en.wikipedia.org/wiki/Extensional_and_intensional_definitions?

This is not built-in Coq, but we can add them as Axioms. Why not add everything?

  1. One or multiple axioms combined might render inconsistency.
  2. Code extraction might be problematic

Fortunately, it is known that adding functional extensionality, in particular, is consistent. consistency: a consistent theory is one that does not contain a contradiction.

Adding Axioms

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Axiom functional_extensionality : forall {X Y: Type}
                                    {f g : X -> Y},
  (forall (x:X), f x = g x) -> f = g.

It’s like Admitted. but alerts we’re not going to fill in later.

Exercise - Proving Reverse with app and with cons are fn-exensionally equivalent.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Fixpoint rev_append {X} (l1 l2 : list X) : list X :=
  match l1 with
  | [] => l2
  | x :: l1' => rev_append l1' (x :: l2)
  end.

Definition tr_rev {X} (l : list X) : list X :=
  rev_append l [].

BTW, this version is tail recursive becuz the recursive call is the last operation needs to performed. (In rev i.e. rev t ++ [h], recursive call is a argument of function ++ and we are CBV.)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Lemma tr_rev_correct : forall X, @tr_rev X = @rev X.

Propositions and Booleans

We’ve seen two different ways of expressing logical claims in Coq:

  1. with booleans (of type bool), ; computational way
  2. with propositions (of type Prop). ; logical way

There’re two ways to define 42 is even:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Example even_42_bool : evenb 42 = true.
Example even_42_prop : ∃k, 42 = double k.

We wanna show there are interchangable.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Theorem even_bool_prop : ∀n,
  evenb n = true ↔ ∃k, n = double k.

In view of this theorem, we say that the boolean computation evenb n reflects the truth of the proposition ∃ k, n = double k.

We can futhur general this to any equations representing as bool or Prop:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Theorem eqb_eq : ∀n1 n2 : nat,
  n1 =? n2 = true ↔ n1 = n2.
Notes on Computability.

However, even they are equivalent from a purely logical perspective, they may not be equivalent operationally.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Fail Definition is_even_prime n :=
  if n = 2 then true
  else false.

Error: The term "n = 2" has type "Prop" which is not a (co-)inductive type.

=, or eq, as any function in Coq, need to be computable and total. And we have no way to tell whether any given proposition is true or false. (…We can only naturally deduce things are inductively defined)

As a consequence, Prop in Coq does not have a universal case analysis operation telling whether any given proposition is true or false, since such an operation would allow us to write non-computable functions. Although general non-computable properties cannot be phrased as boolean computations, it is worth noting that even many computable properties are easier to express using Prop than bool, since recursive function definitions are subject to significant restrictions in Coq.

E.g. Verifying Regular Expr in next chapter.

Doing the same with bool would amount to writing a full regular expression matcher (so we can execute the regex).

Proof by Reflection!
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
(* Logically *)
Example even_1000 : ∃k, 1000 = double k.
Proof.500. reflexivity. Qed.

(* Computationally *)
Example even_1000' : evenb 1000 = true.
Proof. reflexivity. Qed.

(* Prove logical version by reflecting in computational version *)
Example even_1000'' : ∃k, 1000 = double k.
Proof. apply even_bool_prop. reflexivity. Qed.

As an extreme example, the Coq proof of the famous 4-color theorem uses reflection to reduce the analysis of hundreds of different cases to a boolean computation.

Classical vs. Constructive Logic

Future Schedule

Proof got messier! Lean on your past PLT experience

As discussion leader

  • having many materials now
  • selected troublesome and interesting ones
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021-03-28,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
Linux下开发stm32 ①
这是为了给接下来的Linux下嵌入式开发打好基础,尽快熟悉Linux下c编程,但是在开发stm32的时候,编译工具链要使用gcc-arm-none-eabi,为什么不是gcc呢?这就要说到linux下的交叉编译了,因为我们要在PC机上编译出可以运行在ARM上的程序,使用gcc编译出的是在PC上运行的程序,所以我们要使用gcc-arm-none-eabi进行交叉编译~
Mculover666
2020/07/16
3.6K0
Linux下开发stm32 ①
【嵌入式】嵌入式开发中隐藏源代码并提供 API 接口(以 ARM Cortex-M3 为例)
工具名称:ARM GNU Toolchain(包含 arm-none-eabi-gcc)
LuckiBit
2025/03/06
1200
快速上手和使用makefile
想学习一样东西,最好先问个为什么要这样,这样学起来才有目标。上大学时,老师讲课总是告诉我们必须这样那样,很少讲这门课是干什么的,有什么意义,有什么用。有一次我问老师,为什么要傅里叶变换,学习它能用来做什么,老师先是很惊讶,然后耐心的给所有同学都讲了讲,老师讲完也很欣慰,笑着说因为很少有学生去问这样的问题。所以也只是讲课,没讲实际的应用和原理的东西。学生们听了也有兴趣了,学也认真了。
杨永贞
2020/08/04
1.4K0
用GCC开发STM32,正点原子开发板的一个库函数版本例程示例
首先下载交叉编译环境GCC,这个网上有很多,百度一下就能找到下载。比如 Sourcery G++ for ARM EABI
杨永贞
2020/08/04
1.6K0
用GCC开发STM32,正点原子开发板的一个库函数版本例程示例
嵌入式Linux驱动开发——汇编点灯
🚀🚀这个地方的代码还是很简单的,主要就是去哪找CCM的地址,不过也不算难找,比如CCGR0,就是0x020c4068。
小点点
2024/04/10
3430
嵌入式Linux驱动开发——汇编点灯
arm(3)| 点亮led灯
这里继续介绍arm裸机的编程,从点亮led灯开始,今天将会分别使用汇编和C语言来实现点亮led灯。里面涉及到的一些arm基础知识可以参考前面的文章arm(1)| 基础知识arm(2)| 汇编指令和伪指令
飞哥
2020/07/17
1.4K0
什么?Arm放弃了自家的汇编语法?改投GNU了?
那么多对于我们初学者来说要学习哪种风格呢?答案是肯定的,学习GNU风格的汇编代码,因为做Linux驱动开发必须掌握的linux内核、uboot,而这两个软件就是GNU风格的。
GorgonMeducer 傻孩子
2020/12/22
2.4K0
什么?Arm放弃了自家的汇编语法?改投GNU了?
用Eclipse开源IDE+gcc编译器开始嵌入式编程
 最近有个项目,不能在Keil uVision4 MDK中开发,只能在linux下并使用命令行的GCC编译器,手动写makefile,对于习惯了IDE的开发者来说多少有些不适应,尤其是查找函数定义之类的不方便。于是成功的实现了使用Eclipse的IDE,并配合GCC编译器开发嵌入式应用程序。Eclipse和GCC环境的搭建先略过,查资料都好解决。先贴出makefile模版,因为没有使用Eclpise的CDT自动生成的makefile,所以这里的 makefile是必须的。GCC编译器用的sourcery codebench,这样能轻松获取GCC工具链,较方便。
杨永贞
2020/08/04
1.1K0
makefile使用.lds链接脚本以及 常用命令 解析
  例1,假如现在有head.c init.c nand.c main.c这4个文件:
嵌入式与Linux那些事
2021/05/20
2.2K0
【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)
博客地址 : http://blog.csdn.net/shulianghan/article/details/42239705
韩曙亮
2023/03/27
2.1K0
【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)
makefile文件编写「建议收藏」
makefile文件用于管理和组织代码工程的编译和链接,其不是可执行文件,其被make工具解析并完成相关动作,下面笔者将介绍makefile中常用的一些语法说明:
全栈程序员站长
2022/09/06
3.4K0
makefile文件编写「建议收藏」
树莓派4裸机基础教程:从hello world开始
当我们去研究一个系统的时候,首先需要从最简单的程序开始入手。前面文章的介绍已经描述了项目的环境搭建以及启动过程。
bigmagic
2020/09/18
2.7K0
用GCC开发STM32入门一(使用官方库)
先说说为什么需要用GCC开发stm32吧,作为一名编程方面的爱好者,又是搞嵌入式的,总是用现成的IDE,感觉很不舒服,虽然IDE能很大提高咱们的工作效率,可是作为业余学习研究,还是越熟悉底层越好。比如如何搭建环境,如何使用编译器和编写makefile,这些搞过linux开发的都知道,而且 linux环境下没那么多IDE可用,而且也没必要用IDE.还有一个原因是,喜欢黑色的dos窗口下编程的感觉,IDE编辑环境太刺眼了,每次下班后都很累眼睛。
杨永贞
2020/08/04
2.9K0
makefile初步制作,arm-linux- (gcc/ld/objcopy/objdump)详解
在linux中输入vi Makefile 来实现创建Makefile文件 注意:命令行前必须加TAB键 例如:将两个文件led.c和crt0.S汇编文件,制作一个Makefile文件 1 1 led
诺谦
2018/01/03
1.8K0
用GCC开发STM32入门二
之前从网上下载了一份用GCC开发stm32的程序,也是用的stm32的库函数编程,启动文件是startup_stm32f10x_hd.s,链接脚本文件是从gcc_ride7中拷贝出的stm32f10x_flash_extsram.ld,做了些简单修改。但是编译了一下,出现了一大堆的错误。于是干脆不用这些文件,从网上查资料,自己写启动文件和链接脚本。仔细看了下startup_stm32f10x_hd.s,这个文件,发现也很简单,无非是定义了一些中断向量表和完成数据段的搬移和.bss段的清零等工作,并把程序跳转到main()函数。然后链接脚本文件告知链接器,把所有目标文件相应的段连接到一起,并把目标文件中的“变量地址”“函数地址”重定位至正确的地址空间; 编写前需要知道C程序编译后的典型内存布局 ,单片机的启动流程以及链接脚本文件的作用和编写等知识。部分知识,摘自网络。
杨永贞
2020/08/04
1.9K0
用GCC开发STM32入门二
区块链多链钱包系统开发技术讲解方案详细(逻辑清晰)
迁移华为的liteOS到STM32F4的开发板上,按照官方的步骤修改makefile后报错:
系统_I8O28578624
2023/02/07
5800
AIoT应用创新大赛-用标准GNU GCC完成RT1060工程编译(纯VSCode开发)
前言:其实在微信群里,NXP官方大佬也多次提到,使用官方IDE可以配置成标准GNU GCC工具链。可能是多年玩单片机的傲慢,让自己觉得不就是个构建环境嘛,有什么,自己改改就行。多花的时间一半算是浪费的,一半算是值得的。
忙碌的死龙
2021/12/24
1.2K0
AIoT应用创新大赛-用标准GNU GCC完成RT1060工程编译(纯VSCode开发)
【嵌入式开发】ARM 异常向量表 ( 异常概念 | 异常处理流程 | 异常向量 | 汇编代码 )
一. 异常向量表 1. 异常相关概念 (1) 异常 (2) 异常类型简介 2. 异常处理 (1) 异常处理 二. 异常向量表代码编写 1. 初始化异常向量表模块代码 2. 链接器脚本 3. Makefile 编译脚本 4. 编译输出可执行文件 本博客的参考文章及相关资料下载 : 1.ARM 架构参考手册 ( ARM Architecture Reference Manual ) : https://download.csdn.net/download/han1202012/8324641 2.汇
韩曙亮
2023/03/27
3.8K0
【嵌入式开发】ARM 异常向量表 ( 异常概念 | 异常处理流程 | 异常向量 | 汇编代码 )
【完整版】使用 Rust 进行嵌入式开发
https://club.rt-thread.org/ask/article/2944.html
MikeLoveRust
2021/11/12
2.6K0
以MicroZed单板为例,Vitis嵌入式软件开发极速入门
Vitis是Xilinx新推出的统一软件平台,可实现在 Xilinx 所有芯片(包括 FPGA、SoC 和 Versal ACAP)上开发嵌入式软件和加速应用。 Xilinx主要宣传Vitis可以为异构平台的应用实现加速。其实,Vitis也能完美的支持嵌入式软件开发。 下面以MicroZed单板为例,介绍在Vitis里如何创建嵌入式软件工程,并且编译和调试,直到启动。
hankfu
2020/07/16
1.8K0
推荐阅读
相关推荐
Linux下开发stm32 ①
更多 >
LV.1
这个人很懒,什么都没有留下~
目录
  • Prop type
    • Properties
  • Slide Q&A - 1.
  • Logical Connectives
    • Conjuction (logical and)
      • and introduction
      • and elimination
    • Disjunction (locial or)
      • or elimination
      • or introduction
    • Falsehood and negation
      • False?
      • Inequality
      • Proving of negation (or how to prove ¬P)
      • Tactic exfalso.
  • Slide Q&A - 2
    • Truth
    • Logical Equivalence
    • Existential Quantification
      • Intro
      • Elim
  • Programming with Propositions
    • In_map
    • Drawbacks
  • Applying Theorems to Arguments.
    • Check some_theorem print the statement!
    • Proof Object
    • Apply theorem as function
  • Coq vs. Set Theory
    • Functional Extensionality
    • Adding Axioms
    • Exercise - Proving Reverse with app and with cons are fn-exensionally equivalent.
    • Propositions and Booleans
      • Notes on Computability.
      • Proof by Reflection!
    • Classical vs. Constructive Logic
  • Future Schedule
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档